Introduces a branch_user join table linking branches to users, plus create/delete API endpoints under the auth module for managing branch assignments. The create response includes the branch's localized name via a join. Regenerated swagger docs to include the new endpoints. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
3517 lines
116 KiB
Go
3517 lines
116 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": {
|
|
"/branch-users": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Creates a branch-user assignment",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Assign user to branch",
|
|
"parameters": [
|
|
{
|
|
"description": "Branch-user payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/auth.CreateBranchUserDTO"
|
|
}
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/branch-users/{id}": {
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Deletes a branch-user assignment",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Remove user from branch",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Branch-user 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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/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 code",
|
|
"name": "unique_code",
|
|
"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 name",
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/permissions": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns paginated permissions with optional filters",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"permission"
|
|
],
|
|
"summary": "List permissions",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Filter by name",
|
|
"name": "permission_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 permission",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"permission"
|
|
],
|
|
"summary": "Create permission",
|
|
"parameters": [
|
|
{
|
|
"description": "Permission payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/permission.CreatePermissionDTO"
|
|
}
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/permissions/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a single permission",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"permission"
|
|
],
|
|
"summary": "Get permission by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Permission 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 permission",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"permission"
|
|
],
|
|
"summary": "Update permission",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Permission ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Permission payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/permission.UpdatePermissionDTO"
|
|
}
|
|
}
|
|
],
|
|
"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 permission",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"permission"
|
|
],
|
|
"summary": "Delete permission",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Permission 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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/roles": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns paginated roles with optional filters",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"role"
|
|
],
|
|
"summary": "List roles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Filter by name",
|
|
"name": "role_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 role",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"role"
|
|
],
|
|
"summary": "Create role",
|
|
"parameters": [
|
|
{
|
|
"description": "Role payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/role.CreateRoleDTO"
|
|
}
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/roles/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a single role",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"role"
|
|
],
|
|
"summary": "Get role by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Role 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 role",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"role"
|
|
],
|
|
"summary": "Update role",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Role ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Role payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/role.UpdateRoleDTO"
|
|
}
|
|
}
|
|
],
|
|
"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 role",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"role"
|
|
],
|
|
"summary": "Delete role",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Role 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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns paginated users with optional filters",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "List users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Filter by username",
|
|
"name": "username",
|
|
"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 user",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Create user",
|
|
"parameters": [
|
|
{
|
|
"description": "User payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/user.CreateUserDTO"
|
|
}
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a single user",
|
|
"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/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 user",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Update user",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "User payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/user.UpdateUserDTO"
|
|
}
|
|
}
|
|
],
|
|
"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 user",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Delete user",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "User 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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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.CreateBranchUserDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"branchId",
|
|
"userId"
|
|
],
|
|
"properties": {
|
|
"branchId": {
|
|
"type": "integer"
|
|
},
|
|
"userId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"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",
|
|
"name",
|
|
"region"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"address": {
|
|
"$ref": "#/definitions/branches.LocalizedText"
|
|
},
|
|
"billingPassword": {
|
|
"type": "string"
|
|
},
|
|
"billingSberPassword": {
|
|
"type": "string"
|
|
},
|
|
"billingSberUsername": {
|
|
"type": "string"
|
|
},
|
|
"billingSwiftPassword": {
|
|
"type": "string"
|
|
},
|
|
"billingSwiftUsername": {
|
|
"type": "string"
|
|
},
|
|
"billingUsername": {
|
|
"type": "string"
|
|
},
|
|
"billingVisaMasterPassword": {
|
|
"type": "string"
|
|
},
|
|
"billingVisaMasterUsername": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"$ref": "#/definitions/branches.LocalizedText"
|
|
},
|
|
"phoneNumbers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"provinceId": {
|
|
"type": "integer"
|
|
},
|
|
"region": {
|
|
"type": "string"
|
|
},
|
|
"uniqueCode": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"branches.LocalizedText": {
|
|
"type": "object",
|
|
"properties": {
|
|
"en": {
|
|
"type": "string"
|
|
},
|
|
"ru": {
|
|
"type": "string"
|
|
},
|
|
"tm": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"branches.UpdateBranchDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"address",
|
|
"name",
|
|
"region"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"address": {
|
|
"$ref": "#/definitions/branches.LocalizedText"
|
|
},
|
|
"billingPassword": {
|
|
"type": "string"
|
|
},
|
|
"billingSberPassword": {
|
|
"type": "string"
|
|
},
|
|
"billingSberUsername": {
|
|
"type": "string"
|
|
},
|
|
"billingSwiftPassword": {
|
|
"type": "string"
|
|
},
|
|
"billingSwiftUsername": {
|
|
"type": "string"
|
|
},
|
|
"billingUsername": {
|
|
"type": "string"
|
|
},
|
|
"billingVisaMasterPassword": {
|
|
"type": "string"
|
|
},
|
|
"billingVisaMasterUsername": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"$ref": "#/definitions/branches.LocalizedText"
|
|
},
|
|
"phoneNumbers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"provinceId": {
|
|
"type": "integer"
|
|
},
|
|
"region": {
|
|
"type": "string"
|
|
},
|
|
"uniqueCode": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"loansdocument.CreateLoanDocumentDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"loansdocument.UpdateLoanDocumentActiveDTO": {
|
|
"type": "object",
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"loansdocument.UpdateLoanDocumentDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"loantype.CreateLoanTypeDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"content",
|
|
"loanTerm",
|
|
"tax",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"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": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"content": {
|
|
"$ref": "#/definitions/loantype.LocalizedTitle"
|
|
},
|
|
"loanTerm": {
|
|
"type": "string"
|
|
},
|
|
"tax": {
|
|
"type": "number"
|
|
},
|
|
"title": {
|
|
"$ref": "#/definitions/loantype.LocalizedTitle"
|
|
}
|
|
}
|
|
},
|
|
"paymentcard.CreatePaymentCardDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"price",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"notes": {
|
|
"type": "string"
|
|
},
|
|
"price": {
|
|
"type": "string"
|
|
},
|
|
"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": [
|
|
"price",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"notes": {
|
|
"type": "string"
|
|
},
|
|
"price": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"$ref": "#/definitions/paymentcard.LocalizedText"
|
|
}
|
|
}
|
|
},
|
|
"permission.CreatePermissionDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"code",
|
|
"guardName",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"guardName": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"permission.UpdatePermissionDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"code",
|
|
"guardName",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"guardName": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"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": [
|
|
"price",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"notes": {
|
|
"type": "string"
|
|
},
|
|
"price": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"$ref": "#/definitions/reasonscard.LocalizedText"
|
|
}
|
|
}
|
|
},
|
|
"reasonscard.LocalizedText": {
|
|
"type": "object",
|
|
"properties": {
|
|
"en": {
|
|
"type": "string"
|
|
},
|
|
"ru": {
|
|
"type": "string"
|
|
},
|
|
"tm": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"reasonscard.UpdateReasonCardDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"price",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"notes": {
|
|
"type": "string"
|
|
},
|
|
"price": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"$ref": "#/definitions/reasonscard.LocalizedText"
|
|
}
|
|
}
|
|
},
|
|
"role.CreateRoleDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"code",
|
|
"guardName",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"guardName": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"role.UpdateRoleDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"code",
|
|
"guardName",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"guardName": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"user.CreateUserDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"email",
|
|
"fullname",
|
|
"password",
|
|
"username"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"avatar": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"fullname": {
|
|
"type": "string"
|
|
},
|
|
"lightMode": {
|
|
"type": "integer"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"phoneNumber": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"type": "string"
|
|
},
|
|
"socialMedia": {
|
|
"$ref": "#/definitions/user.SocialMedia"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"user.SocialMedia": {
|
|
"type": "object",
|
|
"properties": {
|
|
"facebook": {
|
|
"type": "string"
|
|
},
|
|
"instagram": {
|
|
"type": "string"
|
|
},
|
|
"telegram": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"user.UpdateUserDTO": {
|
|
"type": "object",
|
|
"required": [
|
|
"email",
|
|
"fullname",
|
|
"username"
|
|
],
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"avatar": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"fullname": {
|
|
"type": "string"
|
|
},
|
|
"lightMode": {
|
|
"type": "integer"
|
|
},
|
|
"phoneNumber": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"type": "string"
|
|
},
|
|
"socialMedia": {
|
|
"$ref": "#/definitions/user.SocialMedia"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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)
|
|
}
|