[raffle] Fix: Send ID as string

in order to be able to transport big uint64 through JSON

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-08-11 00:59:46 +02:00
parent 4964ed25cf
commit e8d60e2733
Signed by: luzifer
SSH Key Fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E

View File

@ -28,7 +28,7 @@ type (
} }
raffle struct { raffle struct {
ID uint64 `gorm:"primaryKey" json:"id"` ID uint64 `gorm:"primaryKey" json:"id,string"`
Channel string `json:"channel"` Channel string `json:"channel"`
Keyword string `json:"keyword"` Keyword string `json:"keyword"`
@ -67,7 +67,7 @@ type (
} }
raffleEntry struct { raffleEntry struct {
ID uint64 `gorm:"primaryKey" json:"id"` ID uint64 `gorm:"primaryKey" json:"id,string"`
RaffleID uint64 `gorm:"uniqueIndex:user_per_raffle" json:"-"` RaffleID uint64 `gorm:"uniqueIndex:user_per_raffle" json:"-"`
UserID string `gorm:"size:128;uniqueIndex:user_per_raffle" json:"userID"` UserID string `gorm:"size:128;uniqueIndex:user_per_raffle" json:"userID"`