Files
jx-callback/business/model/print_notice.go
邹宗楠 4a2213c856 1
2022-12-07 13:49:27 +08:00

31 lines
1.3 KiB
Go

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"`
}