mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 02:32:57 +00:00
22 lines
650 B
Go
22 lines
650 B
Go
package models
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
// Clothing represents a merchandising item
|
|
type Clothing struct {
|
|
gorm.Model
|
|
Title string `gorm:"not null" json:"title"`
|
|
Description string `gorm:"type:text" json:"description"`
|
|
Price float64 `json:"price"`
|
|
Currency string `gorm:"default:'Kč'" json:"currency"`
|
|
ImageURL string `json:"image_url"`
|
|
URL string `json:"url"`
|
|
IsActive bool `gorm:"default:true" json:"is_active"`
|
|
DisplayOrder int `gorm:"default:0" json:"display_order"`
|
|
}
|
|
|
|
// TableName specifies the table name for the Clothing model
|
|
func (Clothing) TableName() string {
|
|
return "clothing"
|
|
}
|