feat: add characters

This commit is contained in:
2026-07-10 00:56:03 +03:30
parent da6df0328f
commit fe0b63083c
19 changed files with 635 additions and 92 deletions
+4
View File
@@ -8,6 +8,7 @@ type Carpet struct {
Title string `json:"title"`
PriceCoins int64 `json:"price_coins"`
VIP bool `json:"vip"`
Img string `json:"img"` // URL کاملِ تصویرِ فرش (خالی برای classic که تصویری ندارد)
Owned bool `json:"owned"`
}
@@ -28,6 +29,9 @@ func (s *Service) Carpets(ctx context.Context, userID int64) ([]Carpet, error) {
return nil, err
}
c.VIP = vip == 1
if c.ID != "classic" {
c.Img = s.imgURL("carpets", c.ID+".jpg")
}
carpets = append(carpets, c)
}
if err := rows.Err(); err != nil {