package model import "time" type MarketingDownload struct { ID uint `json:"id" gorm:"primaryKey;comment:主键ID"` UserID uint `json:"user_id" gorm:"not null;index;comment:用户ID"` TemplateID uint `json:"template_id" gorm:"not null;index;comment:模板ID"` LogoURL string `json:"logo_url" gorm:"size:500;comment:用户Logo地址"` LogoX float64 `json:"logo_x" gorm:"comment:Logo X坐标(相对比例)"` LogoY float64 `json:"logo_y" gorm:"comment:Logo Y坐标(相对比例)"` LogoW float64 `json:"logo_w" gorm:"comment:Logo 宽度(相对比例)"` LogoH float64 `json:"logo_h" gorm:"comment:Logo 高度(相对比例)"` AdCompleted bool `json:"ad_completed" gorm:"default:false;comment:是否已观看广告"` CreatedAt time.Time `json:"created_at" gorm:"comment:创建时间"` Template *MarketingTemplate `json:"template,omitempty" gorm:"foreignKey:TemplateID"` } func (MarketingDownload) TableName() string { return "marketing_user_downloads" }