30 lines
1.4 KiB
Go
30 lines
1.4 KiB
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type OaNotice struct {
|
|
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
|
Tid int `orm:"column(tid)" json:"tid"`
|
|
Title string `orm:"column(title);size(255)" json:"title"`
|
|
Content string `orm:"column(content);type(text);null" json:"content"`
|
|
NoticeType int8 `orm:"column(notice_type);default(0)" json:"notice_type"`
|
|
Level int8 `orm:"column(level);default(0)" json:"level"`
|
|
Status int8 `orm:"column(status);default(0)" json:"status"`
|
|
IsTop int8 `orm:"column(is_top);default(0)" json:"is_top"`
|
|
PublishTime *time.Time `orm:"column(publish_time);type(datetime);null" json:"publish_time"`
|
|
PublisherID uint64 `orm:"column(publisher_id);default(0)" json:"publisher_id"`
|
|
PublisherName string `orm:"column(publisher_name);size(100);default()" json:"publisher_name"`
|
|
ReadCount int `orm:"column(read_count);default(0)" json:"read_count"`
|
|
IsDeleted int8 `orm:"column(is_deleted);default(0)" json:"is_deleted"`
|
|
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
|
UpdateTime *time.Time `orm:"column(update_time);auto_now;type(datetime);null" json:"update_time"`
|
|
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
|
}
|
|
|
|
func (m *OaNotice) TableName() string {
|
|
return "yz_backend_oa_notice"
|
|
}
|
|
|