Refactor and remove sqlite and replace with MySQL

This commit is contained in:
2025-10-23 18:43:31 +01:00
parent d53e27eea8
commit 21ebc9c34b
139 changed files with 1013 additions and 529 deletions

32
internal/models/ticket.go Normal file
View File

@@ -0,0 +1,32 @@
package models
type Ticket struct {
Id int
UserId int
SyndicateId *int
GameType string
DrawDate string
Ball1 int
Ball2 int
Ball3 int
Ball4 int
Ball5 int
Ball6 int
Bonus1 *int
Bonus2 *int
PurchaseMethod string
PurchaseDate string
ImagePath string
Duplicate bool
MatchedMain int
MatchedBonus int
PrizeTier string
IsWinner bool
// Used only for display these are not stored in the DB, they mirror MatchTicket structure but are populated on read.
Balls []int
BonusBalls []int
MatchedDraw DrawResult
PrizeAmount float64 `db:"prize_amount"`
PrizeLabel string `db:"prize_label"`
}