package model import "pure/global" type TbCategory struct { //商品分类 Name string `gorm:"type:varchar(100);not null;comment:商品分类名称" json:"name"` Pid uint `gorm:"type:int(11);comment:父id" json:"pid"` //父id IsLeaf bool `gorm:"type:tinyint(1)" json:"is_leaf"` //是否叶子分类 Status int `gorm:"type:tinyint(1);comment:状态 1:正常" json:"status"` global.MG_MODEL } func (TbCategory) TableName() string { return "tb_category" }