// 每日进度表:sm_daily_progress package models import "gorm.io/gorm" type DailyProgress struct { gorm.Model UserID uint `gorm:"column:user_id;type:bigint unsigned;not null;uniqueIndex:idx_user_date;comment:用户ID" json:"user_id" db:"user_id"` RecordDate string `gorm:"column:record_date;type:varchar(10);not null;uniqueIndex:idx_user_date;comment:日期 yyyy-MM-dd" json:"record_date" db:"record_date"` TaskCount int `gorm:"column:task_count;type:int;default:0;comment:完成任务数" json:"task_count" db:"task_count"` TotalTasks int `gorm:"column:total_tasks;type:int;default:0;comment:当日待办总数" json:"total_tasks" db:"total_tasks"` BillCount int `gorm:"column:bill_count;type:int;default:0;comment:记账笔数" json:"bill_count" db:"bill_count"` MoodRecorded bool `gorm:"column:mood_recorded;type:tinyint(1);default:0;comment:是否记录心情" json:"mood_recorded" db:"mood_recorded"` MoodType string `gorm:"column:mood_type;type:varchar(20);default:'';comment:心情类型 happy/normal/sad" json:"mood_type" db:"mood_type"` ReviewRecorded bool `gorm:"column:review_recorded;type:tinyint(1);default:0;comment:是否复盘" json:"review_recorded" db:"review_recorded"` PerfectDay bool `gorm:"column:perfect_day;type:tinyint(1);default:0;comment:是否完美一天(100%完成待办)" json:"perfect_day" db:"perfect_day"` DailyExp int `gorm:"column:daily_exp;type:int;default:0;comment:今日获得经验" json:"daily_exp" db:"daily_exp"` ExpBreakdown string `gorm:"column:exp_breakdown;type:varchar(200);default:'';comment:经验构成JSON" json:"exp_breakdown" db:"exp_breakdown"` }