2415 lines
80 KiB
Go
2415 lines
80 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": {
|
|
"/branches": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns paginated branches with optional filters",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branches"
|
|
],
|
|
"summary": "List branches",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Filter by province ID",
|
|
"name": "province_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Filter by province name (en, ru, tm)",
|
|
"name": "province_name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Filter by branch name (en, ru, tm)",
|
|
"name": "branch_name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Filter by unique number",
|
|
"name": "unikal_nomer",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "Items per page",
|
|
"name": "limit",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Creates a new branch",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branches"
|
|
],
|
|
"summary": "Create branch",
|
|
"parameters": [
|
|
{
|
|
"description": "Branch payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/branches.CreateBranchDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/branches/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a single branch",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branches"
|
|
],
|
|
"summary": "Get branch by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Branch ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Updates an existing branch",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branches"
|
|
],
|
|
"summary": "Update branch",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Branch ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Branch payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/branches.UpdateBranchDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Deletes a branch",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branches"
|
|
],
|
|
"summary": "Delete branch",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Branch ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/loan-types": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns paginated loan types with optional filters",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"loan-type"
|
|
],
|
|
"summary": "List loan types",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Filter by title (en, ru, tm)",
|
|
"name": "loan_type_name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "Items per page",
|
|
"name": "limit",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Creates a new loan type",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"loan-type"
|
|
],
|
|
"summary": "Create loan type",
|
|
"parameters": [
|
|
{
|
|
"description": "Loan type payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/loantype.CreateLoanTypeDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/loan-types/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a single loan type",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"loan-type"
|
|
],
|
|
"summary": "Get loan type by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Loan type ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Updates an existing loan type",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"loan-type"
|
|
],
|
|
"summary": "Update loan type",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Loan type ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Loan type payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/loantype.UpdateLoanTypeDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Deletes a loan type",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"loan-type"
|
|
],
|
|
"summary": "Delete loan type",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Loan type ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/loans-documents": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns paginated loan documents with optional filters",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"loan-document"
|
|
],
|
|
"summary": "List loan documents",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Filter by title (en, ru, tm)",
|
|
"name": "document_name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "Filter by active",
|
|
"name": "active",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "Items per page",
|
|
"name": "limit",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Creates a new loan document",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"loan-document"
|
|
],
|
|
"summary": "Create loan document",
|
|
"parameters": [
|
|
{
|
|
"description": "Loan document payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/loansdocument.CreateLoanDocumentDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/loans-documents/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a single loan document",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"loan-document"
|
|
],
|
|
"summary": "Get loan document by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Loan document ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Updates an existing loan document",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"loan-document"
|
|
],
|
|
"summary": "Update loan document",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Loan document ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Loan document payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/loansdocument.UpdateLoanDocumentDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Deletes a loan document",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"loan-document"
|
|
],
|
|
"summary": "Delete loan document",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Loan document ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/loans-documents/{id}/active": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Enables or disables a loan document",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"loan-document"
|
|
],
|
|
"summary": "Update loan document active",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Loan document ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Active payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/loansdocument.UpdateLoanDocumentActiveDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/login": {
|
|
"post": {
|
|
"description": "Authenticates a user by email and password",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Login",
|
|
"parameters": [
|
|
{
|
|
"description": "Login payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/auth.LoginDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payment-cards": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns paginated payment cards with optional filters",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"payment-card"
|
|
],
|
|
"summary": "List payment cards",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Filter by card title (en, ru, tm)",
|
|
"name": "card_name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "Filter by active",
|
|
"name": "active",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "Items per page",
|
|
"name": "limit",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Creates a new payment card",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"payment-card"
|
|
],
|
|
"summary": "Create payment card",
|
|
"parameters": [
|
|
{
|
|
"description": "Payment card payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/paymentcard.CreatePaymentCardDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payment-cards/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a single payment card",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"payment-card"
|
|
],
|
|
"summary": "Get payment card by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Payment card ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Updates an existing payment card",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"payment-card"
|
|
],
|
|
"summary": "Update payment card",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Payment card ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Payment card payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/paymentcard.UpdatePaymentCardDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Deletes a payment card",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"payment-card"
|
|
],
|
|
"summary": "Delete payment card",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Payment card ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payment-cards/{id}/active": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Enables or disables a payment card",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"payment-card"
|
|
],
|
|
"summary": "Update payment card active",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Payment card ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Active payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/paymentcard.UpdatePaymentCardActiveDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/profile": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns the authenticated user's profile",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Get profile",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/provinces": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns all provinces",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"province"
|
|
],
|
|
"summary": "List provinces",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Creates a new province",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"province"
|
|
],
|
|
"summary": "Create province",
|
|
"parameters": [
|
|
{
|
|
"description": "Province payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/province.CreateProvinceDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/provinces/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a single province",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"province"
|
|
],
|
|
"summary": "Get province by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Province ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Updates an existing province",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"province"
|
|
],
|
|
"summary": "Update province",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Province ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Province payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/province.UpdateProvinceDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Deletes a province",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"province"
|
|
],
|
|
"summary": "Delete province",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Province ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/reasons-cards": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns paginated reason cards with optional filters",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"reason-card"
|
|
],
|
|
"summary": "List reason cards",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Filter by title (en, ru, tm)",
|
|
"name": "reason_name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "Items per page",
|
|
"name": "limit",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Creates a new reason card",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"reason-card"
|
|
],
|
|
"summary": "Create reason card",
|
|
"parameters": [
|
|
{
|
|
"description": "Reason card payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/reasonscard.CreateReasonCardDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/reasons-cards/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a single reason card",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"reason-card"
|
|
],
|
|
"summary": "Get reason card by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Reason card ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Updates an existing reason card",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"reason-card"
|
|
],
|
|
"summary": "Update reason card",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Reason card ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Reason card payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/reasonscard.UpdateReasonCardDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Deletes a reason card",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"reason-card"
|
|
],
|
|
"summary": "Delete reason card",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Reason card ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/token": {
|
|
"post": {
|
|
"description": "Issues a new access and refresh token pair",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Refresh tokens",
|
|
"parameters": [
|
|
{
|
|
"description": "Refresh token payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/auth.RefreshTokenDTO"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppSuccess"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/appresult.AppError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"appresult.AppError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"appresult.AppSuccess": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"data": {},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"auth.LoginDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"email",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"auth.RefreshTokenDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"refreshToken"
|
|
],
|
|
"properties": {
|
|
"refreshToken": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"branches.CreateBranchDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"address",
|
|
"provinceId",
|
|
"title",
|
|
"unikalNomer"
|
|
],
|
|
"properties": {
|
|
"address": {
|
|
"$ref": "#/definitions/branches.LocalizedText"
|
|
},
|
|
"billingPassword": {
|
|
"type": "string"
|
|
},
|
|
"billingPasswordSber": {
|
|
"type": "string"
|
|
},
|
|
"billingPasswordSwift": {
|
|
"type": "string"
|
|
},
|
|
"billingPasswordVisa": {
|
|
"type": "string"
|
|
},
|
|
"billingUsername": {
|
|
"type": "string"
|
|
},
|
|
"billingUsernameSber": {
|
|
"type": "string"
|
|
},
|
|
"billingUsernameSwift": {
|
|
"type": "string"
|
|
},
|
|
"billingUsernameVisa": {
|
|
"type": "string"
|
|
},
|
|
"provinceId": {
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"$ref": "#/definitions/branches.LocalizedText"
|
|
},
|
|
"unikalNomer": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"branches.LocalizedText": {
|
|
"type": "object",
|
|
"properties": {
|
|
"en": {
|
|
"type": "string"
|
|
},
|
|
"ru": {
|
|
"type": "string"
|
|
},
|
|
"tm": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"branches.UpdateBranchDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"address",
|
|
"provinceId",
|
|
"title",
|
|
"unikalNomer"
|
|
],
|
|
"properties": {
|
|
"address": {
|
|
"$ref": "#/definitions/branches.LocalizedText"
|
|
},
|
|
"billingPassword": {
|
|
"type": "string"
|
|
},
|
|
"billingPasswordSber": {
|
|
"type": "string"
|
|
},
|
|
"billingPasswordSwift": {
|
|
"type": "string"
|
|
},
|
|
"billingPasswordVisa": {
|
|
"type": "string"
|
|
},
|
|
"billingUsername": {
|
|
"type": "string"
|
|
},
|
|
"billingUsernameSber": {
|
|
"type": "string"
|
|
},
|
|
"billingUsernameSwift": {
|
|
"type": "string"
|
|
},
|
|
"billingUsernameVisa": {
|
|
"type": "string"
|
|
},
|
|
"provinceId": {
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"$ref": "#/definitions/branches.LocalizedText"
|
|
},
|
|
"unikalNomer": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"loansdocument.CreateLoanDocumentDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"contentEn",
|
|
"contentRu",
|
|
"contentTm",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"contentEn": {
|
|
"type": "string"
|
|
},
|
|
"contentRu": {
|
|
"type": "string"
|
|
},
|
|
"contentTm": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"$ref": "#/definitions/loansdocument.LocalizedTitle"
|
|
}
|
|
}
|
|
},
|
|
"loansdocument.LocalizedTitle": {
|
|
"type": "object",
|
|
"properties": {
|
|
"en": {
|
|
"type": "string"
|
|
},
|
|
"ru": {
|
|
"type": "string"
|
|
},
|
|
"tm": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"loansdocument.UpdateLoanDocumentActiveDTO": {
|
|
"type": "object",
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"loansdocument.UpdateLoanDocumentDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"contentEn",
|
|
"contentRu",
|
|
"contentTm",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"contentEn": {
|
|
"type": "string"
|
|
},
|
|
"contentRu": {
|
|
"type": "string"
|
|
},
|
|
"contentTm": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"$ref": "#/definitions/loansdocument.LocalizedTitle"
|
|
}
|
|
}
|
|
},
|
|
"loantype.CreateLoanTypeDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"content",
|
|
"loanTerm",
|
|
"tax",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"content": {
|
|
"$ref": "#/definitions/loantype.LocalizedTitle"
|
|
},
|
|
"loanTerm": {
|
|
"type": "string"
|
|
},
|
|
"tax": {
|
|
"type": "number"
|
|
},
|
|
"title": {
|
|
"$ref": "#/definitions/loantype.LocalizedTitle"
|
|
}
|
|
}
|
|
},
|
|
"loantype.LocalizedTitle": {
|
|
"type": "object",
|
|
"properties": {
|
|
"en": {
|
|
"type": "string"
|
|
},
|
|
"ru": {
|
|
"type": "string"
|
|
},
|
|
"tm": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"loantype.UpdateLoanTypeDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"content",
|
|
"loanTerm",
|
|
"tax",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"content": {
|
|
"$ref": "#/definitions/loantype.LocalizedTitle"
|
|
},
|
|
"loanTerm": {
|
|
"type": "string"
|
|
},
|
|
"tax": {
|
|
"type": "number"
|
|
},
|
|
"title": {
|
|
"$ref": "#/definitions/loantype.LocalizedTitle"
|
|
}
|
|
}
|
|
},
|
|
"paymentcard.CreatePaymentCardDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"content",
|
|
"price",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"content": {
|
|
"$ref": "#/definitions/paymentcard.LocalizedText"
|
|
},
|
|
"price": {
|
|
"type": "number"
|
|
},
|
|
"title": {
|
|
"$ref": "#/definitions/paymentcard.LocalizedText"
|
|
}
|
|
}
|
|
},
|
|
"paymentcard.LocalizedText": {
|
|
"type": "object",
|
|
"properties": {
|
|
"en": {
|
|
"type": "string"
|
|
},
|
|
"ru": {
|
|
"type": "string"
|
|
},
|
|
"tm": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"paymentcard.UpdatePaymentCardActiveDTO": {
|
|
"type": "object",
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"paymentcard.UpdatePaymentCardDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"content",
|
|
"price",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"content": {
|
|
"$ref": "#/definitions/paymentcard.LocalizedText"
|
|
},
|
|
"price": {
|
|
"type": "number"
|
|
},
|
|
"title": {
|
|
"$ref": "#/definitions/paymentcard.LocalizedText"
|
|
}
|
|
}
|
|
},
|
|
"province.CreateProvinceDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"region"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"$ref": "#/definitions/province.LocalizedName"
|
|
},
|
|
"region": {
|
|
"$ref": "#/definitions/province.LocalizedName"
|
|
}
|
|
}
|
|
},
|
|
"province.LocalizedName": {
|
|
"type": "object",
|
|
"properties": {
|
|
"en": {
|
|
"type": "string"
|
|
},
|
|
"ru": {
|
|
"type": "string"
|
|
},
|
|
"tm": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"province.UpdateProvinceDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"region"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"$ref": "#/definitions/province.LocalizedName"
|
|
},
|
|
"region": {
|
|
"$ref": "#/definitions/province.LocalizedName"
|
|
}
|
|
}
|
|
},
|
|
"reasonscard.CreateReasonCardDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"content",
|
|
"price",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"content": {
|
|
"$ref": "#/definitions/reasonscard.LocalizedText"
|
|
},
|
|
"price": {
|
|
"type": "number"
|
|
},
|
|
"title": {
|
|
"$ref": "#/definitions/reasonscard.LocalizedText"
|
|
}
|
|
}
|
|
},
|
|
"reasonscard.LocalizedText": {
|
|
"type": "object",
|
|
"properties": {
|
|
"en": {
|
|
"type": "string"
|
|
},
|
|
"ru": {
|
|
"type": "string"
|
|
},
|
|
"tm": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"reasonscard.UpdateReasonCardDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"content",
|
|
"price",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"content": {
|
|
"$ref": "#/definitions/reasonscard.LocalizedText"
|
|
},
|
|
"price": {
|
|
"type": "number"
|
|
},
|
|
"title": {
|
|
"$ref": "#/definitions/reasonscard.LocalizedText"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"BearerAuth": {
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = &swag.Spec{
|
|
Version: "1.0",
|
|
Host: "localhost:5050",
|
|
BasePath: "/api/admin",
|
|
Schemes: []string{},
|
|
Title: "Service APIs",
|
|
Description: "Online payment system admin API.",
|
|
InfoInstanceName: "swagger",
|
|
SwaggerTemplate: docTemplate,
|
|
LeftDelim: "{{",
|
|
RightDelim: "}}",
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|