1234567891011121314151617181920212223242526272829303132333435 |
- package variety_classify
- import "time"
- // VarietyClassify 标签库分类表
- type VarietyClassify struct {
- VarietyClassifyID int `gorm:"primaryKey;column:variety_classify_id;type:int(10) unsigned;not null" json:"-"` // 品种分类ID
- ClassifyName string `gorm:"column:classify_name;type:varchar(100);not null;default:''" json:"classifyName"` // 品种分类名称
- Sort int `gorm:"column:sort;type:int(10) unsigned;not null;default:0" json:"sort"` // 排序
- State int `gorm:"column:state;type:tinyint(4) unsigned;not null;default:1" json:"state"` // 状态:0-禁用 1-开启
- CreateTime time.Time `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createTime"`
- ModifyTime time.Time `gorm:"column:modify_time;type:datetime;default:CURRENT_TIMESTAMP" json:"modifyTime"`
- }
- // TableName get sql table name.获取数据库表名
- func (m *VarietyClassify) TableName() string {
- return "variety_classify"
- }
- // VarietyClassifyColumns get sql column name.获取数据库列名
- var VarietyClassifyColumns = struct {
- VarietyClassifyID string
- ClassifyName string
- Sort string
- State string
- CreateTime string
- ModifyTime string
- }{
- VarietyClassifyID: "variety_classify_id",
- ClassifyName: "classify_name",
- Sort: "sort",
- State: "state",
- CreateTime: "create_time",
- ModifyTime: "modify_time",
- }
|