fix campaign rules
This commit is contained in:
@@ -17,7 +17,6 @@ type CreateCampaignRequest struct {
|
||||
ShowOnApp bool `json:"show_on_app"`
|
||||
Position int `json:"position" binding:"min=0"`
|
||||
Metadata *map[string]interface{} `json:"metadata,omitempty"`
|
||||
Rules []CampaignRuleStruct `json:"rules" binding:"required,min=1"`
|
||||
}
|
||||
|
||||
type UpdateCampaignRequest struct {
|
||||
@@ -31,7 +30,6 @@ type UpdateCampaignRequest struct {
|
||||
ShowOnApp bool `json:"show_on_app"`
|
||||
Position int `json:"position" binding:"min=0"`
|
||||
Metadata *map[string]interface{} `json:"metadata,omitempty"`
|
||||
Rules []CampaignRuleStruct `json:"rules" binding:"required,min=1"`
|
||||
}
|
||||
|
||||
type ListCampaignsRequest struct {
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
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"`
|
||||
TokensRemaining int64 `json:"tokens_remaining"`
|
||||
}
|
||||
Reference in New Issue
Block a user