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" }
|
||||
@@ -187,6 +187,12 @@ type Settings struct {
|
||||
AdditionalMeta string `gorm:"type:text" json:"additional_meta"` // raw extra meta
|
||||
EnableIndexing bool `json:"enable_indexing"` // robots allow/disallow
|
||||
|
||||
// Deployment base URLs (optional runtime hints)
|
||||
// FrontendBaseURL: e.g. https://club.example.com
|
||||
FrontendBaseURL string `json:"frontend_base_url"`
|
||||
// APIBaseURL: full API root, e.g. https://api.example.com/api/v1 or https://backend.example.com/api/v1
|
||||
APIBaseURL string `json:"api_base_url"`
|
||||
|
||||
// Social profiles
|
||||
FacebookURL string `json:"facebook_url"`
|
||||
InstagramURL string `json:"instagram_url"`
|
||||
@@ -241,6 +247,9 @@ type Settings struct {
|
||||
ContactCountry string `json:"contact_country"`
|
||||
ContactPhone string `json:"contact_phone"`
|
||||
ContactEmail string `json:"contact_email"`
|
||||
// Contact form auto-forwarding
|
||||
ContactForwardEnabled bool `json:"contact_forward_enabled"`
|
||||
ContactForwardList string `gorm:"type:text" json:"contact_forward_list"` // comma/space/semicolon-separated emails
|
||||
LocationLatitude float64 `json:"location_latitude"`
|
||||
LocationLongitude float64 `json:"location_longitude"`
|
||||
MapZoomLevel int `gorm:"default:15" json:"map_zoom_level"`
|
||||
|
||||
Reference in New Issue
Block a user