17 lines
589 B
Go
17 lines
589 B
Go
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"
|
|
}
|