分类
| 17 | |
| 18 | // 分类 |
| 19 | type Category struct { |
| 20 | Id int `json:"id"` //自增主键 |
| 21 | Pid int `json:"pid" orm:"column(pid)"` //分类id |
| 22 | Title string `orm:"size(30);column(title)" json:"title,omitempty"` //分类名称 |
| 23 | Intro string `json:"intro,omitempty"` //介绍 |
| 24 | Icon string `json:"icon,omitempty"` //分类icon |
| 25 | Cnt int `json:"cnt,omitempty"` //分类下的书籍统计 |
| 26 | Sort int `json:"sort,omitempty"` //排序 |
| 27 | Status bool `json:"status,omitempty"` //分类状态,true表示显示,否则表示隐藏 |
| 28 | } |
| 29 | |
| 30 | func NewCategory() *Category { |
| 31 | return &Category{} |
nothing calls this directly
no outgoing calls
no test coverage detected