Files
yunzerwebsiteallinone/go/models/oa_notice.go
T
2026-09-15 10:44:31 +08:00

35 lines
1.7 KiB
Go

package models
import (
"time"
)
// OaNotice OA通知公告: yz_backend_oa_notice
// 按租户 tid 隔离:租户内发布,租户内所有后台用户可见。
// status: 0-草稿 1-已发布 2-已下架;notice_type: 0-通知 1-公告 2-活动;
// level: 0-普通 1-重要 2-紧急;is_top: 0-否 1-是(置顶优先展示)。
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"
}