package model import ( "time" "gorm.io/gorm" ) // SmokeMotivationQuote 存储不同场景的激励语模板(可附带 AI 提示词)。 type SmokeMotivationQuote struct { ID uint `gorm:"primaryKey;autoIncrement;comment:记录ID" json:"id"` Scene string `gorm:"column:scene;size:40;index:idx_smoke_motivation_scene;comment:场景类型" json:"scene"` Type string `gorm:"column:type;size:30;comment:文案类型" json:"type"` Message string `gorm:"column:message;type:text;comment:展示文案" json:"message"` AIPrompt string `gorm:"column:ai_prompt;type:text;comment:AI提示词" json:"ai_prompt,omitempty"` Enabled bool `gorm:"column:enabled;default:true;comment:是否启用" json:"enabled"` Weight int `gorm:"column:weight;default:1;comment:权重(越大越优先)" json:"weight"` CreatedAt time.Time `gorm:"comment:创建时间" json:"created_at"` UpdatedAt time.Time `gorm:"comment:更新时间" json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"index;comment:删除时间" json:"-"` } func (SmokeMotivationQuote) TableName() string { return "fa_smoke_motivation_quote" } func (SmokeMotivationQuote) TableComment() string { return "戒烟-激励语模板" }