forked from ebhomengo/niki
1369 lines
42 KiB
Go
1369 lines
42 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}}",
|
|
"contact": {},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/address/": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"AuthBearerBenefactor": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"address"
|
|
],
|
|
"summary": "Add Address benefactor",
|
|
"parameters": [
|
|
{
|
|
"description": "Add Address benefactor",
|
|
"name": "Request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/addressparam.BenefactorAddAddressRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/addressparam.BenefactorAddAddressResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/address/cities": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"address"
|
|
],
|
|
"summary": "get all cities",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/addressparam.GetAllCitiesResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/address/provinces": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"address"
|
|
],
|
|
"summary": "get all provinces",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/addressparam.GetAllProvincesResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/admin/kindboxreqs/": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"AuthBearerAdmin": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"kindboxreq"
|
|
],
|
|
"summary": "admin get All kindboxreq",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_number",
|
|
"name": "page_number",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqGetAllResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/admin/kindboxreqs/accept-kind-box-req/{id}": {
|
|
"patch": {
|
|
"security": [
|
|
{
|
|
"AuthBearerAdmin": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"kindboxreq"
|
|
],
|
|
"summary": "admin Accept kindboxreq",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "admin Accept kindboxreq",
|
|
"name": "Request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqAcceptRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqAcceptResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/admin/kindboxreqs/assign-sender-agent/{id}": {
|
|
"patch": {
|
|
"security": [
|
|
{
|
|
"AuthBearerAdmin": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"kindboxreq"
|
|
],
|
|
"summary": "admin AssignSenderAgent kindboxreq",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "admin AssignSenderAgent kindboxreq",
|
|
"name": "Request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/adminkindboxreqparam.AssignSenderRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/adminkindboxreqparam.DeliverKindBoxReqResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/admin/kindboxreqs/deliver-kind-box-req/{id}": {
|
|
"patch": {
|
|
"security": [
|
|
{
|
|
"AuthBearerAdmin": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"kindboxreq"
|
|
],
|
|
"summary": "admin Deliver kindboxreq",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/adminkindboxreqparam.DeliverKindBoxReqResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/admin/kindboxreqs/reject-kind-box-req/{id}": {
|
|
"patch": {
|
|
"security": [
|
|
{
|
|
"AuthBearerAdmin": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"kindboxreq"
|
|
],
|
|
"summary": "admin Reject kindboxreq",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "admin Reject kindboxreq",
|
|
"name": "Request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqRejectRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqRejectResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/admins/login-by-phone": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "Login By PhoneNumber admin",
|
|
"parameters": [
|
|
{
|
|
"description": "Login By PhoneNumber admin",
|
|
"name": "Request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/adminserviceparam.LoginWithPhoneNumberRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/adminserviceparam.LoginWithPhoneNumberResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/admins/register": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "super-admin register admin",
|
|
"parameters": [
|
|
{
|
|
"description": "super-admin register admin",
|
|
"name": "Request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/adminserviceparam.RegisterRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/adminserviceparam.RegisterResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/benefactor/kindboxes/": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"AuthBearerBenefactor": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"kindbox"
|
|
],
|
|
"summary": "benefactor get All kindbox",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/benefactorkindboxparam.KindBoxGetResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/benefactor/kindboxes/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"AuthBearerBenefactor": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"kindbox"
|
|
],
|
|
"summary": "benefactor get kindbox",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/benefactorkindboxparam.KindBoxGetResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/benefactor/kindboxreqs/": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"AuthBearerBenefactor": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"kindboxreq"
|
|
],
|
|
"summary": "benefactor Add kindboxreq",
|
|
"parameters": [
|
|
{
|
|
"description": "benefactor Add kindboxreq",
|
|
"name": "Request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/benefactorkindboxreqparam.KindBoxReqAddRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/benefactorkindboxreqparam.KindBoxReqAddResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/benefactor/kindboxreqs/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"AuthBearerBenefactor": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"kindboxreq"
|
|
],
|
|
"summary": "benefactor get kindboxreq",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/benefactorkindboxreqparam.KindBoxReqGetResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/benefactor/login-register": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"benefactor"
|
|
],
|
|
"summary": "login Or Register benefactor",
|
|
"parameters": [
|
|
{
|
|
"description": "login Or Register benefactor",
|
|
"name": "Request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/benefactoreparam.LoginOrRegisterRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/benefactoreparam.LoginOrRegisterResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/benefactor/send-otp": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"benefactor"
|
|
],
|
|
"summary": "send otp benefactor",
|
|
"parameters": [
|
|
{
|
|
"description": "send otp benefactor",
|
|
"name": "Request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/benefactoreparam.SendOtpRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/benefactoreparam.SendOtpResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"addressparam.BenefactorAddAddressRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string",
|
|
"example": "tehran"
|
|
},
|
|
"benefactor_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"city_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"lat": {
|
|
"type": "number",
|
|
"example": 22.23
|
|
},
|
|
"lon": {
|
|
"type": "number",
|
|
"example": 22.22
|
|
},
|
|
"postal_code": {
|
|
"type": "string",
|
|
"example": "1234567890"
|
|
},
|
|
"province_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
}
|
|
}
|
|
},
|
|
"addressparam.BenefactorAddAddressResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"$ref": "#/definitions/entity.Address"
|
|
}
|
|
}
|
|
},
|
|
"addressparam.GetAllCitiesResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cities": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/entity.City"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"addressparam.GetAllProvincesResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"provinces": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/entity.Province"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"adminkindboxreqparam.AssignSenderRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"kind_box_req_id": {
|
|
"type": "integer"
|
|
},
|
|
"sender_agent_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"adminkindboxreqparam.DeliverKindBoxReqResponse": {
|
|
"type": "object"
|
|
},
|
|
"adminkindboxreqparam.KindBoxReqAcceptRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count_accepted": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"adminkindboxreqparam.KindBoxReqAcceptResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count_accepted": {
|
|
"type": "integer"
|
|
},
|
|
"count_requested": {
|
|
"type": "integer"
|
|
},
|
|
"deliver_address_id": {
|
|
"type": "integer"
|
|
},
|
|
"deliver_refer_date": {
|
|
"type": "string"
|
|
},
|
|
"kind_box_req_id": {
|
|
"type": "integer"
|
|
},
|
|
"kind_box_req_status": {
|
|
"$ref": "#/definitions/entity.KindBoxReqStatus"
|
|
}
|
|
}
|
|
},
|
|
"adminkindboxreqparam.KindBoxReqGetAllResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"allKindBoxReq": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/entity.KindBoxReq"
|
|
}
|
|
},
|
|
"pagination": {
|
|
"$ref": "#/definitions/param.PaginationResponse"
|
|
}
|
|
}
|
|
},
|
|
"adminkindboxreqparam.KindBoxReqRejectRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"adminkindboxreqparam.KindBoxReqRejectResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"benefactor_id": {
|
|
"type": "integer"
|
|
},
|
|
"count_requested": {
|
|
"type": "integer"
|
|
},
|
|
"deliver_address_id": {
|
|
"type": "integer"
|
|
},
|
|
"deliver_refer_date": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"kind_box_type": {
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/entity.KindBoxReqStatus"
|
|
}
|
|
}
|
|
},
|
|
"adminserviceparam.LoginWithPhoneNumberRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"phone_number": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"adminserviceparam.LoginWithPhoneNumberResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"admin": {
|
|
"$ref": "#/definitions/entity.Admin"
|
|
},
|
|
"tokens": {
|
|
"$ref": "#/definitions/adminserviceparam.Tokens"
|
|
}
|
|
}
|
|
},
|
|
"adminserviceparam.RegisterRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"first_name": {
|
|
"type": "string"
|
|
},
|
|
"gender": {
|
|
"$ref": "#/definitions/entity.Gender"
|
|
},
|
|
"last_name": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"phone_number": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"$ref": "#/definitions/entity.AdminRole"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/entity.AdminStatus"
|
|
}
|
|
}
|
|
},
|
|
"adminserviceparam.RegisterResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"admin": {
|
|
"$ref": "#/definitions/entity.Admin"
|
|
}
|
|
}
|
|
},
|
|
"adminserviceparam.Tokens": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_token": {
|
|
"type": "string"
|
|
},
|
|
"refresh_token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"benefactoreparam.BenefactroInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"first_name": {
|
|
"type": "string",
|
|
"example": "mehdi"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"example": "rez"
|
|
},
|
|
"role": {
|
|
"type": "string",
|
|
"example": "benefactor"
|
|
}
|
|
}
|
|
},
|
|
"benefactoreparam.LoginOrRegisterRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "09198829528"
|
|
},
|
|
"verification_code": {
|
|
"type": "string",
|
|
"example": "123456"
|
|
}
|
|
}
|
|
},
|
|
"benefactoreparam.LoginOrRegisterResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"benefactore_info": {
|
|
"$ref": "#/definitions/benefactoreparam.BenefactroInfo"
|
|
},
|
|
"tokens": {
|
|
"$ref": "#/definitions/benefactoreparam.Tokens"
|
|
}
|
|
}
|
|
},
|
|
"benefactoreparam.SendOtpRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "09198829528"
|
|
}
|
|
}
|
|
},
|
|
"benefactoreparam.SendOtpResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"description": "this just use in test .env\n\t\tTODO - remove it after test",
|
|
"type": "string"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "09198829528"
|
|
}
|
|
}
|
|
},
|
|
"benefactoreparam.Tokens": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_token": {
|
|
"type": "string"
|
|
},
|
|
"refresh_token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"benefactorkindboxparam.KindBoxGetResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "integer"
|
|
},
|
|
"benefactorID": {
|
|
"type": "integer"
|
|
},
|
|
"deliverAddressID": {
|
|
"type": "integer"
|
|
},
|
|
"deliverReferDate": {
|
|
"type": "string"
|
|
},
|
|
"deliveredAt": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"kindBoxReqID": {
|
|
"type": "integer"
|
|
},
|
|
"receiverAgentID": {
|
|
"type": "integer"
|
|
},
|
|
"returnAddressID": {
|
|
"type": "integer"
|
|
},
|
|
"returnReferDate": {
|
|
"type": "string"
|
|
},
|
|
"returnedAt": {
|
|
"type": "string"
|
|
},
|
|
"senderAgentID": {
|
|
"type": "integer"
|
|
},
|
|
"serialNumber": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/entity.KindBoxStatus"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
}
|
|
}
|
|
},
|
|
"benefactorkindboxreqparam.KindBoxReqAddRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"benefactor_id": {
|
|
"type": "integer"
|
|
},
|
|
"count_requested": {
|
|
"type": "integer"
|
|
},
|
|
"deliver_address_id": {
|
|
"type": "integer"
|
|
},
|
|
"deliver_refer_date": {
|
|
"type": "string"
|
|
},
|
|
"type_id": {
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
}
|
|
}
|
|
},
|
|
"benefactorkindboxreqparam.KindBoxReqAddResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"kind_box_req": {
|
|
"$ref": "#/definitions/entity.KindBoxReq"
|
|
}
|
|
}
|
|
},
|
|
"benefactorkindboxreqparam.KindBoxReqGetResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"benefactorID": {
|
|
"type": "integer"
|
|
},
|
|
"countAccepted": {
|
|
"type": "integer"
|
|
},
|
|
"countRequested": {
|
|
"type": "integer"
|
|
},
|
|
"deliverAddressID": {
|
|
"type": "integer"
|
|
},
|
|
"deliverReferDate": {
|
|
"type": "string"
|
|
},
|
|
"deliveredAt": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"kindBoxType": {
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
},
|
|
"senderAgentID": {
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/entity.KindBoxReqStatus"
|
|
}
|
|
}
|
|
},
|
|
"entity.Address": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"benefactorID": {
|
|
"type": "integer"
|
|
},
|
|
"cityID": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"isMain": {
|
|
"type": "boolean"
|
|
},
|
|
"lat": {
|
|
"type": "number"
|
|
},
|
|
"lon": {
|
|
"type": "number"
|
|
},
|
|
"postalCode": {
|
|
"type": "string"
|
|
},
|
|
"provinceID": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"entity.Admin": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"firstName": {
|
|
"type": "string"
|
|
},
|
|
"gender": {
|
|
"$ref": "#/definitions/entity.Gender"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"lastName": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"phoneNumber": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"$ref": "#/definitions/entity.AdminRole"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/entity.AdminStatus"
|
|
}
|
|
}
|
|
},
|
|
"entity.AdminRole": {
|
|
"type": "integer",
|
|
"enum": [
|
|
1,
|
|
2,
|
|
3
|
|
],
|
|
"x-enum-varnames": [
|
|
"AdminSuperAdminRole",
|
|
"AdminAdminRole",
|
|
"AdminAgentRole"
|
|
]
|
|
},
|
|
"entity.AdminStatus": {
|
|
"type": "integer",
|
|
"enum": [
|
|
1,
|
|
2
|
|
],
|
|
"x-enum-varnames": [
|
|
"AdminActiveStatus",
|
|
"AdminInactiveStatus"
|
|
]
|
|
},
|
|
"entity.City": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"provinceID": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"entity.Gender": {
|
|
"type": "integer",
|
|
"enum": [
|
|
1,
|
|
2
|
|
],
|
|
"x-enum-varnames": [
|
|
"MaleGender",
|
|
"FemaleGender"
|
|
]
|
|
},
|
|
"entity.KindBoxReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"benefactorID": {
|
|
"type": "integer"
|
|
},
|
|
"countAccepted": {
|
|
"type": "integer"
|
|
},
|
|
"countRequested": {
|
|
"type": "integer"
|
|
},
|
|
"deliverAddressID": {
|
|
"type": "integer"
|
|
},
|
|
"deliverReferDate": {
|
|
"type": "string"
|
|
},
|
|
"deliveredAt": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"kindBoxType": {
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
},
|
|
"senderAgentID": {
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/entity.KindBoxReqStatus"
|
|
}
|
|
}
|
|
},
|
|
"entity.KindBoxReqStatus": {
|
|
"type": "integer",
|
|
"enum": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5
|
|
],
|
|
"x-enum-varnames": [
|
|
"KindBoxReqPendingStatus",
|
|
"KindBoxReqAcceptedStatus",
|
|
"KindBoxReqAssignedSenderAgentStatus",
|
|
"KindBoxReqRejectedStatus",
|
|
"KindBoxReqDeliveredStatus"
|
|
]
|
|
},
|
|
"entity.KindBoxStatus": {
|
|
"type": "integer",
|
|
"enum": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5
|
|
],
|
|
"x-enum-varnames": [
|
|
"KindBoxDeliveredStatus",
|
|
"KindBoxReadyToReturnStatus",
|
|
"KindBoxAssignedReceiverAgentStatus",
|
|
"KindBoxReturnedStatus",
|
|
"KindBoxEnumeratedStatus"
|
|
]
|
|
},
|
|
"entity.KindBoxType": {
|
|
"type": "integer",
|
|
"enum": [
|
|
1,
|
|
2,
|
|
3
|
|
],
|
|
"x-enum-varnames": [
|
|
"KindBoxOnTable",
|
|
"KindBoxCylindrical",
|
|
"KindBoxStandUp"
|
|
]
|
|
},
|
|
"entity.Province": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"param.PaginationResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"pageNumber": {
|
|
"type": "integer"
|
|
},
|
|
"pageSize": {
|
|
"type": "integer"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"AuthBearerAdmin": {
|
|
"type": "apiKey",
|
|
"name": "Authorization admin",
|
|
"in": "header"
|
|
},
|
|
"AuthBearerBenefactor": {
|
|
"type": "apiKey",
|
|
"name": "Authorization Benefactor",
|
|
"in": "header"
|
|
}
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = &swag.Spec{
|
|
Version: "",
|
|
Host: "",
|
|
BasePath: "",
|
|
Schemes: []string{},
|
|
Title: "",
|
|
Description: "",
|
|
InfoInstanceName: "swagger",
|
|
SwaggerTemplate: docTemplate,
|
|
LeftDelim: "{{",
|
|
RightDelim: "}}",
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|