56 lines
1.7 KiB
Go
56 lines
1.7 KiB
Go
package domain
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
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"` // ACTIVE, COMPLETED, FAILED
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
ExpiresAt time.Time `json:"expires_at"`
|
|
}
|
|
|
|
type VirtualGameTransaction struct {
|
|
ID int64 `json:"id"`
|
|
SessionID int64 `json:"session_id"`
|
|
UserID int64 `json:"user_id"`
|
|
WalletID int64 `json:"wallet_id"`
|
|
TransactionType string `json:"transaction_type"` // BET, WIN, REFUND, JACKPOT_WIN
|
|
Amount int64 `json:"amount"`
|
|
Currency string `json:"currency"`
|
|
ExternalTransactionID string `json:"external_transaction_id"`
|
|
Status string `json:"status"` // PENDING, COMPLETED, FAILED
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type CreateVirtualGameSession struct {
|
|
UserID int64
|
|
GameID string
|
|
Currency string
|
|
Mode string // REAL, DEMO
|
|
}
|
|
|
|
type PopOKConfig struct {
|
|
ClientID string
|
|
SecretKey string
|
|
BaseURL string
|
|
CallbackURL string
|
|
}
|
|
|
|
type PopOKCallback struct {
|
|
TransactionID string `json:"transaction_id"`
|
|
SessionID string `json:"session_id"`
|
|
Type string `json:"type"` // BET, WIN, REFUND, JACKPOT_WIN
|
|
Amount float64 `json:"amount"`
|
|
Currency string `json:"currency"`
|
|
Timestamp int64 `json:"timestamp"`
|
|
Signature string `json:"signature"` // HMAC-SHA256 signature for verification
|
|
}
|