swagger: document the ?lang= query parameter on every admin endpoint
Some checks failed
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled

appresult.Localize applies to all /api/admin routes, so each handler's
godoc now declares lang (tm, ru, en, all; default tm) and Swagger UI
offers it as a dropdown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 22:08:32 +05:00
parent 72a5ac52b0
commit f1337706f0
32 changed files with 5534 additions and 0 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -52,6 +52,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Security BearerAuth
// @Param from query string false "Start date YYYY-MM-DD (inclusive)" default(Jan 1 of current year)
// @Param to query string false "End date YYYY-MM-DD (inclusive)" default(today)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -86,6 +87,7 @@ func (h *handler) finance(c *gin.Context) {
// @Security BearerAuth
// @Param from query string false "Start date YYYY-MM-DD (inclusive)" default(Jan 1 of current year)
// @Param to query string false "End date YYYY-MM-DD (inclusive)" default(today)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -111,6 +113,7 @@ func (h *handler) backlog(c *gin.Context) {
// @Security BearerAuth
// @Param from query string false "Start date YYYY-MM-DD (inclusive)" default(Jan 1 of current year)
// @Param to query string false "End date YYYY-MM-DD (inclusive)" default(today)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -136,6 +139,7 @@ func (h *handler) branches(c *gin.Context) {
// @Security BearerAuth
// @Param from query string false "Start date YYYY-MM-DD (inclusive)" default(Jan 1 of current year)
// @Param to query string false "End date YYYY-MM-DD (inclusive)" default(today)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -161,6 +165,7 @@ func (h *handler) products(c *gin.Context) {
// @Security BearerAuth
// @Param from query string false "Start date YYYY-MM-DD (inclusive)" default(Jan 1 of current year)
// @Param to query string false "End date YYYY-MM-DD (inclusive)" default(today)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -187,6 +192,7 @@ func (h *handler) customers(c *gin.Context) {
// @Param from query string false "Start date YYYY-MM-DD (inclusive)" default(Jan 1 of current year)
// @Param to query string false "End date YYYY-MM-DD (inclusive)" default(today)
// @Param operator_limit query int false "Number of operators to return" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError

View File

