feat: 新增路由配置、通知和公告功能,并初始化相关服务和仓库。

This commit is contained in:
2026-02-02 17:13:33 +08:00
parent 4b2355deee
commit 948be39286
8 changed files with 220 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
package models
// Announcement represents a system-wide broadcast message
type Announcement struct {
BaseModel
Title string `gorm:"size:200;not null" json:"title"`
Content string `gorm:"type:text;not null" json:"content"`
Type NotificationType `gorm:"size:30;not null;default:'system'" json:"type"`
SentCount int `gorm:"default:0" json:"sent_count"`
CreatedBy uint `gorm:"not null" json:"created_by"`
}
// TableName specifies the table name for Announcement
func (Announcement) TableName() string {
return "announcements"
}