package plant import ( "sundynix-go/global" "sundynix-go/model/system" ) type UserProfile struct { global.BaseModel UserId string `json:"userId" gorm:"index;column:user_id"` MiniOpenId string `gorm:"size:80;column:mini_open_id" json:"miniOpenId" form:"miniOpenId"` Nickname string `json:"nickname" gorm:"column:nick_name"` AvatarId string `json:"avatarId" gorm:"column:avatar_id"` LevelId string `json:"levelId" gorm:"column:level_id"` // 当前等级id CurrentSunlight int64 `json:"currentSunlight" gorm:"not null;default:0;column:current_sunlight"` // 当前持有阳光值 (可消耗) TotalSunlight int64 `json:"totalSunlight" gorm:"not null;default:0;column:total_sunlight"` // 历史累计阳光值 (用于计算等级) PlantCount int64 `json:"plantCount" gorm:"not null;default:0;column:plant_count"` CareCount int64 `json:"careCount" gorm:"not null;default:0;column:care_count"` PostCount int64 `json:"postCount" gorm:"not null;default:0;column:post_count"` WaterCount int64 `json:"waterCount" gorm:"not null;default:0;column:water_count"` // 浇水次数 FertilizeCount int64 `json:"fertilizeCount" gorm:"not null;default:0;column:fertilize_count"` // 施肥次数 RepotCount int64 `json:"repotCount" gorm:"not null;default:0;column:repot_count"` // 换盆次数 PruneCount int64 `json:"pruneCount" gorm:"not null;default:0;column:prune_count"` // 剪枝次数 PhotoCount int64 `json:"photoCount" gorm:"not null;default:0;column:photo_count"` // 拍照次数 Avatar *system.Oss `json:"avatar" gorm:"foreignKey:AvatarId"` Level *LevelConfig `json:"level" gorm:"foreignKey:LevelId"` }