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" }