first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 21:35:24 +03:00
commit bbbf76b184
592 changed files with 246870 additions and 0 deletions

30
internal/models/banner.go Normal file
View File

@@ -0,0 +1,30 @@
package models
import (
"time"
"github.com/google/uuid"
)
// Banner model structure
// Represents a banner item with optional thumbnail.
type Banner struct {
ID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey" json:"id"`
Color string `gorm:"type:varchar(32);not null" json:"color"`
Title string `gorm:"type:varchar(254)" json:"title,omitempty"`
Text1 string `gorm:"type:varchar(254)" json:"text1,omitempty"`
Text2 string `gorm:"type:varchar(254)" json:"text2,omitempty"`
Text4 string `gorm:"type:varchar(254)" json:"text4,omitempty"`
Text5 string `gorm:"type:varchar(254)" json:"text5,omitempty"`
Image string `gorm:"type:text;not null" json:"image"`
ImageK string `gorm:"type:text" json:"image_k,omitempty"`
ImageKTxt string `gorm:"type:varchar(254)" json:"image_k_txt,omitempty"`
IsActive bool `gorm:"default:true" json:"is_active"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
// TableName overrides the table name used by Banner to `banners`
func (Banner) TableName() string {
return "banners"
}