Tokens are EnakCoin and no app uses the token names any more, so their compatibility layer goes: - GET /customer/tokens and its handler, service, processor and response types. - total_tokens and tokens_history on GET /customer/wallet; last_updated now comes from the most recent row of either currency. - token_used and tokens_remaining on game and spin responses, and sort_by=token_used on the game play list. - TOKENS as a campaign type and reward type, with the mapping to COINS: migration 000092 already renamed the stored values. The customer_tokens table and its entity stay, as cmd/wallet-migrate still reads them, and LEGACY_TOKENS stays as the reference of the MIGRATION rows it wrote. The docs list the removed names and their replacements. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
716 B
Go
21 lines
716 B
Go
package contract
|
|
|
|
// 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"`
|
|
CoinsRemaining int64 `json:"coins_remaining"`
|
|
}
|