增加站内信未读提醒和后台通知中心+txt 校验

This commit is contained in:
yml2213
2026-06-19 15:24:15 +08:00
parent 8d5094a8d0
commit a4cdc3e806
30 changed files with 1836 additions and 53 deletions
+15
View File
@@ -17,3 +17,18 @@ type Notification struct {
func (Notification) TableName() string {
return "notifications"
}
type AdminNotification struct {
ID uint64 `gorm:"primaryKey" json:"id"`
AdminUserID uint64 `gorm:"not null;index" json:"admin_user_id"`
Type string `gorm:"size:32;not null" json:"type"`
Title string `gorm:"size:128;not null" json:"title"`
Content string `json:"content"`
IsRead bool `gorm:"not null;default:false" json:"is_read"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (AdminNotification) TableName() string {
return "admin_notifications"
}