Files
MyClub/internal/models/qr_code.go
T
Tomas Dvorak dfc079288f hot fix #1
2026-01-26 08:13:18 +01:00

22 lines
628 B
Go

package models
import (
"time"
)
type QRCode struct {
ID uint `json:"id" gorm:"primaryKey"`
Name string `json:"name" gorm:"not null;size:255"`
Description string `json:"description" gorm:"type:text"`
TargetURL string `json:"target_url" gorm:"not null;size:500"`
QRCodeURL string `json:"qr_code_url" gorm:"size:500"`
ScanCount int `json:"scan_count" gorm:"default:0"`
IsActive bool `json:"is_active" gorm:"default:true"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (QRCode) TableName() string {
return "qr_codes"
}