package models import ( "time" "gorm.io/gorm" ) type Announcement struct { ID uint `gorm:"primaryKey" json:"id"` Title string `gorm:"size:255;not null" json:"title"` Content string `gorm:"type:text" json:"content"` SortOrder int `gorm:"default:0" json:"sort_order"` IsActive bool `gorm:"default:true" json:"is_active"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` } func (Announcement) TableName() string { return "announcements" }