124 lines
3.2 KiB
Go
124 lines
3.2 KiB
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type ValidOutcomeStatus struct {
|
|
Value OutcomeStatus
|
|
Valid bool // Valid is true if Value is not NULL
|
|
}
|
|
|
|
// ReportFilter contains filters for report generation
|
|
type ReportFilter struct {
|
|
StartTime ValidTime `json:"start_time"`
|
|
EndTime ValidTime `json:"end_time"`
|
|
CompanyID ValidInt64 `json:"company_id"`
|
|
BranchID ValidInt64 `json:"branch_id"`
|
|
UserID ValidInt64 `json:"user_id"`
|
|
SportID ValidString `json:"sport_id"`
|
|
Status ValidOutcomeStatus `json:"status"`
|
|
}
|
|
|
|
// BetStat represents aggregated bet statistics
|
|
type BetStat struct {
|
|
Date time.Time
|
|
TotalBets int64
|
|
TotalStakes Currency
|
|
TotalWins int64
|
|
TotalPayouts Currency
|
|
AverageOdds float64
|
|
}
|
|
|
|
// ExtremeValues represents extreme values in betting
|
|
type ExtremeValues struct {
|
|
HighestStake Currency
|
|
HighestPayout Currency
|
|
}
|
|
|
|
// CustomerBetActivity represents customer betting activity
|
|
type CustomerBetActivity struct {
|
|
CustomerID int64
|
|
TotalBets int64
|
|
TotalStakes Currency
|
|
TotalWins int64
|
|
TotalPayouts Currency
|
|
FirstBetDate time.Time
|
|
LastBetDate time.Time
|
|
AverageOdds float64
|
|
}
|
|
|
|
|
|
// BranchBetActivity represents branch betting activity
|
|
type BranchBetActivity struct {
|
|
BranchID int64
|
|
TotalBets int64
|
|
TotalStakes Currency
|
|
TotalWins int64
|
|
TotalPayouts Currency
|
|
}
|
|
|
|
// BranchDetail represents branch details
|
|
// type BranchDetail struct {
|
|
// Name string
|
|
// Location string
|
|
// ManagerName string
|
|
// }
|
|
|
|
// BranchTransactions represents branch transaction totals
|
|
type BranchTransactions struct {
|
|
Deposits Currency
|
|
Withdrawals Currency
|
|
}
|
|
|
|
// SportBetActivity represents sport betting activity
|
|
type SportBetActivity struct {
|
|
SportID string
|
|
TotalBets int64
|
|
TotalStakes Currency
|
|
TotalWins int64
|
|
TotalPayouts Currency
|
|
AverageOdds float64
|
|
}
|
|
|
|
// CustomerDetail represents customer details
|
|
type CustomerDetail struct {
|
|
Name string
|
|
}
|
|
|
|
// BalanceSummary represents wallet balance summary
|
|
type BalanceSummary struct {
|
|
TotalBalance Currency
|
|
ActiveBalance Currency
|
|
InactiveBalance Currency
|
|
BettableBalance Currency
|
|
NonBettableBalance Currency
|
|
}
|
|
|
|
// In your domain package
|
|
type CustomerPreferences struct {
|
|
FavoriteSport string `json:"favorite_sport"`
|
|
FavoriteMarket string `json:"favorite_market"`
|
|
}
|
|
|
|
type DashboardSummary struct {
|
|
TotalStakes Currency `json:"total_stakes"`
|
|
TotalBets int64 `json:"total_bets"`
|
|
ActiveBets int64 `json:"active_bets"`
|
|
WinBalance Currency `json:"win_balance"`
|
|
TotalWins int64 `json:"total_wins"`
|
|
TotalLosses int64 `json:"total_losses"`
|
|
CustomerCount int64 `json:"customer_count"`
|
|
Profit Currency `json:"profit"`
|
|
WinRate float64 `json:"win_rate"`
|
|
AverageStake Currency `json:"average_stake"`
|
|
TotalDeposits Currency `json:"total_deposits"`
|
|
TotalWithdrawals Currency `json:"total_withdrawals"`
|
|
ActiveCustomers int64 `json:"active_customers"`
|
|
BranchesCount int64 `json:"branches_count"`
|
|
ActiveBranches int64 `json:"active_branches"`
|
|
}
|
|
|
|
type ErrorResponse struct {
|
|
Message string `json:"message"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|