Yimaru-BackEnd/docs/docs.go
2025-05-16 22:38:10 +03:00

5225 lines
171 KiB
Go

// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "API Support",
"url": "http://www.swagger.io/support",
"email": "support@swagger.io"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/admin": {
"get": {
"description": "Get all Admins",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get all Admins",
"parameters": [
{
"type": "integer",
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.AdminRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"post": {
"description": "Create Admin",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Create Admin",
"parameters": [
{
"description": "Create admin",
"name": "manger",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.CreateAdminReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/auth/login": {
"post": {
"description": "Login customer",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Login customer",
"parameters": [
{
"description": "Login customer",
"name": "login",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.loginCustomerReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.loginCustomerRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/auth/logout": {
"post": {
"description": "Logout customer",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Logout customer",
"parameters": [
{
"description": "Logout customer",
"name": "logout",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.logoutReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/auth/refresh": {
"post": {
"description": "Refresh token",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Refresh token",
"parameters": [
{
"description": "tokens",
"name": "refresh",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.refreshToken"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.loginCustomerRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/bet": {
"get": {
"description": "Gets all the bets",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bet"
],
"summary": "Gets all bets",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.BetRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"post": {
"description": "Creates a bet",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bet"
],
"summary": "Create a bet",
"parameters": [
{
"description": "Creates bet",
"name": "createBet",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.CreateBetReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.BetRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/bet/cashout/{id}": {
"get": {
"description": "Gets a single bet by cashout id",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bet"
],
"summary": "Gets bet by cashout id",
"parameters": [
{
"type": "string",
"description": "cashout ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.BetRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/bet/{id}": {
"get": {
"description": "Gets a single bet by id",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bet"
],
"summary": "Gets bet by id",
"parameters": [
{
"type": "integer",
"description": "Bet ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.BetRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"delete": {
"description": "Deletes bet by id",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bet"
],
"summary": "Deletes bet by id",
"parameters": [
{
"type": "integer",
"description": "Bet ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"patch": {
"description": "Updates the cashed out field",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bet"
],
"summary": "Updates the cashed out field",
"parameters": [
{
"type": "integer",
"description": "Bet ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updates Cashed Out",
"name": "updateCashOut",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.UpdateCashOutReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/branch": {
"get": {
"description": "Gets all branches",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Gets all branches",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.BranchDetailRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"post": {
"description": "Creates a branch",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Create a branch",
"parameters": [
{
"description": "Creates branch",
"name": "createBranch",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.CreateBranchReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.BranchRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/branch/{id}": {
"get": {
"description": "Gets a single branch by id",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Gets branch by id",
"parameters": [
{
"type": "integer",
"description": "Branch ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.BranchDetailRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"put": {
"description": "Updates a branch",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Updates a branch",
"parameters": [
{
"type": "integer",
"description": "Branch ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update Branch",
"name": "updateBranch",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.CreateBranchReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.BranchRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"delete": {
"description": "Delete the branch",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Delete the branch",
"parameters": [
{
"type": "integer",
"description": "Branch ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/branch/{id}/bets": {
"get": {
"description": "Gets bets by its branch id",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Gets bets by its branch id",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.BetRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/branch/{id}/cashier": {
"get": {
"description": "Gets branch cashiers",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Gets branch cashiers",
"parameters": [
{
"type": "integer",
"description": "Branch ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.GetCashierRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/branch/{id}/operation": {
"get": {
"description": "Gets branch operations",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Gets branch operations",
"parameters": [
{
"type": "integer",
"description": "Branch ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.BranchOperationRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/branch/{id}/operation/{opID}": {
"delete": {
"description": "Delete the branch operation",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Delete the branch operation",
"parameters": [
{
"type": "integer",
"description": "Branch ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Branch Operation ID",
"name": "opID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/branchWallet": {
"get": {
"description": "Retrieve all branch wallets",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"wallet"
],
"summary": "Get all branch wallets",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.WalletRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/cashiers": {
"get": {
"description": "Get all cashiers",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cashier"
],
"summary": "Get all cashiers",
"parameters": [
{
"type": "integer",
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"post": {
"description": "Create cashier",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cashier"
],
"summary": "Create cashier",
"parameters": [
{
"description": "Create cashier",
"name": "cashier",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.CreateCashierReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/cashiers/{id}": {
"put": {
"description": "Update cashier",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cashier"
],
"summary": "Update cashier",
"parameters": [
{
"type": "integer",
"description": "Cashier ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update cashier",
"name": "cashier",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.updateUserReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/company": {
"get": {
"description": "Gets all companies",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"company"
],
"summary": "Gets all companies",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.CompanyRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"post": {
"description": "Creates a company",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"company"
],
"summary": "Create a company",
"parameters": [
{
"description": "Creates company",
"name": "createCompany",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.CreateCompanyReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.CompanyRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/company/{id}": {
"get": {
"description": "Gets a single company by id",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"company"
],
"summary": "Gets company by id",
"parameters": [
{
"type": "integer",
"description": "Company ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.CompanyRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"put": {
"description": "Updates a company",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"company"
],
"summary": "Updates a company",
"parameters": [
{
"type": "integer",
"description": "Company ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update Company",
"name": "updateCompany",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.UpdateCompanyReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.CompanyRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"delete": {
"description": "Delete the company",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"company"
],
"summary": "Delete the company",
"parameters": [
{
"type": "integer",
"description": "Company ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/company/{id}/branch": {
"get": {
"description": "Gets branches by company id",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Gets branches by company id",
"parameters": [
{
"type": "integer",
"description": "Company ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.BranchDetailRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/manager/{id}/branch": {
"get": {
"description": "Gets a branches by manager id",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Gets branches by manager id",
"parameters": [
{
"type": "integer",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.BranchDetailRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/managers": {
"get": {
"description": "Get all Managers",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"manager"
],
"summary": "Get all Managers",
"parameters": [
{
"type": "integer",
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.ManagersRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"post": {
"description": "Create Manager",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"manager"
],
"summary": "Create Manager",
"parameters": [
{
"description": "Create manager",
"name": "manger",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.CreateManagerReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/managers/{id}": {
"put": {
"description": "Update Managers",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Managers"
],
"summary": "Update Managers",
"parameters": [
{
"description": "Update Managers",
"name": "Managers",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.updateUserReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/operation": {
"post": {
"description": "Creates a operation",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Create a operation",
"parameters": [
{
"description": "Creates operation",
"name": "createBranchOperation",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.CreateBranchOperationReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.BranchOperationRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/prematch/events": {
"get": {
"description": "Retrieve all upcoming events from the database",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"prematch"
],
"summary": "Retrieve all upcoming events",
"parameters": [
{
"type": "integer",
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "page_size",
"in": "query"
},
{
"type": "string",
"description": "League ID Filter",
"name": "league_id",
"in": "query"
},
{
"type": "string",
"description": "Sport ID Filter",
"name": "sport_id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.UpcomingEvent"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/prematch/events/{id}": {
"get": {
"description": "Retrieve an upcoming event by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"prematch"
],
"summary": "Retrieve an upcoming by ID",
"parameters": [
{
"type": "string",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.UpcomingEvent"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/prematch/odds": {
"get": {
"description": "Retrieve all prematch odds from the database",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"prematch"
],
"summary": "Retrieve all prematch odds",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Odd"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/prematch/odds/upcoming/{upcoming_id}": {
"get": {
"description": "Retrieve prematch odds by upcoming event ID (FI from Bet365) with optional pagination",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"prematch"
],
"summary": "Retrieve prematch odds by upcoming ID (FI)",
"parameters": [
{
"type": "string",
"description": "Upcoming Event ID (FI)",
"name": "upcoming_id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Number of results to return (default: 10)",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"description": "Number of results to skip (default: 0)",
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Odd"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/prematch/odds/upcoming/{upcoming_id}/market/{market_id}": {
"get": {
"description": "Retrieve raw odds records using a Market ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"prematch"
],
"summary": "Retrieve raw odds by Market ID",
"parameters": [
{
"type": "string",
"description": "Upcoming ID",
"name": "upcoming_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Market ID",
"name": "market_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.RawOddsByMarketID"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/prematch/odds/{event_id}": {
"get": {
"description": "Retrieve prematch odds for a specific event by event ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"prematch"
],
"summary": "Retrieve prematch odds for an event",
"parameters": [
{
"type": "string",
"description": "Event ID",
"name": "event_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Odd"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/random/bet": {
"post": {
"description": "Generate a random bet",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bet"
],
"summary": "Generate a random bet",
"parameters": [
{
"description": "Create Random bet",
"name": "createBet",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.RandomBetReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.BetRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/referral/settings": {
"get": {
"security": [
{
"Bearer": []
}
],
"description": "Retrieves current referral settings (admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"referral"
],
"summary": "Get referral settings",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.ReferralSettings"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"description": "Updates referral settings (admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"referral"
],
"summary": "Update referral settings",
"parameters": [
{
"description": "Referral settings",
"name": "settings",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.ReferralSettings"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/referral/stats": {
"get": {
"security": [
{
"Bearer": []
}
],
"description": "Retrieves referral statistics for the authenticated user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"referral"
],
"summary": "Get referral statistics",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.ReferralStats"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/search/branch": {
"get": {
"description": "Search branches by name or location",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Search branches",
"parameters": [
{
"type": "string",
"description": "Search query",
"name": "q",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.BranchDetailRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/search/company": {
"get": {
"description": "Gets all companies",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"company"
],
"summary": "Gets all companies",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.CompanyRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/supportedOperation": {
"get": {
"description": "Gets all supported operations",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Gets all supported operations",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.BranchDetailRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"post": {
"description": "Creates a supported operation",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch"
],
"summary": "Create a supported operation",
"parameters": [
{
"description": "Creates supported operation",
"name": "createSupportedOperation",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.CreateSupportedOperationReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.SupportedOperationRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/ticket": {
"get": {
"description": "Retrieve all tickets",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ticket"
],
"summary": "Get all tickets",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.TicketRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"post": {
"description": "Creates a temporary ticket",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ticket"
],
"summary": "Create a temporary ticket",
"parameters": [
{
"description": "Creates ticket",
"name": "createTicket",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.CreateTicketReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.CreateTicketRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/ticket/{id}": {
"get": {
"description": "Retrieve ticket details by ticket ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ticket"
],
"summary": "Get ticket by ID",
"parameters": [
{
"type": "integer",
"description": "Ticket ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.TicketRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/transaction": {
"get": {
"description": "Gets all the transactions",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"transaction"
],
"summary": "Gets all transactions",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.TransactionRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"post": {
"description": "Creates a transaction",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"transaction"
],
"summary": "Create a transaction",
"parameters": [
{
"description": "Creates transaction",
"name": "createBet",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.CreateTransactionReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.TransactionRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/transaction/{id}": {
"get": {
"description": "Gets a single transaction by id",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"transaction"
],
"summary": "Gets transaction by id",
"parameters": [
{
"type": "integer",
"description": "Transaction ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.TransactionRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"put": {
"description": "Updates the verified status of a transaction",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"transaction"
],
"summary": "Updates the verified field of a transaction",
"parameters": [
{
"type": "integer",
"description": "Transaction ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updates Transaction Verification",
"name": "updateVerified",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.UpdateTransactionVerifiedReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/transfer/refill/:id": {
"post": {
"description": "Super Admin route to refill a wallet",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"transfer"
],
"summary": "Refill wallet",
"parameters": [
{
"description": "Create Transfer",
"name": "refillWallet",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.CreateTransferReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.TransferWalletRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/transfer/wallet/:id": {
"post": {
"description": "Create a transfer to wallet",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"transfer"
],
"summary": "Create a transfer to wallet",
"parameters": [
{
"description": "Create Transfer",
"name": "transferToWallet",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.CreateTransferReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.TransferWalletRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/transfer/wallet/{id}": {
"get": {
"description": "Get transfer by wallet",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"transfer"
],
"summary": "Get transfer by wallet",
"parameters": [
{
"description": "Create Transfer",
"name": "transferToWallet",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.CreateTransferReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.TransferWalletRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/user/checkPhoneEmailExist": {
"post": {
"description": "Check if phone number or email exist",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Check if phone number or email exist",
"parameters": [
{
"description": "Check phone number or email exist",
"name": "checkPhoneEmailExist",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.CheckPhoneEmailExistReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.CheckPhoneEmailExistRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/user/delete/{id}": {
"delete": {
"description": "Delete a user by their ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Delete user by ID",
"parameters": [
{
"type": "integer",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/user/profile": {
"get": {
"security": [
{
"Bearer": []
}
],
"description": "Get user profile",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Get user profile",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.UserProfileRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/user/register": {
"post": {
"description": "Register user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Register user",
"parameters": [
{
"description": "Register user",
"name": "registerUser",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.RegisterUserReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/user/resetPassword": {
"post": {
"description": "Reset password",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Reset password",
"parameters": [
{
"description": "Reset password",
"name": "resetPassword",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.ResetPasswordReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/user/search": {
"post": {
"description": "Search for user using name or phone",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Search for user using name or phone",
"parameters": [
{
"description": "Search for using his name or phone",
"name": "searchUserByNameOrPhone",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.SearchUserByNameOrPhoneReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.UserProfileRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/user/sendRegisterCode": {
"post": {
"description": "Send register code",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Send register code",
"parameters": [
{
"description": "Send register code",
"name": "registerCode",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.RegisterCodeReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/user/sendResetCode": {
"post": {
"description": "Send reset code",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Send reset code",
"parameters": [
{
"description": "Send reset code",
"name": "resetCode",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.ResetCodeReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/user/single/{id}": {
"get": {
"description": "Get a single user by id",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Get user by id",
"parameters": [
{
"type": "integer",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.UserProfileRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/user/suspend": {
"post": {
"description": "Suspend or unsuspend a user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Suspend or unsuspend a user",
"parameters": [
{
"description": "Suspend or unsuspend a user",
"name": "updateUserSuspend",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.UpdateUserSuspendReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.UpdateUserSuspendRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/user/wallet": {
"get": {
"security": [
{
"Bearer": []
}
],
"description": "Retrieve customer wallet details",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"wallet"
],
"summary": "Get customer wallet",
"parameters": [
{
"type": "integer",
"description": "Company ID",
"name": "company_id",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.CustomerWalletRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/virtual-game/callback": {
"post": {
"description": "Processes callbacks from PopOK for game events",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"virtual-game"
],
"summary": "Handle PopOK game callback",
"parameters": [
{
"description": "Callback data",
"name": "callback",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.PopOKCallback"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/virtual-game/launch": {
"post": {
"security": [
{
"Bearer": []
}
],
"description": "Generates a URL to launch a PopOK game",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"virtual-game"
],
"summary": "Launch a PopOK virtual game",
"parameters": [
{
"description": "Game launch details",
"name": "launch",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.launchVirtualGameReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.launchVirtualGameRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/wallet": {
"get": {
"description": "Retrieve all wallets",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"wallet"
],
"summary": "Get all wallets",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.WalletRes"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/wallet/{id}": {
"get": {
"description": "Retrieve wallet details by wallet ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"wallet"
],
"summary": "Get wallet by ID",
"parameters": [
{
"type": "integer",
"description": "Wallet ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.WalletRes"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
},
"patch": {
"description": "Can activate and deactivate wallet",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"wallet"
],
"summary": "Activate and Deactivate Wallet",
"parameters": [
{
"type": "integer",
"description": "Wallet ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update Wallet Active",
"name": "updateCashOut",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.UpdateWalletActiveReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
}
},
"definitions": {
"domain.BetOutcome": {
"type": "object",
"properties": {
"away_team_name": {
"type": "string",
"example": "Liverpool"
},
"bet_id": {
"type": "integer",
"example": 1
},
"event_id": {
"type": "integer",
"example": 1
},
"expires": {
"type": "string",
"example": "2025-04-08T12:00:00Z"
},
"home_team_name": {
"type": "string",
"example": "Manchester"
},
"id": {
"type": "integer",
"example": 1
},
"market_id": {
"type": "integer",
"example": 1
},
"market_name": {
"type": "string",
"example": "Fulltime Result"
},
"odd": {
"type": "number",
"example": 1.5
},
"odd_handicap": {
"type": "string",
"example": "1"
},
"odd_header": {
"type": "string",
"example": "1"
},
"odd_id": {
"type": "integer",
"example": 1
},
"odd_name": {
"type": "string",
"example": "1"
},
"sport_id": {
"type": "integer",
"example": 1
},
"status": {
"allOf": [
{
"$ref": "#/definitions/domain.OutcomeStatus"
}
],
"example": 1
}
}
},
"domain.BetRes": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"example": 100
},
"branch_id": {
"type": "integer",
"example": 2
},
"cashed_id": {
"type": "string",
"example": "21234"
},
"cashed_out": {
"type": "boolean",
"example": false
},
"full_name": {
"type": "string",
"example": "John"
},
"id": {
"type": "integer",
"example": 1
},
"is_shop_bet": {
"type": "boolean",
"example": false
},
"outcomes": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.BetOutcome"
}
},
"phone_number": {
"type": "string",
"example": "1234567890"
},
"status": {
"allOf": [
{
"$ref": "#/definitions/domain.OutcomeStatus"
}
],
"example": 1
},
"total_odds": {
"type": "number",
"example": 4.22
},
"user_id": {
"type": "integer",
"example": 2
}
}
},
"domain.CreateBetOutcomeReq": {
"type": "object",
"properties": {
"event_id": {
"type": "integer",
"example": 1
},
"market_id": {
"type": "integer",
"example": 1
},
"odd_id": {
"type": "integer",
"example": 1
}
}
},
"domain.CreateBetReq": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"example": 100
},
"branch_id": {
"type": "integer",
"example": 1
},
"full_name": {
"type": "string",
"example": "John"
},
"outcomes": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.CreateBetOutcomeReq"
}
},
"phone_number": {
"type": "string",
"example": "1234567890"
},
"status": {
"allOf": [
{
"$ref": "#/definitions/domain.OutcomeStatus"
}
],
"example": 1
}
}
},
"domain.Odd": {
"type": "object",
"properties": {
"category": {
"type": "string"
},
"event_id": {
"type": "string"
},
"fetched_at": {
"type": "string"
},
"fi": {
"type": "string"
},
"handicap": {
"type": "string"
},
"is_active": {
"type": "boolean"
},
"market_category": {
"type": "string"
},
"market_id": {
"type": "string"
},
"market_name": {
"type": "string"
},
"market_type": {
"type": "string"
},
"name": {
"type": "string"
},
"odds_value": {
"type": "number"
},
"raw_odds": {
"type": "array",
"items": {}
},
"section": {
"type": "string"
},
"source": {
"type": "string"
}
}
},
"domain.OutcomeStatus": {
"type": "integer",
"enum": [
0,
1,
2,
3,
4,
5
],
"x-enum-comments": {
"OUTCOME_STATUS_ERROR": "Half Win and Half Given Back",
"OUTCOME_STATUS_HALF": "Half Win and Half Given Back",
"OUTCOME_STATUS_VOID": "Give Back"
},
"x-enum-varnames": [
"OUTCOME_STATUS_PENDING",
"OUTCOME_STATUS_WIN",
"OUTCOME_STATUS_LOSS",
"OUTCOME_STATUS_VOID",
"OUTCOME_STATUS_HALF",
"OUTCOME_STATUS_ERROR"
]
},
"domain.PaymentOption": {
"type": "integer",
"enum": [
0,
1,
2,
3
],
"x-enum-varnames": [
"CASH_TRANSACTION",
"TELEBIRR_TRANSACTION",
"ARIFPAY_TRANSACTION",
"BANK"
]
},
"domain.PopOKCallback": {
"type": "object",
"properties": {
"amount": {
"type": "number"
},
"currency": {
"type": "string"
},
"session_id": {
"type": "string"
},
"signature": {
"description": "HMAC-SHA256 signature for verification",
"type": "string"
},
"timestamp": {
"type": "integer"
},
"transaction_id": {
"type": "string"
},
"type": {
"description": "BET, WIN, REFUND, JACKPOT_WIN",
"type": "string"
}
}
},
"domain.RandomBetReq": {
"type": "object",
"required": [
"branch_id",
"number_of_bets"
],
"properties": {
"branch_id": {
"type": "integer",
"example": 1
},
"number_of_bets": {
"type": "integer",
"example": 1
}
}
},
"domain.RawOddsByMarketID": {
"type": "object",
"properties": {
"fetched_at": {
"type": "string"
},
"handicap": {
"type": "string"
},
"id": {
"type": "integer"
},
"market_name": {
"type": "string"
},
"raw_odds": {
"type": "array",
"items": {}
}
}
},
"domain.ReferralSettings": {
"type": "object",
"properties": {
"betReferralBonusPercentage": {
"type": "number"
},
"cashbackPercentage": {
"type": "number"
},
"createdAt": {
"type": "string"
},
"expiresAfterDays": {
"type": "integer"
},
"id": {
"type": "integer"
},
"maxReferrals": {
"type": "integer"
},
"referralRewardAmount": {
"type": "number"
},
"updatedAt": {
"type": "string"
},
"updatedBy": {
"type": "string"
},
"version": {
"type": "integer"
}
}
},
"domain.ReferralStats": {
"type": "object",
"properties": {
"completedReferrals": {
"type": "integer"
},
"pendingRewards": {
"type": "number"
},
"totalReferrals": {
"type": "integer"
},
"totalRewardEarned": {
"type": "number"
}
}
},
"domain.Role": {
"type": "string",
"enum": [
"super_admin",
"admin",
"branch_manager",
"customer",
"cashier"
],
"x-enum-varnames": [
"RoleSuperAdmin",
"RoleAdmin",
"RoleBranchManager",
"RoleCustomer",
"RoleCashier"
]
},
"domain.TicketOutcome": {
"type": "object",
"properties": {
"away_team_name": {
"type": "string",
"example": "Liverpool"
},
"event_id": {
"type": "integer",
"example": 1
},
"expires": {
"type": "string",
"example": "2025-04-08T12:00:00Z"
},
"home_team_name": {
"type": "string",
"example": "Manchester"
},
"id": {
"type": "integer",
"example": 1
},
"market_id": {
"type": "integer",
"example": 1
},
"market_name": {
"type": "string",
"example": "Fulltime Result"
},
"odd": {
"type": "number",
"example": 1.5
},
"odd_handicap": {
"type": "string",
"example": "1"
},
"odd_header": {
"type": "string",
"example": "1"
},
"odd_id": {
"type": "integer",
"example": 1
},
"odd_name": {
"type": "string",
"example": "1"
},
"status": {
"allOf": [
{
"$ref": "#/definitions/domain.OutcomeStatus"
}
],
"example": 1
},
"ticket_id": {
"type": "integer",
"example": 1
}
}
},
"domain.UpcomingEvent": {
"type": "object",
"properties": {
"awayKitImage": {
"description": "Kit or image for away team (optional)",
"type": "string"
},
"awayTeam": {
"description": "Away team name (can be empty/null)",
"type": "string"
},
"awayTeamID": {
"description": "Away team ID (can be empty/null)",
"type": "string"
},
"homeKitImage": {
"description": "Kit or image for home team (optional)",
"type": "string"
},
"homeTeam": {
"description": "Home team name (if available)",
"type": "string"
},
"homeTeamID": {
"description": "Home team ID",
"type": "string"
},
"id": {
"description": "Event ID",
"type": "string"
},
"leagueCC": {
"description": "League country code",
"type": "string"
},
"leagueID": {
"description": "League ID",
"type": "string"
},
"leagueName": {
"description": "League name",
"type": "string"
},
"matchName": {
"description": "Match or event name",
"type": "string"
},
"sportID": {
"description": "Sport ID",
"type": "string"
},
"startTime": {
"description": "Converted from \"time\" field in UNIX format",
"type": "string"
}
}
},
"handlers.AdminRes": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"email": {
"type": "string"
},
"email_verified": {
"type": "boolean"
},
"first_name": {
"type": "string"
},
"id": {
"type": "integer"
},
"last_login": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"phone_verified": {
"type": "boolean"
},
"role": {
"$ref": "#/definitions/domain.Role"
},
"suspended": {
"type": "boolean"
},
"suspended_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"handlers.BranchDetailRes": {
"type": "object",
"properties": {
"branch_manager_id": {
"type": "integer",
"example": 1
},
"company_id": {
"type": "integer",
"example": 1
},
"id": {
"type": "integer",
"example": 1
},
"is_self_owned": {
"type": "boolean",
"example": false
},
"location": {
"type": "string",
"example": "Addis Ababa"
},
"manager_name": {
"type": "string",
"example": "John Smith"
},
"manager_phone_number": {
"type": "string",
"example": "0911111111"
},
"name": {
"type": "string",
"example": "4-kilo Branch"
},
"wallet_id": {
"type": "integer",
"example": 1
}
}
},
"handlers.BranchOperationRes": {
"type": "object",
"properties": {
"description": {
"type": "string",
"example": "Betting on sport events"
},
"name": {
"type": "string",
"example": "SportsBook"
}
}
},
"handlers.BranchRes": {
"type": "object",
"properties": {
"branch_manager_id": {
"type": "integer",
"example": 1
},
"company_id": {
"type": "integer",
"example": 1
},
"id": {
"type": "integer",
"example": 1
},
"is_self_owned": {
"type": "boolean",
"example": false
},
"location": {
"type": "string",
"example": "Addis Ababa"
},
"name": {
"type": "string",
"example": "4-kilo Branch"
},
"wallet_id": {
"type": "integer",
"example": 1
}
}
},
"handlers.CheckPhoneEmailExistReq": {
"type": "object",
"properties": {
"email": {
"type": "string",
"example": "john.doe@example.com"
},
"phone_number": {
"type": "string",
"example": "1234567890"
}
}
},
"handlers.CheckPhoneEmailExistRes": {
"type": "object",
"properties": {
"email_exist": {
"type": "boolean"
},
"phone_number_exist": {
"type": "boolean"
}
}
},
"handlers.CompanyRes": {
"type": "object",
"properties": {
"admin_id": {
"type": "integer",
"example": 1
},
"id": {
"type": "integer",
"example": 1
},
"name": {
"type": "string",
"example": "CompanyName"
},
"wallet_id": {
"type": "integer",
"example": 1
}
}
},
"handlers.CreateAdminReq": {
"type": "object",
"properties": {
"company_id": {
"type": "integer",
"example": 1
},
"email": {
"type": "string",
"example": "john.doe@example.com"
},
"first_name": {
"type": "string",
"example": "John"
},
"last_name": {
"type": "string",
"example": "Doe"
},
"password": {
"type": "string",
"example": "password123"
},
"phone_number": {
"type": "string",
"example": "1234567890"
}
}
},
"handlers.CreateBranchOperationReq": {
"type": "object",
"properties": {
"branch_id": {
"type": "integer",
"example": 1
},
"operation_id": {
"type": "integer",
"example": 1
}
}
},
"handlers.CreateBranchReq": {
"type": "object",
"required": [
"branch_manager_id",
"location",
"name",
"operations"
],
"properties": {
"branch_manager_id": {
"type": "integer",
"example": 1
},
"company_id": {
"type": "integer",
"example": 1
},
"is_self_owned": {
"type": "boolean",
"example": false
},
"location": {
"type": "string",
"maxLength": 100,
"minLength": 3,
"example": "Addis Ababa"
},
"name": {
"type": "string",
"maxLength": 100,
"minLength": 3,
"example": "4-kilo Branch"
},
"operations": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"handlers.CreateCashierReq": {
"type": "object",
"properties": {
"branch_id": {
"type": "integer",
"example": 1
},
"email": {
"type": "string",
"example": "john.doe@example.com"
},
"first_name": {
"type": "string",
"example": "John"
},
"last_name": {
"type": "string",
"example": "Doe"
},
"password": {
"type": "string",
"example": "password123"
},
"phone_number": {
"type": "string",
"example": "1234567890"
},
"suspended": {
"type": "boolean",
"example": false
}
}
},
"handlers.CreateCompanyReq": {
"type": "object",
"properties": {
"admin_id": {
"type": "integer",
"example": 1
},
"name": {
"type": "string",
"example": "CompanyName"
}
}
},
"handlers.CreateManagerReq": {
"type": "object",
"properties": {
"company_id": {
"type": "integer",
"example": 1
},
"email": {
"type": "string",
"example": "john.doe@example.com"
},
"first_name": {
"type": "string",
"example": "John"
},
"last_name": {
"type": "string",
"example": "Doe"
},
"password": {
"type": "string",
"example": "password123"
},
"phone_number": {
"type": "string",
"example": "1234567890"
}
}
},
"handlers.CreateSupportedOperationReq": {
"type": "object",
"properties": {
"description": {
"type": "string",
"example": "Betting on sport events"
},
"name": {
"type": "string",
"example": "SportsBook"
}
}
},
"handlers.CreateTicketOutcomeReq": {
"type": "object",
"properties": {
"event_id": {
"description": "TicketID int64 ` + "`" + `json:\"ticket_id\" example:\"1\"` + "`" + `",
"type": "integer",
"example": 1
},
"market_id": {
"type": "integer",
"example": 1
},
"odd_id": {
"type": "integer",
"example": 1
}
}
},
"handlers.CreateTicketReq": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"example": 100
},
"outcomes": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.CreateTicketOutcomeReq"
}
}
}
},
"handlers.CreateTicketRes": {
"type": "object",
"properties": {
"created_number": {
"type": "integer",
"example": 3
},
"fast_code": {
"type": "integer",
"example": 1234
}
}
},
"handlers.CreateTransactionReq": {
"type": "object",
"properties": {
"account_name": {
"type": "string"
},
"account_number": {
"type": "string"
},
"amount": {
"type": "number",
"example": 100
},
"bank_code": {
"type": "string"
},
"beneficiary_name": {
"type": "string"
},
"bet_id": {
"type": "integer",
"example": 1
},
"branch_id": {
"type": "integer",
"example": 1
},
"cashout_id": {
"type": "string",
"example": "191212"
},
"full_name": {
"type": "string",
"example": "John Smith"
},
"payment_option": {
"allOf": [
{
"$ref": "#/definitions/domain.PaymentOption"
}
],
"example": 1
},
"phone_number": {
"type": "string",
"example": "0911111111"
},
"reference_number": {
"type": "string"
},
"type": {
"type": "integer",
"example": 1
}
}
},
"handlers.CreateTransferReq": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"example": 100
},
"payment_method": {
"type": "string",
"example": "cash"
}
}
},
"handlers.CustomerWalletRes": {
"type": "object",
"properties": {
"company_id": {
"type": "integer",
"example": 1
},
"created_at": {
"type": "string"
},
"customer_id": {
"type": "integer",
"example": 1
},
"id": {
"type": "integer",
"example": 1
},
"regular_balance": {
"type": "number",
"example": 100
},
"regular_id": {
"type": "integer",
"example": 1
},
"regular_updated_at": {
"type": "string"
},
"static_balance": {
"type": "number",
"example": 100
},
"static_id": {
"type": "integer",
"example": 1
},
"static_updated_at": {
"type": "string"
}
}
},
"handlers.GetCashierRes": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"email": {
"type": "string"
},
"email_verified": {
"type": "boolean"
},
"first_name": {
"type": "string"
},
"id": {
"type": "integer"
},
"last_login": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"phone_verified": {
"type": "boolean"
},
"role": {
"$ref": "#/definitions/domain.Role"
},
"suspended": {
"type": "boolean"
},
"suspended_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"handlers.ManagersRes": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"email": {
"type": "string"
},
"email_verified": {
"type": "boolean"
},
"first_name": {
"type": "string"
},
"id": {
"type": "integer"
},
"last_login": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"phone_verified": {
"type": "boolean"
},
"role": {
"$ref": "#/definitions/domain.Role"
},
"suspended": {
"type": "boolean"
},
"suspended_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"handlers.RegisterCodeReq": {
"type": "object",
"properties": {
"email": {
"type": "string",
"example": "john.doe@example.com"
},
"phone_number": {
"type": "string",
"example": "1234567890"
}
}
},
"handlers.RegisterUserReq": {
"type": "object",
"properties": {
"email": {
"type": "string",
"example": "john.doe@example.com"
},
"first_name": {
"type": "string",
"example": "John"
},
"last_name": {
"type": "string",
"example": "Doe"
},
"otp": {
"type": "string",
"example": "123456"
},
"password": {
"type": "string",
"example": "password123"
},
"phone_number": {
"type": "string",
"example": "1234567890"
},
"referal_code": {
"type": "string",
"example": "ABC123"
}
}
},
"handlers.ResetCodeReq": {
"type": "object",
"properties": {
"email": {
"type": "string",
"example": "john.doe@example.com"
},
"phone_number": {
"type": "string",
"example": "1234567890"
}
}
},
"handlers.ResetPasswordReq": {
"type": "object",
"required": [
"otp",
"password"
],
"properties": {
"email": {
"type": "string",
"example": "john.doe@example.com"
},
"otp": {
"type": "string",
"example": "123456"
},
"password": {
"type": "string",
"minLength": 8,
"example": "newpassword123"
},
"phone_number": {
"type": "string",
"example": "1234567890"
}
}
},
"handlers.SearchUserByNameOrPhoneReq": {
"type": "object",
"properties": {
"searchString": {
"type": "string"
}
}
},
"handlers.SupportedOperationRes": {
"type": "object",
"properties": {
"description": {
"type": "string",
"example": "Betting on sport events"
},
"id": {
"type": "integer",
"example": 1
},
"name": {
"type": "string",
"example": "SportsBook"
}
}
},
"handlers.TicketRes": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"example": 100
},
"id": {
"type": "integer",
"example": 1
},
"outcomes": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.TicketOutcome"
}
},
"total_odds": {
"type": "number",
"example": 4.22
}
}
},
"handlers.TransactionRes": {
"type": "object",
"properties": {
"account_name": {
"type": "string"
},
"account_number": {
"type": "string"
},
"amount": {
"type": "number",
"example": 100
},
"approved_by": {
"type": "integer",
"example": 1
},
"approver_name": {
"type": "string",
"example": "John Smith"
},
"bank_code": {
"type": "string"
},
"beneficiary_name": {
"type": "string"
},
"bet_id": {
"type": "integer",
"example": 1
},
"branch_id": {
"type": "integer",
"example": 1
},
"branch_location": {
"type": "string",
"example": "Branch Location"
},
"branch_name": {
"type": "string",
"example": "Branch Name"
},
"cashier_id": {
"type": "integer",
"example": 1
},
"cashier_name": {
"type": "string",
"example": "John Smith"
},
"company_id": {
"type": "integer",
"example": 1
},
"created_at": {
"type": "string"
},
"full_name": {
"type": "string",
"example": "John Smith"
},
"id": {
"type": "integer",
"example": 1
},
"number_of_outcomes": {
"type": "integer",
"example": 1
},
"payment_option": {
"allOf": [
{
"$ref": "#/definitions/domain.PaymentOption"
}
],
"example": 1
},
"phone_number": {
"type": "string",
"example": "0911111111"
},
"reference_number": {
"type": "string"
},
"type": {
"type": "integer",
"example": 1
},
"updated_at": {
"type": "string"
},
"verified": {
"type": "boolean",
"example": true
}
}
},
"handlers.TransferWalletRes": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"example": 100
},
"cashier_id": {
"type": "integer",
"example": 789
},
"created_at": {
"type": "string",
"example": "2025-04-08T12:00:00Z"
},
"id": {
"type": "integer",
"example": 1
},
"payment_method": {
"type": "string",
"example": "bank"
},
"receiver_wallet_id": {
"type": "integer",
"example": 1
},
"sender_wallet_id": {
"type": "integer",
"example": 1
},
"type": {
"type": "string",
"example": "transfer"
},
"updated_at": {
"type": "string",
"example": "2025-04-08T12:30:00Z"
},
"verified": {
"type": "boolean",
"example": true
}
}
},
"handlers.UpdateCashOutReq": {
"type": "object",
"properties": {
"cashedOut": {
"type": "boolean"
}
}
},
"handlers.UpdateCompanyReq": {
"type": "object",
"properties": {
"admin_id": {
"type": "integer",
"example": 1
},
"name": {
"type": "string",
"example": "CompanyName"
}
}
},
"handlers.UpdateTransactionVerifiedReq": {
"type": "object",
"properties": {
"verified": {
"type": "boolean",
"example": true
}
}
},
"handlers.UpdateUserSuspendReq": {
"type": "object",
"required": [
"suspended",
"user_id"
],
"properties": {
"suspended": {
"type": "boolean",
"example": true
},
"user_id": {
"type": "integer",
"example": 123
}
}
},
"handlers.UpdateUserSuspendRes": {
"type": "object",
"properties": {
"suspended": {
"type": "boolean"
},
"user_id": {
"type": "integer"
}
}
},
"handlers.UpdateWalletActiveReq": {
"type": "object",
"required": [
"is_active"
],
"properties": {
"is_active": {
"type": "boolean",
"example": true
}
}
},
"handlers.UserProfileRes": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"email": {
"type": "string"
},
"email_verified": {
"type": "boolean"
},
"first_name": {
"type": "string"
},
"id": {
"type": "integer"
},
"last_login": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"phone_verified": {
"type": "boolean"
},
"role": {
"$ref": "#/definitions/domain.Role"
},
"suspended": {
"type": "boolean"
},
"suspended_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"handlers.WalletRes": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"example": 100
},
"created_at": {
"type": "string"
},
"id": {
"type": "integer",
"example": 1
},
"is_active": {
"type": "boolean",
"example": true
},
"is_bettable": {
"type": "boolean",
"example": true
},
"is_transferable": {
"type": "boolean",
"example": true
},
"is_withdraw": {
"type": "boolean",
"example": true
},
"updated_at": {
"type": "string"
},
"user_id": {
"type": "integer",
"example": 1
}
}
},
"handlers.launchVirtualGameReq": {
"type": "object",
"required": [
"currency",
"game_id",
"mode"
],
"properties": {
"currency": {
"type": "string",
"example": "USD"
},
"game_id": {
"type": "string",
"example": "crash_001"
},
"mode": {
"type": "string",
"enum": [
"REAL",
"DEMO"
],
"example": "REAL"
}
}
},
"handlers.launchVirtualGameRes": {
"type": "object",
"properties": {
"launch_url": {
"type": "string"
}
}
},
"handlers.loginCustomerReq": {
"type": "object",
"required": [
"password"
],
"properties": {
"email": {
"type": "string",
"example": "john.doe@example.com"
},
"password": {
"type": "string",
"example": "password123"
},
"phone_number": {
"type": "string",
"example": "1234567890"
}
}
},
"handlers.loginCustomerRes": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"refresh_token": {
"type": "string"
},
"role": {
"type": "string"
}
}
},
"handlers.logoutReq": {
"type": "object",
"required": [
"refresh_token"
],
"properties": {
"refresh_token": {
"type": "string",
"example": "\u003crefresh-token\u003e"
}
}
},
"handlers.refreshToken": {
"type": "object",
"required": [
"access_token",
"refresh_token"
],
"properties": {
"access_token": {
"type": "string",
"example": "\u003cjwt-token\u003e"
},
"refresh_token": {
"type": "string",
"example": "\u003crefresh-token\u003e"
}
}
},
"handlers.updateUserReq": {
"type": "object",
"properties": {
"first_name": {
"type": "string",
"example": "John"
},
"last_name": {
"type": "string",
"example": "Doe"
},
"suspended": {
"type": "boolean",
"example": false
}
}
},
"response.APIResponse": {
"type": "object",
"properties": {
"data": {},
"message": {
"type": "string"
},
"metadata": {},
"page": {
"type": "integer"
},
"status": {
"$ref": "#/definitions/response.Status"
},
"timestamp": {
"type": "string"
},
"total": {
"type": "integer"
}
}
},
"response.Status": {
"type": "string",
"enum": [
"error",
"success"
],
"x-enum-varnames": [
"Error",
"Success"
]
}
},
"securityDefinitions": {
"Bearer": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0.1",
Host: "",
BasePath: "",
Schemes: []string{},
Title: "FortuneBet API",
Description: "This is server for FortuneBet.",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}