mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 02:32:57 +00:00
18 lines
608 B
Go
18 lines
608 B
Go
package models
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
type Banner struct {
|
|
gorm.Model
|
|
Name string `json:"name" gorm:"not null"`
|
|
ImageURL string `json:"image_url"`
|
|
ClickURL string `json:"click_url"`
|
|
Placement string `json:"placement" gorm:"index"` // e.g., homepage_top, homepage_sidebar, homepage_under_table
|
|
Width int `json:"width"`
|
|
Height int `json:"height"`
|
|
IsActive bool `json:"is_active" gorm:"default:true;index"`
|
|
DisplayOrder int `json:"display_order" gorm:"default:0;index"`
|
|
}
|
|
|
|
func (Banner) TableName() string { return "banners" }
|