46 lines
2.0 KiB
Go
46 lines
2.0 KiB
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// CmsProduct CMS 产品 yz_cms_product
|
|
type CmsProduct struct {
|
|
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
|
Tid uint64 `orm:"column(tid);default(0)" json:"tid"`
|
|
Title string `orm:"column(title);size(100)" json:"title"`
|
|
Thumb string `orm:"column(thumb);size(500);default()" json:"thumb"`
|
|
Desc string `orm:"column(desc);size(500);default()" json:"desc"`
|
|
Content string `orm:"column(content);type(mediumtext);null" json:"content"`
|
|
URL string `orm:"column(url);size(500);default()" json:"url"`
|
|
Sort int `orm:"column(sort);default(0)" json:"sort"`
|
|
Status int8 `orm:"column(status);default(1)" json:"status"`
|
|
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
|
UpdateTime *time.Time `orm:"column(update_time);type(datetime);null" json:"update_time"`
|
|
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
|
}
|
|
|
|
func (m *CmsProduct) TableName() string {
|
|
return "yz_cms_product"
|
|
}
|
|
|
|
// CmsProductCategory CMS 产品分类 yz_cms_product_category
|
|
type CmsProductCategory struct {
|
|
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
|
Tid uint64 `orm:"column(tid);default(0)" json:"tid"`
|
|
Title string `orm:"column(title);size(100)" json:"title"`
|
|
Pid uint64 `orm:"column(pid);default(0)" json:"pid"`
|
|
Desc string `orm:"column(desc);size(500);default()" json:"desc"`
|
|
Sort int `orm:"column(sort);default(0)" json:"sort"`
|
|
Status int8 `orm:"column(status);default(1)" json:"status"`
|
|
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
|
UpdateTime *time.Time `orm:"column(update_time);type(datetime);null" json:"update_time"`
|
|
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
|
}
|
|
|
|
func (m *CmsProductCategory) TableName() string {
|
|
return "yz_cms_product_category"
|
|
}
|
|
|
|
|