first commit
This commit is contained in:
22
internal/models/site_settings.go
Normal file
22
internal/models/site_settings.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// SiteSettings model structure
|
||||
// Represents site-wide toggle settings.
|
||||
type SiteSettings struct {
|
||||
ID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey" json:"id"`
|
||||
IsActive bool `gorm:"default:true" json:"is_active"`
|
||||
SiteActive bool `gorm:"default:true" json:"site_active"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
// TableName overrides the table name used by SiteSettings to `site_settings`
|
||||
func (SiteSettings) TableName() string {
|
||||
return "site_settings"
|
||||
}
|
||||
Reference in New Issue
Block a user