mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 02:32:57 +00:00
dev day #75
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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" }
|
||||
Reference in New Issue
Block a user