38 lines
1.2 KiB
Go
38 lines
1.2 KiB
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// SpinGameRequest represents the request to play a spin game
|
|
type SpinGameRequest struct {
|
|
SpinID string `json:"spin_id" validate:"required,uuid"`
|
|
}
|
|
|
|
// SpinGameResponse represents the response from playing a spin game
|
|
type SpinGameResponse struct {
|
|
Status string `json:"status"`
|
|
Message string `json:"message"`
|
|
Data *SpinGameResponseData `json:"data,omitempty"`
|
|
}
|
|
|
|
// SpinGameResponseData contains the game play result
|
|
type SpinGameResponseData struct {
|
|
GamePlay GamePlayResponse `json:"game_play"`
|
|
PrizeWon *CustomerGamePrizeResponse `json:"prize_won,omitempty"`
|
|
TokensRemaining int64 `json:"tokens_remaining"`
|
|
}
|
|
|
|
// SpinGamePrizeResponse represents a prize won in the spin game
|
|
type SpinGamePrizeResponse struct {
|
|
ID uuid.UUID `json:"id"`
|
|
GameID uuid.UUID `json:"game_id"`
|
|
Name string `json:"name"`
|
|
Image *string `json:"image,omitempty"`
|
|
Metadata *map[string]interface{} `json:"metadata,omitempty"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|