Yimaru-BackEnd/gen/db/models.go

753 lines
31 KiB
Go

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.29.0
package dbgen
import (
"database/sql/driver"
"fmt"
"github.com/jackc/pgx/v5/pgtype"
)
type Referralstatus string
const (
ReferralstatusPENDING Referralstatus = "PENDING"
ReferralstatusCOMPLETED Referralstatus = "COMPLETED"
ReferralstatusEXPIRED Referralstatus = "EXPIRED"
ReferralstatusCANCELLED Referralstatus = "CANCELLED"
)
func (e *Referralstatus) Scan(src interface{}) error {
switch s := src.(type) {
case []byte:
*e = Referralstatus(s)
case string:
*e = Referralstatus(s)
default:
return fmt.Errorf("unsupported scan type for Referralstatus: %T", src)
}
return nil
}
type NullReferralstatus struct {
Referralstatus Referralstatus `json:"referralstatus"`
Valid bool `json:"valid"` // Valid is true if Referralstatus is not NULL
}
// Scan implements the Scanner interface.
func (ns *NullReferralstatus) Scan(value interface{}) error {
if value == nil {
ns.Referralstatus, ns.Valid = "", false
return nil
}
ns.Valid = true
return ns.Referralstatus.Scan(value)
}
// Value implements the driver Valuer interface.
func (ns NullReferralstatus) Value() (driver.Value, error) {
if !ns.Valid {
return nil, nil
}
return string(ns.Referralstatus), nil
}
type Bank struct {
ID int64 `json:"id"`
Slug string `json:"slug"`
Swift string `json:"swift"`
Name string `json:"name"`
AcctLength int32 `json:"acct_length"`
CountryID int32 `json:"country_id"`
IsMobilemoney pgtype.Int4 `json:"is_mobilemoney"`
IsActive int32 `json:"is_active"`
IsRtgs int32 `json:"is_rtgs"`
Active int32 `json:"active"`
Is24hrs pgtype.Int4 `json:"is_24hrs"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
Currency string `json:"currency"`
BankLogo pgtype.Text `json:"bank_logo"`
}
type Bet struct {
ID int64 `json:"id"`
Amount int64 `json:"amount"`
TotalOdds float32 `json:"total_odds"`
Status int32 `json:"status"`
UserID int64 `json:"user_id"`
IsShopBet bool `json:"is_shop_bet"`
CashedOut bool `json:"cashed_out"`
OutcomesHash string `json:"outcomes_hash"`
FastCode string `json:"fast_code"`
Processed bool `json:"processed"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type BetOutcome struct {
ID int64 `json:"id"`
BetID int64 `json:"bet_id"`
SportID int64 `json:"sport_id"`
EventID int64 `json:"event_id"`
OddID int64 `json:"odd_id"`
HomeTeamName string `json:"home_team_name"`
AwayTeamName string `json:"away_team_name"`
MarketID int64 `json:"market_id"`
MarketName string `json:"market_name"`
Odd float32 `json:"odd"`
OddName string `json:"odd_name"`
OddHeader string `json:"odd_header"`
OddHandicap string `json:"odd_handicap"`
Status int32 `json:"status"`
Expires pgtype.Timestamp `json:"expires"`
}
type BetWithOutcome struct {
ID int64 `json:"id"`
Amount int64 `json:"amount"`
TotalOdds float32 `json:"total_odds"`
Status int32 `json:"status"`
UserID int64 `json:"user_id"`
IsShopBet bool `json:"is_shop_bet"`
CashedOut bool `json:"cashed_out"`
OutcomesHash string `json:"outcomes_hash"`
FastCode string `json:"fast_code"`
Processed bool `json:"processed"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
FullName interface{} `json:"full_name"`
PhoneNumber pgtype.Text `json:"phone_number"`
Outcomes []BetOutcome `json:"outcomes"`
}
type Bonu struct {
ID int64 `json:"id"`
Multiplier float32 `json:"multiplier"`
BalanceCap int64 `json:"balance_cap"`
}
type Branch struct {
ID int64 `json:"id"`
Name string `json:"name"`
Location string `json:"location"`
ProfitPercent float32 `json:"profit_percent"`
IsActive bool `json:"is_active"`
WalletID int64 `json:"wallet_id"`
BranchManagerID int64 `json:"branch_manager_id"`
CompanyID int64 `json:"company_id"`
IsSelfOwned bool `json:"is_self_owned"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type BranchCashier struct {
ID int64 `json:"id"`
UserID int64 `json:"user_id"`
BranchID int64 `json:"branch_id"`
}
type BranchDetail struct {
ID int64 `json:"id"`
Name string `json:"name"`
Location string `json:"location"`
ProfitPercent float32 `json:"profit_percent"`
IsActive bool `json:"is_active"`
WalletID int64 `json:"wallet_id"`
BranchManagerID int64 `json:"branch_manager_id"`
CompanyID int64 `json:"company_id"`
IsSelfOwned bool `json:"is_self_owned"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
ManagerName interface{} `json:"manager_name"`
ManagerPhoneNumber pgtype.Text `json:"manager_phone_number"`
Balance pgtype.Int8 `json:"balance"`
WalletIsActive pgtype.Bool `json:"wallet_is_active"`
}
type BranchLocation struct {
Key string `json:"key"`
Value string `json:"value"`
}
type BranchOperation struct {
ID int64 `json:"id"`
OperationID int64 `json:"operation_id"`
BranchID int64 `json:"branch_id"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type CompaniesDetail struct {
ID int64 `json:"id"`
Name string `json:"name"`
AdminID int64 `json:"admin_id"`
WalletID int64 `json:"wallet_id"`
DeductedPercentage float32 `json:"deducted_percentage"`
IsActive bool `json:"is_active"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
Balance int64 `json:"balance"`
WalletIsActive bool `json:"wallet_is_active"`
AdminFirstName string `json:"admin_first_name"`
AdminLastName string `json:"admin_last_name"`
AdminPhoneNumber pgtype.Text `json:"admin_phone_number"`
}
type Company struct {
ID int64 `json:"id"`
Name string `json:"name"`
AdminID int64 `json:"admin_id"`
WalletID int64 `json:"wallet_id"`
DeductedPercentage float32 `json:"deducted_percentage"`
IsActive bool `json:"is_active"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type CustomerWallet struct {
ID int64 `json:"id"`
CustomerID int64 `json:"customer_id"`
RegularWalletID int64 `json:"regular_wallet_id"`
StaticWalletID int64 `json:"static_wallet_id"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type CustomerWalletDetail struct {
ID int64 `json:"id"`
CustomerID int64 `json:"customer_id"`
RegularID int64 `json:"regular_id"`
RegularBalance int64 `json:"regular_balance"`
StaticID int64 `json:"static_id"`
StaticBalance int64 `json:"static_balance"`
RegularIsActive bool `json:"regular_is_active"`
StaticIsActive bool `json:"static_is_active"`
RegularUpdatedAt pgtype.Timestamp `json:"regular_updated_at"`
StaticUpdatedAt pgtype.Timestamp `json:"static_updated_at"`
CreatedAt pgtype.Timestamp `json:"created_at"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
PhoneNumber pgtype.Text `json:"phone_number"`
}
type DirectDeposit struct {
ID int64 `json:"id"`
CustomerID int64 `json:"customer_id"`
WalletID int64 `json:"wallet_id"`
Amount pgtype.Numeric `json:"amount"`
BankReference string `json:"bank_reference"`
SenderAccount string `json:"sender_account"`
Status string `json:"status"`
CreatedAt pgtype.Timestamp `json:"created_at"`
VerifiedBy pgtype.Int8 `json:"verified_by"`
VerificationNotes pgtype.Text `json:"verification_notes"`
VerifiedAt pgtype.Timestamp `json:"verified_at"`
}
type Event struct {
ID string `json:"id"`
SportID pgtype.Int4 `json:"sport_id"`
MatchName pgtype.Text `json:"match_name"`
HomeTeam pgtype.Text `json:"home_team"`
AwayTeam pgtype.Text `json:"away_team"`
HomeTeamID pgtype.Int4 `json:"home_team_id"`
AwayTeamID pgtype.Int4 `json:"away_team_id"`
HomeKitImage pgtype.Text `json:"home_kit_image"`
AwayKitImage pgtype.Text `json:"away_kit_image"`
LeagueID pgtype.Int4 `json:"league_id"`
LeagueName pgtype.Text `json:"league_name"`
LeagueCc pgtype.Text `json:"league_cc"`
StartTime pgtype.Timestamp `json:"start_time"`
Score pgtype.Text `json:"score"`
MatchMinute pgtype.Int4 `json:"match_minute"`
TimerStatus pgtype.Text `json:"timer_status"`
AddedTime pgtype.Int4 `json:"added_time"`
MatchPeriod pgtype.Int4 `json:"match_period"`
IsLive pgtype.Bool `json:"is_live"`
Status pgtype.Text `json:"status"`
FetchedAt pgtype.Timestamp `json:"fetched_at"`
Source pgtype.Text `json:"source"`
IsFeatured bool `json:"is_featured"`
IsActive bool `json:"is_active"`
}
type ExchangeRate struct {
ID int32 `json:"id"`
FromCurrency string `json:"from_currency"`
ToCurrency string `json:"to_currency"`
Rate pgtype.Numeric `json:"rate"`
ValidUntil pgtype.Timestamp `json:"valid_until"`
CreatedAt pgtype.Timestamp `json:"created_at"`
}
type FavoriteGame struct {
ID int64 `json:"id"`
UserID int64 `json:"user_id"`
GameID int64 `json:"game_id"`
CreatedAt pgtype.Timestamp `json:"created_at"`
}
type Flag struct {
ID int64 `json:"id"`
BetID pgtype.Int8 `json:"bet_id"`
OddID pgtype.Int8 `json:"odd_id"`
Reason pgtype.Text `json:"reason"`
FlaggedAt pgtype.Timestamp `json:"flagged_at"`
Resolved pgtype.Bool `json:"resolved"`
}
type League struct {
ID int64 `json:"id"`
Name string `json:"name"`
Img pgtype.Text `json:"img"`
CountryCode pgtype.Text `json:"country_code"`
Bet365ID pgtype.Int4 `json:"bet365_id"`
SportID int32 `json:"sport_id"`
IsActive pgtype.Bool `json:"is_active"`
IsFeatured pgtype.Bool `json:"is_featured"`
}
type Notification struct {
ID string `json:"id"`
RecipientID int64 `json:"recipient_id"`
Type string `json:"type"`
Level string `json:"level"`
ErrorSeverity pgtype.Text `json:"error_severity"`
Reciever string `json:"reciever"`
IsRead bool `json:"is_read"`
DeliveryStatus string `json:"delivery_status"`
DeliveryChannel pgtype.Text `json:"delivery_channel"`
Payload []byte `json:"payload"`
Priority pgtype.Int4 `json:"priority"`
Version int32 `json:"version"`
Timestamp pgtype.Timestamptz `json:"timestamp"`
Metadata []byte `json:"metadata"`
}
type Odd struct {
ID int32 `json:"id"`
EventID pgtype.Text `json:"event_id"`
Fi pgtype.Text `json:"fi"`
MarketType string `json:"market_type"`
MarketName pgtype.Text `json:"market_name"`
MarketCategory pgtype.Text `json:"market_category"`
MarketID pgtype.Text `json:"market_id"`
Name pgtype.Text `json:"name"`
Handicap pgtype.Text `json:"handicap"`
OddsValue pgtype.Float8 `json:"odds_value"`
Section string `json:"section"`
Category pgtype.Text `json:"category"`
RawOdds []byte `json:"raw_odds"`
FetchedAt pgtype.Timestamp `json:"fetched_at"`
Source pgtype.Text `json:"source"`
IsActive pgtype.Bool `json:"is_active"`
}
type Otp struct {
ID int64 `json:"id"`
SentTo string `json:"sent_to"`
Medium string `json:"medium"`
OtpFor string `json:"otp_for"`
Otp string `json:"otp"`
Used bool `json:"used"`
UsedAt pgtype.Timestamptz `json:"used_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
}
type Referral struct {
ID int64 `json:"id"`
ReferralCode string `json:"referral_code"`
ReferrerID string `json:"referrer_id"`
ReferredID pgtype.Text `json:"referred_id"`
Status Referralstatus `json:"status"`
RewardAmount pgtype.Numeric `json:"reward_amount"`
CashbackAmount pgtype.Numeric `json:"cashback_amount"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
}
type ReferralSetting struct {
ID int64 `json:"id"`
ReferralRewardAmount pgtype.Numeric `json:"referral_reward_amount"`
CashbackPercentage pgtype.Numeric `json:"cashback_percentage"`
BetReferralBonusPercentage pgtype.Numeric `json:"bet_referral_bonus_percentage"`
MaxReferrals int32 `json:"max_referrals"`
ExpiresAfterDays int32 `json:"expires_after_days"`
UpdatedBy string `json:"updated_by"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
Version int32 `json:"version"`
}
type RefreshToken struct {
ID int64 `json:"id"`
UserID int64 `json:"user_id"`
Token string `json:"token"`
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
Revoked bool `json:"revoked"`
}
type ReportedIssue struct {
ID int64 `json:"id"`
UserID int64 `json:"user_id"`
UserRole string `json:"user_role"`
Subject string `json:"subject"`
Description string `json:"description"`
IssueType string `json:"issue_type"`
Status string `json:"status"`
Metadata []byte `json:"metadata"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type Result struct {
ID int64 `json:"id"`
BetOutcomeID int64 `json:"bet_outcome_id"`
EventID int64 `json:"event_id"`
OddID int64 `json:"odd_id"`
MarketID int64 `json:"market_id"`
Status int32 `json:"status"`
Score pgtype.Text `json:"score"`
FullTimeScore pgtype.Text `json:"full_time_score"`
HalfTimeScore pgtype.Text `json:"half_time_score"`
Ss pgtype.Text `json:"ss"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type Setting struct {
Key string `json:"key"`
Value string `json:"value"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type ShopBet struct {
ID int64 `json:"id"`
ShopTransactionID int64 `json:"shop_transaction_id"`
CashoutID string `json:"cashout_id"`
CashedOutBy pgtype.Int8 `json:"cashed_out_by"`
BetID int64 `json:"bet_id"`
NumberOfOutcomes int64 `json:"number_of_outcomes"`
CashedOut bool `json:"cashed_out"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type ShopBetDetail struct {
ID int64 `json:"id"`
ShopTransactionID int64 `json:"shop_transaction_id"`
CashoutID string `json:"cashout_id"`
CashedOutBy pgtype.Int8 `json:"cashed_out_by"`
BetID int64 `json:"bet_id"`
NumberOfOutcomes int64 `json:"number_of_outcomes"`
CashedOut bool `json:"cashed_out"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
CustomerFullName string `json:"customer_full_name"`
CustomerPhoneNumber string `json:"customer_phone_number"`
BranchID int64 `json:"branch_id"`
CompanyID int64 `json:"company_id"`
Amount int64 `json:"amount"`
TransactionVerified bool `json:"transaction_verified"`
Status int32 `json:"status"`
TotalOdds float32 `json:"total_odds"`
Outcomes []BetOutcome `json:"outcomes"`
}
type ShopDeposit struct {
ID int64 `json:"id"`
ShopTransactionID int64 `json:"shop_transaction_id"`
CustomerID int64 `json:"customer_id"`
WalletTransferID pgtype.Int8 `json:"wallet_transfer_id"`
BranchWalletID int64 `json:"branch_wallet_id"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type ShopDepositDetail struct {
ID int64 `json:"id"`
ShopTransactionID int64 `json:"shop_transaction_id"`
CustomerID int64 `json:"customer_id"`
WalletTransferID pgtype.Int8 `json:"wallet_transfer_id"`
BranchWalletID int64 `json:"branch_wallet_id"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
FullName string `json:"full_name"`
PhoneNumber string `json:"phone_number"`
BranchID int64 `json:"branch_id"`
CompanyID int64 `json:"company_id"`
Amount int64 `json:"amount"`
TransactionVerified bool `json:"transaction_verified"`
}
type ShopTransaction struct {
ID int64 `json:"id"`
Amount int64 `json:"amount"`
BranchID int64 `json:"branch_id"`
CompanyID int64 `json:"company_id"`
UserID int64 `json:"user_id"`
Type int64 `json:"type"`
FullName string `json:"full_name"`
PhoneNumber string `json:"phone_number"`
PaymentOption int64 `json:"payment_option"`
BankCode pgtype.Text `json:"bank_code"`
BeneficiaryName pgtype.Text `json:"beneficiary_name"`
AccountName pgtype.Text `json:"account_name"`
AccountNumber pgtype.Text `json:"account_number"`
ReferenceNumber pgtype.Text `json:"reference_number"`
ApprovedBy pgtype.Int8 `json:"approved_by"`
Verified bool `json:"verified"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type ShopTransactionDetail struct {
ID int64 `json:"id"`
Amount int64 `json:"amount"`
BranchID int64 `json:"branch_id"`
CompanyID int64 `json:"company_id"`
UserID int64 `json:"user_id"`
Type int64 `json:"type"`
FullName string `json:"full_name"`
PhoneNumber string `json:"phone_number"`
PaymentOption int64 `json:"payment_option"`
BankCode pgtype.Text `json:"bank_code"`
BeneficiaryName pgtype.Text `json:"beneficiary_name"`
AccountName pgtype.Text `json:"account_name"`
AccountNumber pgtype.Text `json:"account_number"`
ReferenceNumber pgtype.Text `json:"reference_number"`
ApprovedBy pgtype.Int8 `json:"approved_by"`
Verified bool `json:"verified"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
CreatorFirstName pgtype.Text `json:"creator_first_name"`
CreatorLastName pgtype.Text `json:"creator_last_name"`
CreatorPhoneNumber pgtype.Text `json:"creator_phone_number"`
ApproverFirstName pgtype.Text `json:"approver_first_name"`
ApproverLastName pgtype.Text `json:"approver_last_name"`
ApproverPhoneNumber pgtype.Text `json:"approver_phone_number"`
BranchName pgtype.Text `json:"branch_name"`
BranchLocation pgtype.Text `json:"branch_location"`
}
type SupportedOperation struct {
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
}
type Team struct {
ID string `json:"id"`
TeamName string `json:"team_name"`
Country pgtype.Text `json:"country"`
Bet365ID pgtype.Int4 `json:"bet365_id"`
LogoUrl pgtype.Text `json:"logo_url"`
}
type Ticket struct {
ID int64 `json:"id"`
Amount int64 `json:"amount"`
TotalOdds float32 `json:"total_odds"`
Ip string `json:"ip"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type TicketOutcome struct {
ID int64 `json:"id"`
TicketID int64 `json:"ticket_id"`
EventID int64 `json:"event_id"`
OddID int64 `json:"odd_id"`
HomeTeamName string `json:"home_team_name"`
AwayTeamName string `json:"away_team_name"`
MarketID int64 `json:"market_id"`
MarketName string `json:"market_name"`
Odd float32 `json:"odd"`
OddName string `json:"odd_name"`
OddHeader string `json:"odd_header"`
OddHandicap string `json:"odd_handicap"`
Status int32 `json:"status"`
Expires pgtype.Timestamp `json:"expires"`
}
type TicketWithOutcome struct {
ID int64 `json:"id"`
Amount int64 `json:"amount"`
TotalOdds float32 `json:"total_odds"`
Ip string `json:"ip"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
Outcomes []TicketOutcome `json:"outcomes"`
}
type User struct {
ID int64 `json:"id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Email pgtype.Text `json:"email"`
PhoneNumber pgtype.Text `json:"phone_number"`
Role string `json:"role"`
Password []byte `json:"password"`
EmailVerified bool `json:"email_verified"`
PhoneVerified bool `json:"phone_verified"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
CompanyID pgtype.Int8 `json:"company_id"`
SuspendedAt pgtype.Timestamptz `json:"suspended_at"`
Suspended bool `json:"suspended"`
ReferralCode pgtype.Text `json:"referral_code"`
ReferredBy pgtype.Text `json:"referred_by"`
}
type UserGameInteraction struct {
ID int64 `json:"id"`
UserID int64 `json:"user_id"`
GameID int64 `json:"game_id"`
InteractionType string `json:"interaction_type"`
Amount pgtype.Numeric `json:"amount"`
DurationSeconds pgtype.Int4 `json:"duration_seconds"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type VirtualGame struct {
ID int64 `json:"id"`
Name string `json:"name"`
Provider string `json:"provider"`
Category pgtype.Text `json:"category"`
MinBet pgtype.Numeric `json:"min_bet"`
MaxBet pgtype.Numeric `json:"max_bet"`
Volatility pgtype.Text `json:"volatility"`
IsActive bool `json:"is_active"`
Rtp pgtype.Numeric `json:"rtp"`
IsFeatured bool `json:"is_featured"`
PopularityScore pgtype.Int4 `json:"popularity_score"`
ThumbnailUrl pgtype.Text `json:"thumbnail_url"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type VirtualGameHistory struct {
ID int64 `json:"id"`
SessionID pgtype.Text `json:"session_id"`
UserID int64 `json:"user_id"`
CompanyID pgtype.Int8 `json:"company_id"`
Provider pgtype.Text `json:"provider"`
WalletID pgtype.Int8 `json:"wallet_id"`
GameID pgtype.Int8 `json:"game_id"`
TransactionType string `json:"transaction_type"`
Amount int64 `json:"amount"`
Currency string `json:"currency"`
ExternalTransactionID string `json:"external_transaction_id"`
ReferenceTransactionID pgtype.Text `json:"reference_transaction_id"`
Status string `json:"status"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type VirtualGameProvider struct {
ID int64 `json:"id"`
ProviderID string `json:"provider_id"`
ProviderName string `json:"provider_name"`
LogoDark pgtype.Text `json:"logo_dark"`
LogoLight pgtype.Text `json:"logo_light"`
Enabled bool `json:"enabled"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type VirtualGameSession struct {
ID int64 `json:"id"`
UserID int64 `json:"user_id"`
GameID string `json:"game_id"`
SessionToken string `json:"session_token"`
Currency string `json:"currency"`
Status string `json:"status"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
}
type VirtualGameTransaction struct {
ID int64 `json:"id"`
SessionID int64 `json:"session_id"`
UserID int64 `json:"user_id"`
CompanyID pgtype.Int8 `json:"company_id"`
Provider pgtype.Text `json:"provider"`
GameID pgtype.Text `json:"game_id"`
WalletID int64 `json:"wallet_id"`
TransactionType string `json:"transaction_type"`
Amount int64 `json:"amount"`
Currency string `json:"currency"`
ExternalTransactionID string `json:"external_transaction_id"`
Status string `json:"status"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type Wallet struct {
ID int64 `json:"id"`
Balance int64 `json:"balance"`
IsWithdraw bool `json:"is_withdraw"`
IsBettable bool `json:"is_bettable"`
IsTransferable bool `json:"is_transferable"`
UserID int64 `json:"user_id"`
Type string `json:"type"`
IsActive bool `json:"is_active"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
Currency string `json:"currency"`
BonusBalance pgtype.Numeric `json:"bonus_balance"`
CashBalance pgtype.Numeric `json:"cash_balance"`
}
type WalletThresholdNotification struct {
CompanyID int64 `json:"company_id"`
Threshold float64 `json:"threshold"`
NotifiedAt pgtype.Timestamptz `json:"notified_at"`
}
type WalletTransfer struct {
ID int64 `json:"id"`
Amount pgtype.Int8 `json:"amount"`
Message string `json:"message"`
Type pgtype.Text `json:"type"`
ReceiverWalletID pgtype.Int8 `json:"receiver_wallet_id"`
SenderWalletID pgtype.Int8 `json:"sender_wallet_id"`
CashierID pgtype.Int8 `json:"cashier_id"`
Verified pgtype.Bool `json:"verified"`
ReferenceNumber string `json:"reference_number"`
SessionID pgtype.Text `json:"session_id"`
Status pgtype.Text `json:"status"`
PaymentMethod pgtype.Text `json:"payment_method"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
}
type WalletTransferDetail struct {
ID int64 `json:"id"`
Amount pgtype.Int8 `json:"amount"`
Message string `json:"message"`
Type pgtype.Text `json:"type"`
ReceiverWalletID pgtype.Int8 `json:"receiver_wallet_id"`
SenderWalletID pgtype.Int8 `json:"sender_wallet_id"`
CashierID pgtype.Int8 `json:"cashier_id"`
Verified pgtype.Bool `json:"verified"`
ReferenceNumber string `json:"reference_number"`
SessionID pgtype.Text `json:"session_id"`
Status pgtype.Text `json:"status"`
PaymentMethod pgtype.Text `json:"payment_method"`
CreatedAt pgtype.Timestamp `json:"created_at"`
UpdatedAt pgtype.Timestamp `json:"updated_at"`
FirstName pgtype.Text `json:"first_name"`
LastName pgtype.Text `json:"last_name"`
PhoneNumber pgtype.Text `json:"phone_number"`
}