@@ -46,6 +46,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param status query string false "Filter by status (pending, completed, failed)"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -74,6 +75,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Backup ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -106,6 +108,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Tags backups
// @Produce json
// @Security BearerAuth
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 500 {object} appresult.AppError
// @Router /backups [post]
@@ -127,6 +130,7 @@ func (h *handler) create(c *gin.Context) {
// @Produce application/sql
// @Security BearerAuth
// @Param id path int true "Backup ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {file} file
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -168,6 +172,7 @@ func (h *handler) download(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Backup ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -46,6 +46,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param created_by query int false "Filter by creator user ID"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -74,6 +75,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Card balance ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -111,6 +113,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateCardBalanceDTO true "Card balance payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -141,6 +144,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Card balance ID"
// @Param body body UpdateCardBalanceDTO true "Card balance payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -184,6 +188,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Card balance ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -49,6 +49,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param region query string false "Filter by region"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -77,6 +78,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Card order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -114,6 +116,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateCardOrderDTO true "Card order payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -145,6 +148,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Card order ID"
// @Param body body UpdateCardOrderDTO true "Card order payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -189,6 +193,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Card order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -48,6 +48,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param region query string false "Filter by region"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -76,6 +77,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Card pin order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -113,6 +115,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateCardPinOrderDTO true "Card pin order payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -143,6 +146,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Card pin order ID"
// @Param body body UpdateCardPinOrderDTO true "Card pin order payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -186,6 +190,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Card pin order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -48,6 +48,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param region query string false "Filter by region"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -76,6 +77,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Card rekwizit order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -113,6 +115,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateCardRekwizitOrderDTO true "Card rekwizit order payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -143,6 +146,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Card rekwizit order ID"
// @Param body body UpdateCardRekwizitOrderDTO true "Card rekwizit order payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -186,6 +190,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Card rekwizit order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -45,6 +45,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param type query string false "Filter by card type"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -73,6 +74,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Card ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -117,6 +119,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateCardDTO true "Card payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -147,6 +150,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Card ID"
// @Param body body UpdateCardDTO true "Card payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -190,6 +194,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Card ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -47,6 +47,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param active query bool false "Filter by active"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -75,6 +76,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Payment card ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -109,6 +111,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreatePaymentCardDTO true "Payment card payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -139,6 +142,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Payment card ID"
// @Param body body UpdatePaymentCardDTO true "Payment card payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -180,6 +184,7 @@ func (h *handler) update(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Payment card ID"
// @Param body body UpdatePaymentCardActiveDTO true "Active payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -219,6 +224,7 @@ func (h *handler) updateActive(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Payment card ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -44,6 +44,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param reason_name query string false "Filter by title (en, ru, tm)"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -72,6 +73,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Reason card ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -106,6 +108,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateReasonCardDTO true "Reason card payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -136,6 +139,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Reason card ID"
// @Param body body UpdateReasonCardDTO true "Reason card payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -175,6 +179,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Reason card ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -54,6 +54,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param region query string false "Filter by region"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -81,6 +82,7 @@ func (h *handler) list(c *gin.Context) {
// @Param region query string false "Filter by region"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -113,6 +115,7 @@ func (h *handler) respondList(c *gin.Context, filter ListFilter) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Visa/master payment order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -150,6 +153,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateVisaMasterPaymentOrderDTO true "Visa/master payment order payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -180,6 +184,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Visa/master payment order ID"
// @Param body body UpdateVisaMasterPaymentOrderDTO true "Visa/master payment order payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -223,6 +228,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Visa/master payment order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -48,6 +48,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param currency_to query string false "Filter by target currency"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} ListCurrencyDTO
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -76,6 +77,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Currency ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} CurrencyDTO
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -110,6 +112,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateCurrencyDTO true "Currency rate payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} CurrencyDTO
// @Failure 400 {object} appresult.AppError
// @Failure 409 {object} appresult.AppError
@@ -147,6 +150,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Currency ID"
// @Param body body UpdateCurrencyDTO true "Currency rate payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} CurrencyDTO
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -193,6 +197,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Currency ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -47,6 +47,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Security BearerAuth
// @Param year query int false "Year for the monthly trend chart" default(current year)
// @Param recent_limit query int false "Number of recent activity items to return" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -75,6 +76,7 @@ func (h *handler) overview(c *gin.Context) {
// @Tags dashboard
// @Produce json
// @Security BearerAuth
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess{data=sysstats.Stats}
// @Failure 500 {object} appresult.AppError
// @Router /dashboard/server-stats [get]

View File

@@ -47,6 +47,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param action query string false "Filter by action (create, update, delete)"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -75,6 +76,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Activity log ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -55,6 +55,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Accept json
// @Produce json
// @Param body body LoginDTO true "Login payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 401 {object} appresult.AppError
@@ -91,6 +92,7 @@ func (h *handler) login(c *gin.Context) {
// @Accept json
// @Produce json
// @Param body body RegisterDTO true "Registration payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 409 {object} appresult.AppError
@@ -118,6 +120,7 @@ func (h *handler) register(c *gin.Context) {
// @Accept json
// @Produce json
// @Param body body VerifyDTO true "Verification payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 409 {object} appresult.AppError
@@ -145,6 +148,7 @@ func (h *handler) verify(c *gin.Context) {
// @Accept json
// @Produce json
// @Param body body ForgotPasswordDTO true "Forgot password payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -172,6 +176,7 @@ func (h *handler) forgotPassword(c *gin.Context) {
// @Accept json
// @Produce json
// @Param body body ResetPasswordDTO true "Reset password payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -217,6 +222,7 @@ func (h *handler) respondRegisterError(c *gin.Context, err error) {
// @Accept json
// @Produce json
// @Param body body RefreshTokenDTO true "Refresh token payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 401 {object} appresult.AppError
@@ -247,6 +253,7 @@ func (h *handler) refreshToken(c *gin.Context) {
// @Tags auth
// @Produce json
// @Security BearerAuth
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 401 {object} appresult.AppError
@@ -277,6 +284,7 @@ func (h *handler) getProfile(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body UpdateProfileDTO true "Profile payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 401 {object} appresult.AppError

View File

@@ -33,6 +33,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Tags permission
// @Produce json
// @Security BearerAuth
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Router /permissions [get]
func (h *handler) list(c *gin.Context) {

View File

@@ -46,6 +46,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param role_name query string false "Filter by name or code"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -74,6 +75,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Role ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -108,6 +110,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateRoleDTO true "Role payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 403 {object} appresult.AppError
@@ -151,6 +154,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Role ID"
// @Param body body UpdateRoleDTO true "Role payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 403 {object} appresult.AppError
@@ -202,6 +206,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Role ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 403 {object} appresult.AppError

View File

@@ -73,6 +73,7 @@ func (h *handler) RegisterPublic(engine *gin.Engine) {
// @Param username query string false "Alias for search"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -106,6 +107,7 @@ func (h *handler) list(c *gin.Context) {
// @Param username query string false "Alias for search"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -137,6 +139,7 @@ func (h *handler) listClients(c *gin.Context) {
// @Param username query string false "Alias for search"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -166,6 +169,7 @@ func (h *handler) listStaff(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "User ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -203,6 +207,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateUserDTO true "User payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 403 {object} appresult.AppError
@@ -242,6 +247,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "User ID"
// @Param body body UpdateUserDTO true "User payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 403 {object} appresult.AppError
@@ -303,6 +309,7 @@ func (h *handler) update(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "User ID"
// @Param body body SetUserRoleDTO true "Role"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 403 {object} appresult.AppError
@@ -364,6 +371,7 @@ func (h *handler) setRole(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "User ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 403 {object} appresult.AppError
@@ -547,6 +555,7 @@ func parseListFilter(c *gin.Context) (ListFilter, bool) {
// @Param file formData file true "this is a test file"
//
// @Security BearerAuth
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -589,6 +598,7 @@ func (h *handler) fileUpload(c *gin.Context) {
// @Tags file-upload
// @Produce octet-stream
// @Param file_name path string true "object name"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {file} binary
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -631,6 +641,7 @@ func (h *handler) getFile(c *gin.Context) {
// @Produce json
// @Param id path string true "object name"
// @Security BearerAuth
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 500 {object} appresult.AppError
// @Router /file/{id} [delete]

View File

@@ -40,6 +40,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateUserBranchDTO true "Branch-user payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -72,6 +73,7 @@ func (h *handler) create(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Branch-user ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -50,6 +50,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param region query string false "Filter by region"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -76,6 +77,7 @@ func (h *handler) list(c *gin.Context) {
// @Param region query string false "Filter by region"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -108,6 +110,7 @@ func (h *handler) respondList(c *gin.Context, filter ListFilter) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Loan order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -145,6 +148,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateLoanOrderDTO true "Loan order payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -179,6 +183,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Loan order ID"
// @Param body body UpdateLoanOrderDTO true "Loan order payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -222,6 +227,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Loan order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -51,6 +51,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param region query string false "Filter by region"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -80,6 +81,7 @@ func (h *handler) list(c *gin.Context) {
// @Security BearerAuth
// @Param province_id query int true "Province ID"
// @Param active query bool false "Only active branches" default(true)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -118,6 +120,7 @@ func (h *handler) listBranchesByProvince(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Loan paid off letter ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -155,6 +158,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateLoanPaidLetterDTO true "Loan paid off letter payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -185,6 +189,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Loan paid off letter ID"
// @Param body body UpdateLoanPaidLetterDTO true "Loan paid off letter payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -228,6 +233,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Loan paid off letter ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -48,6 +48,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param active query bool false "Filter by active"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -76,6 +77,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Loan document ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -110,6 +112,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateLoanDocumentDTO true "Loan document payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -140,6 +143,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Loan document ID"
// @Param body body UpdateLoanDocumentDTO true "Loan document payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -181,6 +185,7 @@ func (h *handler) update(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Loan document ID"
// @Param body body UpdateLoanDocumentActiveDTO true "Active payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -220,6 +225,7 @@ func (h *handler) updateActive(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Loan document ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -46,6 +46,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param passport_id query string false "Filter by passport ID"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -74,6 +75,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Loan repayment ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -111,6 +113,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateLoanRepaymentDTO true "Loan repayment payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -141,6 +144,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Loan repayment ID"
// @Param body body UpdateLoanRepaymentDTO true "Loan repayment payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -184,6 +188,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Loan repayment ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -46,6 +46,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param loan_type_name query string false "Filter by title (en, ru, tm)"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -74,6 +75,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Loan type ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -108,6 +110,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateLoanTypeDTO true "Loan type payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -138,6 +141,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Loan type ID"
// @Param body body UpdateLoanTypeDTO true "Loan type payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -177,6 +181,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Loan type ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -53,6 +53,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param unique_code query string false "Filter by unique code"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -81,6 +82,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param active query bool false "Only active provinces" default(true)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -110,6 +112,7 @@ func (h *handler) listRegions(c *gin.Context) {
// @Security BearerAuth
// @Param region query string true "Region name (en, ru or tm)"
// @Param active query bool false "Only active etraps" default(true)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -144,6 +147,7 @@ func (h *handler) listEtraps(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Branch ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -184,6 +188,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateBranchDTO true "Branch payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -218,6 +223,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Branch ID"
// @Param body body UpdateBranchDTO true "Branch payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -261,6 +267,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Branch ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -51,6 +51,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param active query bool false "Filter by active status"
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -79,6 +80,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Province ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -113,6 +115,7 @@ func (h *handler) getByID(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body CreateProvinceDTO true "Province payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 201 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -143,6 +146,7 @@ func (h *handler) create(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Province ID"
// @Param body body UpdateProvinceDTO true "Province payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -182,6 +186,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Province ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -52,6 +52,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Param order query string false "Sort direction" Enums(asc, desc) default(desc)
// @Param page query int false "Page number" default(1)
// @Param limit query int false "Items per page" default(10)
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} ListPaymentHistoryDTO
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -80,6 +81,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Payment ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} PaymentHistoryDetailDTO
// @Failure 400 {object} appresult.AppError
// @Failure 403 {object} appresult.AppError
@@ -117,6 +119,7 @@ func (h *handler) get(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {array} PaymentGatewayDTO
// @Failure 400 {object} appresult.AppError
// @Failure 403 {object} appresult.AppError
@@ -156,6 +159,7 @@ func (h *handler) gateway(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {array} PaymentHistoryItemDTO
// @Failure 400 {object} appresult.AppError
// @Failure 403 {object} appresult.AppError
@@ -190,6 +194,7 @@ func (h *handler) orderPayments(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {array} PaymentLogDTO
// @Failure 400 {object} appresult.AppError
// @Failure 403 {object} appresult.AppError

View File

@@ -36,6 +36,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Tags payment-settings
// @Produce json
// @Security BearerAuth
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} PaymentSettingsDTO
// @Failure 500 {object} appresult.AppError
// @Router /payment-settings [get]
@@ -58,6 +59,7 @@ func (h *handler) get(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param body body UpdatePaymentSettingsDTO true "Payment settings payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} PaymentSettingsDTO
// @Failure 400 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError

View File

@@ -46,6 +46,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Produce json
// @Security BearerAuth
// @Param search query string false "Filter by code, name or text"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} ListPaymentTextDTO
// @Failure 500 {object} appresult.AppError
// @Router /payment-texts [get]
@@ -77,6 +78,7 @@ func (h *handler) list(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param code path string true "Text code"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} PaymentTextDTO
// @Failure 404 {object} appresult.AppError
// @Failure 500 {object} appresult.AppError
@@ -119,6 +121,7 @@ func (h *handler) getByCode(c *gin.Context) {
// @Security BearerAuth
// @Param code path string true "Text code"
// @Param body body UpdatePaymentTextDTO true "Payment text payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} PaymentTextDTO
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -156,6 +159,7 @@ func (h *handler) update(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param code path string true "Text code"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} appresult.AppSuccess
// @Failure 403 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError

View File

@@ -44,6 +44,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Visa/master payment order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} PaymentQuoteDTO
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -77,6 +78,7 @@ func (h *handler) quote(c *gin.Context) {
// @Security BearerAuth
// @Param id path int true "Visa/master payment order ID"
// @Param body body PayOrderDTO true "Payment payload"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} PaymentInitResultDTO
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -117,6 +119,7 @@ func (h *handler) pay(c *gin.Context) {
// @Produce json
// @Security BearerAuth
// @Param id path int true "Visa/master payment order ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} PaymentResultDTO
// @Failure 400 {object} appresult.AppError
// @Failure 404 {object} appresult.AppError
@@ -152,6 +155,7 @@ func (h *handler) status(c *gin.Context) {
// @Tags visa-master-payment-orders
// @Produce json
// @Param paymentId query int true "Payment attempt ID"
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
// @Success 200 {object} CallbackResultDTO
// @Router /visa-master-payment-orders/callback [get]
func (h *handler) callback(c *gin.Context) {