zwpanel/service/models/notice.go
2023-11-08 21:53:07 +08:00

19 lines
784 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package models
const (
NOTICE_DISPLAY_TYPE_LOGIN = iota + 1 // 通知展示类型 登录页
NOTICE_DISPLAY_TYPE_HOME // 通知展示类型 首页
)
type Notice struct {
BaseModel
Title string `gorm:"type:varchar(255)" json:"title"`
Content string `gorm:"type:varchar(2000)" json:"content"`
DisplayType int `gorm:"type:tinyint(1)" json:"displayType"` // 展示类型 参考常量NOTICE_DISPLAY_TYPE_XXXXX
OneRead int `gorm:"type:tinyint(1)" json:"oneRead"` // 1.前端记录读取状态 0.每次都展示
Url string `gorm:"type:varchar(255)" json:"url"` // 跳转地址
IsLogin uint `gorm:"type:tinyint(1)" json:"isLogin"` // 登录可见
UserId uint `json:"userId"`
User User `json:"user"`
}