package my_chart_classify import ( "time" ) // MyChartClassify 我的图表分类 type MyChartClassify struct { MyChartClassifyId int `gorm:"primaryKey;column:my_chart_classify_id;type:int(11);not null" json:"myChartClassifyId"` MyChartClassifyName string `gorm:"uniqueIndex:idx_my_chart_classify_name;column:my_chart_classify_name;type:varchar(255);default:''" json:"myChartClassifyName"` // 分类名称 AdminID int `gorm:"uniqueIndex:idx_my_chart_classify_name;column:admin_id;type:int(11)" json:"adminId"` // 用户id Sort int `gorm:"column:sort;type:int(9);default:0" json:"sort"` // 排序字段,值越小,越靠前 IsPublic uint8 `gorm:"column:is_public;type:tinyint(4) unsigned;default:0" json:"isPublic"` // 是否所有人可见,0:仅自己可见,1:所有人可见 IsCompanyPublic uint8 `gorm:"column:is_company_public;type:tinyint(4) unsigned;default:0" json:"isCompanyPublic"` // 是否用户可见:0-否 1-是 CreateTime time.Time `gorm:"column:create_time;type:datetime" json:"createTime"` ModifyTime time.Time `gorm:"column:modify_time;type:datetime" json:"modifyTime"` PublicTime time.Time `gorm:"column:public_time;type:datetime" json:"publicTime"` // 公开时间 CompanyPublicTime time.Time `gorm:"column:company_public_time;type:datetime" json:"companyPublicTime"` // 用户可见公开时间 } // TableName get sql table name.获取数据库表名 func (m *MyChartClassify) TableName() string { return "my_chart_classify" } // MyChartClassifyColumns get sql column name.获取数据库列名 var MyChartClassifyColumns = struct { MyChartClassifyID string MyChartClassifyName string AdminID string Sort string IsPublic string CreateTime string ModifyTime string PublicTime string }{ MyChartClassifyID: "my_chart_classify_id", MyChartClassifyName: "my_chart_classify_name", AdminID: "admin_id", Sort: "sort", IsPublic: "is_public", CreateTime: "create_time", ModifyTime: "modify_time", PublicTime: "public_time", }