package
module
Version:
v0.0.0-...-e1ce254
Opens a new window with list of versions in this module.
Published: Jan 16, 2021
License: MIT
Opens a new window with license information.
Imports: 13
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
cola-model
Coke web framework uses gorm (gorm.io) middleware
Documentation
¶
JSON Custom json field
GormDBDataType schema.Field DataType
Scan sql.Scanner interface
Value driver.Valuer interface, Value return json value
type Model struct {
ID uid.UID `gorm:"primaryKey" json:"id"`
CreatedAt time.Time `gorm:"<-:create" json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *gorm.DeletedAt `gorm:"index" json:"deleted_at,omitempty"`
}
Model base model with uid(github.com/xs23933/uid)
BeforeCreate enhancing ID
Source Files
¶
Click to show internal directories.
Click to hide internal directories.