🎨 新增公告通知模块
This commit is contained in:
19
model/notice/notice.go
Normal file
19
model/notice/notice.go
Normal file
@@ -0,0 +1,19 @@
|
||||
// 自动生成模板Notice
|
||||
package notice
|
||||
|
||||
import (
|
||||
"git.echol.cn/loser/lckt/global"
|
||||
)
|
||||
|
||||
// 通知 结构体 Notice
|
||||
type Notice struct {
|
||||
global.GVA_MODEL
|
||||
Title *string `json:"title" form:"title" gorm:"column:title;comment:;" binding:"required"` //标题
|
||||
Content *string `json:"content" form:"content" gorm:"column:content;comment:;type:text;" binding:"required"` //内容
|
||||
Status *int `json:"status" form:"status" gorm:"column:status;comment:状态;"` //状态
|
||||
}
|
||||
|
||||
// TableName 通知 Notice自定义表名 notice
|
||||
func (Notice) TableName() string {
|
||||
return "notice"
|
||||
}
|
14
model/notice/request/notice.go
Normal file
14
model/notice/request/notice.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"git.echol.cn/loser/lckt/model/common/request"
|
||||
"time"
|
||||
)
|
||||
|
||||
type NoticeSearch struct {
|
||||
StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
|
||||
EndCreatedAt *time.Time `json:"endCreatedAt" form:"endCreatedAt"`
|
||||
request.PageInfo
|
||||
Sort string `json:"sort" form:"sort"`
|
||||
Order string `json:"order" form:"order"`
|
||||
}
|
Reference in New Issue
Block a user