// 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": "integer", "description": "Filter by location ID", "name": "location_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 status", "name": "status", "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}/status": { "put": { "security": [ { "BearerAuth": [] } ], "description": "Enables or disables a loan document", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "loan-document" ], "summary": "Update loan document status", "parameters": [ { "type": "integer", "description": "Loan document ID", "name": "id", "in": "path", "required": true }, { "description": "Status payload", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/loansdocument.UpdateLoanDocumentStatusDTO" } } ], "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" } } } } }, "/locations": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns paginated locations with optional filters", "produces": [ "application/json" ], "tags": [ "location" ], "summary": "List locations", "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 location name (en, ru, tm)", "name": "location_name", "in": "query" }, { "type": "boolean", "description": "Filter by location status", "name": "status", "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 location in a province", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "location" ], "summary": "Create location", "parameters": [ { "description": "Location payload", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/location.CreateLocationDTO" } } ], "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" } } } } }, "/locations/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns a single location", "produces": [ "application/json" ], "tags": [ "location" ], "summary": "Get location by ID", "parameters": [ { "type": "integer", "description": "Location 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 location", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "location" ], "summary": "Update location", "parameters": [ { "type": "integer", "description": "Location ID", "name": "id", "in": "path", "required": true }, { "description": "Location payload", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/location.UpdateLocationDTO" } } ], "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 location", "produces": [ "application/json" ], "tags": [ "location" ], "summary": "Delete location", "parameters": [ { "type": "integer", "description": "Location 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" } } } } }, "/locations/{id}/status": { "put": { "security": [ { "BearerAuth": [] } ], "description": "Enables or disables a location", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "location" ], "summary": "Update location status", "parameters": [ { "type": "integer", "description": "Location ID", "name": "id", "in": "path", "required": true }, { "description": "Status payload", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/location.UpdateLocationStatusDTO" } } ], "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 status", "name": "status", "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}/status": { "put": { "security": [ { "BearerAuth": [] } ], "description": "Enables or disables a payment card", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "payment-card" ], "summary": "Update payment card status", "parameters": [ { "type": "integer", "description": "Payment card ID", "name": "id", "in": "path", "required": true }, { "description": "Status payload", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/paymentcard.UpdatePaymentCardStatusDTO" } } ], "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 and its locations", "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", "locationId", "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" }, "locationId": { "type": "integer" }, "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", "locationId", "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" }, "locationId": { "type": "integer" }, "provinceId": { "type": "integer" }, "title": { "$ref": "#/definitions/branches.LocalizedText" }, "unikalNomer": { "type": "string" } } }, "loansdocument.CreateLoanDocumentDTO": { "type": "object", "required": [ "contentEn", "contentRu", "contentTm", "title" ], "properties": { "contentEn": { "type": "string" }, "contentRu": { "type": "string" }, "contentTm": { "type": "string" }, "status": { "type": "boolean" }, "title": { "$ref": "#/definitions/loansdocument.LocalizedTitle" } } }, "loansdocument.LocalizedTitle": { "type": "object", "properties": { "en": { "type": "string" }, "ru": { "type": "string" }, "tm": { "type": "string" } } }, "loansdocument.UpdateLoanDocumentDTO": { "type": "object", "required": [ "contentEn", "contentRu", "contentTm", "title" ], "properties": { "contentEn": { "type": "string" }, "contentRu": { "type": "string" }, "contentTm": { "type": "string" }, "status": { "type": "boolean" }, "title": { "$ref": "#/definitions/loansdocument.LocalizedTitle" } } }, "loansdocument.UpdateLoanDocumentStatusDTO": { "type": "object", "properties": { "status": { "type": "boolean" } } }, "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" } } }, "location.CreateLocationDTO": { "type": "object", "required": [ "provinceId", "title" ], "properties": { "provinceId": { "type": "integer" }, "status": { "type": "boolean" }, "title": { "$ref": "#/definitions/location.LocalizedTitle" } } }, "location.LocalizedTitle": { "type": "object", "properties": { "en": { "type": "string" }, "ru": { "type": "string" }, "tm": { "type": "string" } } }, "location.UpdateLocationDTO": { "type": "object", "required": [ "provinceId", "title" ], "properties": { "provinceId": { "type": "integer" }, "status": { "type": "boolean" }, "title": { "$ref": "#/definitions/location.LocalizedTitle" } } }, "location.UpdateLocationStatusDTO": { "type": "object", "properties": { "status": { "type": "boolean" } } }, "paymentcard.CreatePaymentCardDTO": { "type": "object", "required": [ "content", "price", "title" ], "properties": { "content": { "$ref": "#/definitions/paymentcard.LocalizedText" }, "price": { "type": "number" }, "status": { "type": "boolean" }, "title": { "$ref": "#/definitions/paymentcard.LocalizedText" } } }, "paymentcard.LocalizedText": { "type": "object", "properties": { "en": { "type": "string" }, "ru": { "type": "string" }, "tm": { "type": "string" } } }, "paymentcard.UpdatePaymentCardDTO": { "type": "object", "required": [ "content", "price", "title" ], "properties": { "content": { "$ref": "#/definitions/paymentcard.LocalizedText" }, "price": { "type": "number" }, "status": { "type": "boolean" }, "title": { "$ref": "#/definitions/paymentcard.LocalizedText" } } }, "paymentcard.UpdatePaymentCardStatusDTO": { "type": "object", "properties": { "status": { "type": "boolean" } } }, "province.CreateProvinceDTO": { "type": "object", "required": [ "title" ], "properties": { "status": { "type": "boolean" }, "title": { "$ref": "#/definitions/province.LocalizedTitle" } } }, "province.LocalizedTitle": { "type": "object", "properties": { "en": { "type": "string" }, "ru": { "type": "string" }, "tm": { "type": "string" } } }, "province.UpdateProvinceDTO": { "type": "object", "required": [ "title" ], "properties": { "status": { "type": "boolean" }, "title": { "$ref": "#/definitions/province.LocalizedTitle" } } }, "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{"http"}, Title: "Service APIs", Description: "Online payment system admin API.", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", RightDelim: "}}", } func init() { applySwaggerTagOrder() swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }