Yimaru-BackEnd/internal/domain/bet.go

28 lines
502 B
Go

package domain
type BetStatus int
const (
BET_STATUS_PENDING BetStatus = iota
BET_STATUS_WIN
BET_STATUS_LOSS
BET_STATUS_ERROR
)
type Bet struct {
ID int64
Outcome []Outcome
Amount Currency
TotalOdds float32
Status BetStatus
FullName string
PhoneNumber string
BranchID ValidInt64 // Can Be Nullable
UserID ValidInt64 // Can Be Nullable
CashedOut bool
}
func (b BetStatus) String() string {
return []string{"Pending", "Win", "Loss", "Error"}[b]
}