feat(#22): gamificação RPG — XP, quests, conquistas, cosméticos e personagem SVG pixel art

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
2026-05-26 21:46:41 -03:00
co-authored by Claude Sonnet 4.6
parent 9a964423fd
commit c1964ea036
21 changed files with 1346 additions and 10 deletions
+69
View File
@@ -0,0 +1,69 @@
package model
type PlayerProfile struct {
ID int `json:"id"`
Level int `json:"level"`
XP int `json:"xp"`
XPToNext int `json:"xp_to_next"`
}
type XPEvent struct {
ID int `json:"id"`
EventType string `json:"event_type"`
XPEarned int `json:"xp_earned"`
Description string `json:"description"`
CreatedAt string `json:"created_at"`
}
type Quest struct {
ID int `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
QuestType string `json:"quest_type"`
TargetCount *int `json:"target_count"`
TargetPct *float64 `json:"target_pct"`
XPReward int `json:"xp_reward"`
}
type PlayerQuest struct {
ID int `json:"id"`
QuestID int `json:"quest_id"`
Title string `json:"title"`
QuestType string `json:"quest_type"`
TargetCount *int `json:"target_count"`
TargetPct *float64 `json:"target_pct"`
XPReward int `json:"xp_reward"`
Period string `json:"period"`
CurrentCount int `json:"current_count"`
CurrentPct float64 `json:"current_pct"`
Completed bool `json:"completed"`
Claimed bool `json:"claimed"`
}
type Achievement struct {
ID int `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Icon string `json:"icon"`
XPReward int `json:"xp_reward"`
UnlockCondition string `json:"unlock_condition"`
Earned bool `json:"earned"`
EarnedAt string `json:"earned_at,omitempty"`
}
type Cosmetic struct {
ID int `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
UnlockLevel int `json:"unlock_level"`
CSSData string `json:"css_data"`
Unlocked bool `json:"unlocked"`
Equipped bool `json:"equipped"`
}
type GameSummary struct {
Profile PlayerProfile `json:"profile"`
ActiveQuests []PlayerQuest `json:"active_quests"`
RecentAchievements []Achievement `json:"recent_achievements"`
EquippedCosmetics []Cosmetic `json:"equipped_cosmetics"`
}