16 lines
475 B
Go
16 lines
475 B
Go
|
package entity
|
||
|
|
||
|
import "online_code/common/types"
|
||
|
|
||
|
// Category 分类表
|
||
|
type Category struct {
|
||
|
types.BaseDbModel
|
||
|
Identity string `json:"identity" gorm:"column:identity;type:varchar(36);comment:'分类的唯一标识'"`
|
||
|
Name string `json:"name" gorm:"column:name;type:varchar(100);comment:'分类名称'" `
|
||
|
ParentId int `json:"parent_id" gorm:"column:parent_id;type:int(11);comment:'父级ID'" `
|
||
|
}
|
||
|
|
||
|
func (table *Category) TableName() string {
|
||
|
return "category"
|
||
|
}
|