package model

// 任务类型常量
const (
	TaskTypeAvatar   = "avatar"
	TaskTypeUsername = "username"
	TaskTypeBio      = "bio"
)

// TaskTypeNames 任务类型 → 中文名
var TaskTypeNames = map[string]string{
	TaskTypeAvatar:   "上传头像",
	TaskTypeUsername: "设置用户名",
	TaskTypeBio:      "设置个性签名",
}

// UserTask 用户首次完成任务记录（严格防重）
type UserTask struct {
	BaseModel

	UserID   uint   `gorm:"uniqueIndex:idx_user_task,priority:1;not null" json:"user_id"`
	TaskType string `gorm:"type:varchar(20);uniqueIndex:idx_user_task,priority:2;not null" json:"task_type"`
}
