package model import "time" // PrintNotice 包含广告和通知消息 type PrintNotice struct { ID int `orm:"column(id)" json:"id" db:"id"` CreatedAt time.Time `orm:"type(datetime)" json:"created_at" db:"created_at"` // 创建时间 UpdatedAt time.Time `orm:"type(datetime)" json:"updated_at" db:"updated_at"` // 更新时间 NoticeType int `orm:"type(int)" json:"notice_type" db:"notice_type"` // 类型(1-广告/2-通知) Msg string `orm:"type(text)" json:"msg" db:"msg"` // 内容(广告就是图片,通知消息就是文字) Link string `orm:"type(varchar);size(255)" json:"link" db:"link"` // 跳转地址 } type AddOrUpdatePrintNotice struct { Id int `json:"id" form:"id"` NoticeType int `json:"notice_type" form:"notice_type" binding:"required"` Msg string `json:"msg" form:"msg" binding:"required"` Link string `json:"link" form:"link" binding:"required"` } type DeletePrintNotice struct { Id int `json:"id" form:"id" binding:"required"` } type QueryPrintNotice struct { NoticeType int `json:"notice_type" form:"notice_type" binding:"required"` PageSize int `json:"page_size" form:"page_size" binding:"required"` PageNumber int `json:"page_number" form:"page_number" binding:"required"` }