changed column name

This commit is contained in:
2026-07-06 19:13:54 +05:00
parent 3ba5597a51
commit 08be61cbcd
33 changed files with 544 additions and 2129 deletions

View File

@@ -37,12 +37,6 @@ const docTemplate = `{
"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)",
@@ -607,8 +601,8 @@ const docTemplate = `{
},
{
"type": "boolean",
"description": "Filter by status",
"name": "status",
"description": "Filter by active",
"name": "active",
"in": "query"
},
{
@@ -861,7 +855,7 @@ const docTemplate = `{
}
}
},
"/loans-documents/{id}/status": {
"/loans-documents/{id}/active": {
"put": {
"security": [
{
@@ -878,7 +872,7 @@ const docTemplate = `{
"tags": [
"loan-document"
],
"summary": "Update loan document status",
"summary": "Update loan document active",
"parameters": [
{
"type": "integer",
@@ -888,366 +882,12 @@ const docTemplate = `{
"required": true
},
{
"description": "Status payload",
"description": "Active 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"
"$ref": "#/definitions/loansdocument.UpdateLoanDocumentActiveDTO"
}
}
],
@@ -1349,8 +989,8 @@ const docTemplate = `{
},
{
"type": "boolean",
"description": "Filter by status",
"name": "status",
"description": "Filter by active",
"name": "active",
"in": "query"
},
{
@@ -1603,7 +1243,7 @@ const docTemplate = `{
}
}
},
"/payment-cards/{id}/status": {
"/payment-cards/{id}/active": {
"put": {
"security": [
{
@@ -1620,7 +1260,7 @@ const docTemplate = `{
"tags": [
"payment-card"
],
"summary": "Update payment card status",
"summary": "Update payment card active",
"parameters": [
{
"type": "integer",
@@ -1630,12 +1270,12 @@ const docTemplate = `{
"required": true
},
{
"description": "Status payload",
"description": "Active payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/paymentcard.UpdatePaymentCardStatusDTO"
"$ref": "#/definitions/paymentcard.UpdatePaymentCardActiveDTO"
}
}
],
@@ -1915,7 +1555,7 @@ const docTemplate = `{
"BearerAuth": []
}
],
"description": "Deletes a province and its locations",
"description": "Deletes a province",
"produces": [
"application/json"
],
@@ -2339,7 +1979,6 @@ const docTemplate = `{
"type": "object",
"required": [
"address",
"locationId",
"provinceId",
"title",
"unikalNomer"
@@ -2372,9 +2011,6 @@ const docTemplate = `{
"billingUsernameVisa": {
"type": "string"
},
"locationId": {
"type": "integer"
},
"provinceId": {
"type": "integer"
},
@@ -2404,7 +2040,6 @@ const docTemplate = `{
"type": "object",
"required": [
"address",
"locationId",
"provinceId",
"title",
"unikalNomer"
@@ -2437,9 +2072,6 @@ const docTemplate = `{
"billingUsernameVisa": {
"type": "string"
},
"locationId": {
"type": "integer"
},
"provinceId": {
"type": "integer"
},
@@ -2460,6 +2092,9 @@ const docTemplate = `{
"title"
],
"properties": {
"active": {
"type": "boolean"
},
"contentEn": {
"type": "string"
},
@@ -2469,9 +2104,6 @@ const docTemplate = `{
"contentTm": {
"type": "string"
},
"status": {
"type": "boolean"
},
"title": {
"$ref": "#/definitions/loansdocument.LocalizedTitle"
}
@@ -2491,6 +2123,14 @@ const docTemplate = `{
}
}
},
"loansdocument.UpdateLoanDocumentActiveDTO": {
"type": "object",
"properties": {
"active": {
"type": "boolean"
}
}
},
"loansdocument.UpdateLoanDocumentDTO": {
"type": "object",
"required": [
@@ -2500,6 +2140,9 @@ const docTemplate = `{
"title"
],
"properties": {
"active": {
"type": "boolean"
},
"contentEn": {
"type": "string"
},
@@ -2509,22 +2152,11 @@ const docTemplate = `{
"contentTm": {
"type": "string"
},
"status": {
"type": "boolean"
},
"title": {
"$ref": "#/definitions/loansdocument.LocalizedTitle"
}
}
},
"loansdocument.UpdateLoanDocumentStatusDTO": {
"type": "object",
"properties": {
"status": {
"type": "boolean"
}
}
},
"loantype.CreateLoanTypeDTO": {
"type": "object",
"required": [
@@ -2585,64 +2217,6 @@ const docTemplate = `{
}
}
},
"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": [
@@ -2651,15 +2225,15 @@ const docTemplate = `{
"title"
],
"properties": {
"active": {
"type": "boolean"
},
"content": {
"$ref": "#/definitions/paymentcard.LocalizedText"
},
"price": {
"type": "number"
},
"status": {
"type": "boolean"
},
"title": {
"$ref": "#/definitions/paymentcard.LocalizedText"
}
@@ -2679,6 +2253,14 @@ const docTemplate = `{
}
}
},
"paymentcard.UpdatePaymentCardActiveDTO": {
"type": "object",
"properties": {
"active": {
"type": "boolean"
}
}
},
"paymentcard.UpdatePaymentCardDTO": {
"type": "object",
"required": [
@@ -2687,43 +2269,39 @@ const docTemplate = `{
"title"
],
"properties": {
"active": {
"type": "boolean"
},
"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"
"name",
"region"
],
"properties": {
"status": {
"active": {
"type": "boolean"
},
"title": {
"$ref": "#/definitions/province.LocalizedTitle"
"name": {
"$ref": "#/definitions/province.LocalizedName"
},
"region": {
"$ref": "#/definitions/province.LocalizedName"
}
}
},
"province.LocalizedTitle": {
"province.LocalizedName": {
"type": "object",
"properties": {
"en": {
@@ -2740,14 +2318,18 @@ const docTemplate = `{
"province.UpdateProvinceDTO": {
"type": "object",
"required": [
"title"
"name",
"region"
],
"properties": {
"status": {
"active": {
"type": "boolean"
},
"title": {
"$ref": "#/definitions/province.LocalizedTitle"
"name": {
"$ref": "#/definitions/province.LocalizedName"
},
"region": {
"$ref": "#/definitions/province.LocalizedName"
}
}
},
@@ -2818,7 +2400,7 @@ var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "localhost:5050",
BasePath: "/api/admin",
Schemes: []string{"http"},
Schemes: []string{},
Title: "Service APIs",
Description: "Online payment system admin API.",
InfoInstanceName: "swagger",
@@ -2828,6 +2410,5 @@ var SwaggerInfo = &swag.Spec{
}
func init() {
applySwaggerTagOrder()
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}