Files
sale/backend/internal/models/announcement.go
T
nuyue 43009ec3b9
Build and Push Docker Image / build-and-push (push) Successful in 1m3s
Build and Push Docker Image / deploy (push) Successful in 7s
feat: add announcement feature with admin management and home page display
2026-07-16 15:28:37 +08:00

22 lines
601 B
Go

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"
}