model

package
v0.0.0-...-139547c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	ID        uint       `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	CreatedAt time.Time  `json:"-"`
	UpdatedAt time.Time  `json:"-"`
	DeletedAt *time.Time `json:"-" sql:"index"`
}

func (*BaseModel) AfterCreate

func (m *BaseModel) AfterCreate(scope *gorm.Scope) (err error)

func (*BaseModel) AfterDelete

func (m *BaseModel) AfterDelete(scope *gorm.Scope) (err error)

func (*BaseModel) AfterSave

func (m *BaseModel) AfterSave(scope *gorm.Scope) (err error)

func (*BaseModel) AfterUpdate

func (m *BaseModel) AfterUpdate(scope *gorm.Scope) (err error)

Directories

Path Synopsis
proto

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL