This commit is contained in:
2026-01-13 15:36:55 +03:00
parent 4925283ede
commit 9bd5354250
12 changed files with 56 additions and 5795 deletions

View File

@@ -8,6 +8,8 @@ import (
type Waifu struct {
ID int
OwnerID int
Owner *User
Name string
Rarity int
ExpBonus decimal.Decimal
@@ -15,9 +17,7 @@ type Waifu struct {
MarketPrice decimal.Decimal
Fandom string
Image string
OwnerID int
Owner *User
RpPrompt string
}
func GetAllWaifus() ([]*Waifu, error) {
@@ -50,7 +50,7 @@ func GetFreeWaifusWithRarity(rarity int) ([]*Waifu, error) {
return waifus, tx.Error
}
func GetWaifuById(id int) (*Waifu, error) {
func GetWaifuById(id uint) (*Waifu, error) {
waifu := new(Waifu)
tx := database.PostgresDatabase.Joins("Owner").Find(waifu, id)
return waifu, tx.Error