🎨 新增公告通知模块

This commit is contained in:
2025-05-10 03:34:25 +08:00
parent bf220076dd
commit e074395859
15 changed files with 374 additions and 12 deletions

19
model/notice/notice.go Normal file
View 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"
}

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