You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
486 B
15 lines
486 B
package model
|
|
|
|
import "shop-api/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"
|
|
}
|
|
|