feat: 新增路由配置、通知和公告功能,并初始化相关服务和仓库。
This commit is contained in:
16
internal/models/announcement.go
Normal file
16
internal/models/announcement.go
Normal 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"
|
||||
}
|
||||
@@ -887,6 +887,7 @@ func AllModels() []interface{} {
|
||||
&TransactionImage{}, // Feature: accounting-feature-upgrade
|
||||
&UserSettings{}, // Feature: accounting-feature-upgrade
|
||||
&Notification{}, // Feature: notification-center
|
||||
&Announcement{}, // Feature: notification-center (broadcast history)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user