change users table

This commit is contained in:
2026-07-13 12:11:35 +05:00
parent c29c72fd92
commit 6705c4ce91
22 changed files with 3150 additions and 83 deletions

View File

@@ -822,6 +822,296 @@ const docTemplate = `{
}
}
},
"/loan-paid-off-letters": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated loan paid off letters with optional filters",
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "List loan paid off letters",
"parameters": [
{
"type": "string",
"description": "Filter by passport ID",
"name": "passport_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"name": "branch_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by region",
"name": "region",
"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 paid off letter",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "Create loan paid off letter",
"parameters": [
{
"description": "Loan paid off letter payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loanpaidletter.CreateLoanPaidLetterDTO"
}
}
],
"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-paid-off-letters/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single loan paid off letter",
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "Get loan paid off letter by ID",
"parameters": [
{
"type": "integer",
"description": "Loan paid off letter 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 paid off letter",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "Update loan paid off letter",
"parameters": [
{
"type": "integer",
"description": "Loan paid off letter ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Loan paid off letter payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loanpaidletter.UpdateLoanPaidLetterDTO"
}
}
],
"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 paid off letter",
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "Delete loan paid off letter",
"parameters": [
{
"type": "integer",
"description": "Loan paid off letter 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": [
@@ -1436,6 +1726,278 @@ const docTemplate = `{
}
}
},
"/loans-repayment": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated loan repayments with optional filters",
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "List loan repayments",
"parameters": [
{
"type": "string",
"description": "Filter by passport ID",
"name": "passport_id",
"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 repayment record",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "Create loan repayment",
"parameters": [
{
"description": "Loan repayment payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loansrepayment.CreateLoanRepaymentDTO"
}
}
],
"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-repayment/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single loan repayment",
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "Get loan repayment by ID",
"parameters": [
{
"type": "integer",
"description": "Loan repayment 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 repayment record",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "Update loan repayment",
"parameters": [
{
"type": "integer",
"description": "Loan repayment ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Loan repayment payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loansrepayment.UpdateLoanRepaymentDTO"
}
}
],
"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 repayment record",
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "Delete loan repayment",
"parameters": [
{
"type": "integer",
"description": "Loan repayment 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"
}
}
}
}
},
"/login": {
"post": {
"description": "Authenticates a user by email and password",
@@ -3909,6 +4471,142 @@ const docTemplate = `{
}
}
},
"loanpaidletter.CreateLoanPaidLetterDTO": {
"type": "object",
"required": [
"branchId",
"customerName",
"customerSurname",
"passportId",
"passportSerie",
"phone",
"region"
],
"properties": {
"bornAt": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"loanAmount": {
"type": "string"
},
"loanContractDate": {
"type": "string"
},
"loanContractNumber": {
"type": "string"
},
"loanFile": {
"type": "string"
},
"loanReason": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"phone": {
"type": "string"
},
"region": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"loanpaidletter.UpdateLoanPaidLetterDTO": {
"type": "object",
"required": [
"branchId",
"customerName",
"customerSurname",
"passportId",
"passportSerie",
"phone",
"region"
],
"properties": {
"bornAt": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"loanAmount": {
"type": "string"
},
"loanContractDate": {
"type": "string"
},
"loanContractNumber": {
"type": "string"
},
"loanFile": {
"type": "string"
},
"loanReason": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"phone": {
"type": "string"
},
"region": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"loansdocument.CreateLoanDocumentDTO": {
"type": "object",
"required": [
@@ -3953,6 +4651,52 @@ const docTemplate = `{
}
}
},
"loansrepayment.CreateLoanRepaymentDTO": {
"type": "object",
"required": [
"accountNumber",
"passportId",
"passportSerie",
"userId"
],
"properties": {
"accountNumber": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"loansrepayment.UpdateLoanRepaymentDTO": {
"type": "object",
"required": [
"accountNumber",
"passportId",
"passportSerie",
"userId"
],
"properties": {
"accountNumber": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"loantype.CreateLoanTypeDTO": {
"type": "object",
"required": [
@@ -4269,7 +5013,7 @@ const docTemplate = `{
"type": "object",
"required": [
"email",
"fullname",
"name",
"password",
"username"
],
@@ -4283,16 +5027,22 @@ const docTemplate = `{
"email": {
"type": "string"
},
"fullname": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"lightMode": {
"type": "integer"
},
"name": {
"type": "string"
},
"password": {
"type": "string"
},
"phoneNumber": {
"phone": {
"type": "string"
},
"role": {
@@ -4324,7 +5074,7 @@ const docTemplate = `{
"type": "object",
"required": [
"email",
"fullname",
"name",
"username"
],
"properties": {
@@ -4337,13 +5087,19 @@ const docTemplate = `{
"email": {
"type": "string"
},
"fullname": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"lightMode": {
"type": "integer"
},
"phoneNumber": {
"name": {
"type": "string"
},
"phone": {
"type": "string"
},
"role": {

View File

@@ -816,6 +816,296 @@
}
}
},
"/loan-paid-off-letters": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated loan paid off letters with optional filters",
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "List loan paid off letters",
"parameters": [
{
"type": "string",
"description": "Filter by passport ID",
"name": "passport_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"name": "branch_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by region",
"name": "region",
"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 paid off letter",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "Create loan paid off letter",
"parameters": [
{
"description": "Loan paid off letter payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loanpaidletter.CreateLoanPaidLetterDTO"
}
}
],
"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-paid-off-letters/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single loan paid off letter",
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "Get loan paid off letter by ID",
"parameters": [
{
"type": "integer",
"description": "Loan paid off letter 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 paid off letter",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "Update loan paid off letter",
"parameters": [
{
"type": "integer",
"description": "Loan paid off letter ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Loan paid off letter payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loanpaidletter.UpdateLoanPaidLetterDTO"
}
}
],
"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 paid off letter",
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "Delete loan paid off letter",
"parameters": [
{
"type": "integer",
"description": "Loan paid off letter 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": [
@@ -1430,6 +1720,278 @@
}
}
},
"/loans-repayment": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated loan repayments with optional filters",
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "List loan repayments",
"parameters": [
{
"type": "string",
"description": "Filter by passport ID",
"name": "passport_id",
"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 repayment record",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "Create loan repayment",
"parameters": [
{
"description": "Loan repayment payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loansrepayment.CreateLoanRepaymentDTO"
}
}
],
"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-repayment/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single loan repayment",
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "Get loan repayment by ID",
"parameters": [
{
"type": "integer",
"description": "Loan repayment 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 repayment record",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "Update loan repayment",
"parameters": [
{
"type": "integer",
"description": "Loan repayment ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Loan repayment payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loansrepayment.UpdateLoanRepaymentDTO"
}
}
],
"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 repayment record",
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "Delete loan repayment",
"parameters": [
{
"type": "integer",
"description": "Loan repayment 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"
}
}
}
}
},
"/login": {
"post": {
"description": "Authenticates a user by email and password",
@@ -3903,6 +4465,142 @@
}
}
},
"loanpaidletter.CreateLoanPaidLetterDTO": {
"type": "object",
"required": [
"branchId",
"customerName",
"customerSurname",
"passportId",
"passportSerie",
"phone",
"region"
],
"properties": {
"bornAt": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"loanAmount": {
"type": "string"
},
"loanContractDate": {
"type": "string"
},
"loanContractNumber": {
"type": "string"
},
"loanFile": {
"type": "string"
},
"loanReason": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"phone": {
"type": "string"
},
"region": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"loanpaidletter.UpdateLoanPaidLetterDTO": {
"type": "object",
"required": [
"branchId",
"customerName",
"customerSurname",
"passportId",
"passportSerie",
"phone",
"region"
],
"properties": {
"bornAt": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"loanAmount": {
"type": "string"
},
"loanContractDate": {
"type": "string"
},
"loanContractNumber": {
"type": "string"
},
"loanFile": {
"type": "string"
},
"loanReason": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"phone": {
"type": "string"
},
"region": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"loansdocument.CreateLoanDocumentDTO": {
"type": "object",
"required": [
@@ -3947,6 +4645,52 @@
}
}
},
"loansrepayment.CreateLoanRepaymentDTO": {
"type": "object",
"required": [
"accountNumber",
"passportId",
"passportSerie",
"userId"
],
"properties": {
"accountNumber": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"loansrepayment.UpdateLoanRepaymentDTO": {
"type": "object",
"required": [
"accountNumber",
"passportId",
"passportSerie",
"userId"
],
"properties": {
"accountNumber": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"loantype.CreateLoanTypeDTO": {
"type": "object",
"required": [
@@ -4263,7 +5007,7 @@
"type": "object",
"required": [
"email",
"fullname",
"name",
"password",
"username"
],
@@ -4277,16 +5021,22 @@
"email": {
"type": "string"
},
"fullname": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"lightMode": {
"type": "integer"
},
"name": {
"type": "string"
},
"password": {
"type": "string"
},
"phoneNumber": {
"phone": {
"type": "string"
},
"role": {
@@ -4318,7 +5068,7 @@
"type": "object",
"required": [
"email",
"fullname",
"name",
"username"
],
"properties": {
@@ -4331,13 +5081,19 @@
"email": {
"type": "string"
},
"fullname": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"lightMode": {
"type": "integer"
},
"phoneNumber": {
"name": {
"type": "string"
},
"phone": {
"type": "string"
},
"role": {

View File

@@ -449,6 +449,100 @@ definitions:
- realAddress
- region
type: object
loanpaidletter.CreateLoanPaidLetterDTO:
properties:
bornAt:
type: string
branchId:
type: integer
customerName:
type: string
customerPatronicName:
type: string
customerSurname:
type: string
loanAmount:
type: string
loanContractDate:
type: string
loanContractNumber:
type: string
loanFile:
type: string
loanReason:
type: string
notes:
type: string
passportId:
type: string
passportSerie:
type: string
phone:
type: string
region:
type: string
status:
type: string
uniqueId:
type: string
userId:
type: integer
required:
- branchId
- customerName
- customerSurname
- passportId
- passportSerie
- phone
- region
type: object
loanpaidletter.UpdateLoanPaidLetterDTO:
properties:
bornAt:
type: string
branchId:
type: integer
customerName:
type: string
customerPatronicName:
type: string
customerSurname:
type: string
loanAmount:
type: string
loanContractDate:
type: string
loanContractNumber:
type: string
loanFile:
type: string
loanReason:
type: string
notes:
type: string
passportId:
type: string
passportSerie:
type: string
phone:
type: string
region:
type: string
status:
type: string
uniqueId:
type: string
userId:
type: integer
required:
- branchId
- customerName
- customerSurname
- passportId
- passportSerie
- phone
- region
type: object
loansdocument.CreateLoanDocumentDTO:
properties:
active:
@@ -478,6 +572,38 @@ definitions:
- name
- value
type: object
loansrepayment.CreateLoanRepaymentDTO:
properties:
accountNumber:
type: string
passportId:
type: string
passportSerie:
type: string
userId:
type: integer
required:
- accountNumber
- passportId
- passportSerie
- userId
type: object
loansrepayment.UpdateLoanRepaymentDTO:
properties:
accountNumber:
type: string
passportId:
type: string
passportSerie:
type: string
userId:
type: integer
required:
- accountNumber
- passportId
- passportSerie
- userId
type: object
loantype.CreateLoanTypeDTO:
properties:
active:
@@ -695,13 +821,17 @@ definitions:
type: string
email:
type: string
fullname:
firstName:
type: string
lastName:
type: string
lightMode:
type: integer
name:
type: string
password:
type: string
phoneNumber:
phone:
type: string
role:
type: string
@@ -711,7 +841,7 @@ definitions:
type: string
required:
- email
- fullname
- name
- password
- username
type: object
@@ -732,11 +862,15 @@ definitions:
type: string
email:
type: string
fullname:
firstName:
type: string
lastName:
type: string
lightMode:
type: integer
phoneNumber:
name:
type: string
phone:
type: string
role:
type: string
@@ -746,7 +880,7 @@ definitions:
type: string
required:
- email
- fullname
- name
- username
type: object
host: localhost:5050
@@ -1270,6 +1404,192 @@ paths:
summary: Update loan order
tags:
- loan-orders
/loan-paid-off-letters:
get:
description: Returns paginated loan paid off letters with optional filters
parameters:
- description: Filter by passport ID
in: query
name: passport_id
type: string
- description: Filter by status
in: query
name: status
type: string
- description: Filter by branch ID
in: query
name: branch_id
type: integer
- description: Filter by region
in: query
name: region
type: string
- default: 1
description: Page number
in: query
name: page
type: integer
- default: 10
description: Items per page
in: query
name: limit
type: integer
produces:
- application/json
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'
security:
- BearerAuth: []
summary: List loan paid off letters
tags:
- loan-paid-off-letters
post:
consumes:
- application/json
description: Creates a new loan paid off letter
parameters:
- description: Loan paid off letter payload
in: body
name: body
required: true
schema:
$ref: '#/definitions/loanpaidletter.CreateLoanPaidLetterDTO'
produces:
- application/json
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'
security:
- BearerAuth: []
summary: Create loan paid off letter
tags:
- loan-paid-off-letters
/loan-paid-off-letters/{id}:
delete:
description: Deletes a loan paid off letter
parameters:
- description: Loan paid off letter ID
in: path
name: id
required: true
type: integer
produces:
- application/json
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'
security:
- BearerAuth: []
summary: Delete loan paid off letter
tags:
- loan-paid-off-letters
get:
description: Returns a single loan paid off letter
parameters:
- description: Loan paid off letter ID
in: path
name: id
required: true
type: integer
produces:
- application/json
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'
security:
- BearerAuth: []
summary: Get loan paid off letter by ID
tags:
- loan-paid-off-letters
put:
consumes:
- application/json
description: Updates an existing loan paid off letter
parameters:
- description: Loan paid off letter ID
in: path
name: id
required: true
type: integer
- description: Loan paid off letter payload
in: body
name: body
required: true
schema:
$ref: '#/definitions/loanpaidletter.UpdateLoanPaidLetterDTO'
produces:
- application/json
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'
security:
- BearerAuth: []
summary: Update loan paid off letter
tags:
- loan-paid-off-letters
/loan-types:
get:
description: Returns paginated loan types with optional filters
@@ -1663,6 +1983,180 @@ paths:
summary: Update loan document active
tags:
- loan-document
/loans-repayment:
get:
description: Returns paginated loan repayments with optional filters
parameters:
- description: Filter by passport ID
in: query
name: passport_id
type: string
- default: 1
description: Page number
in: query
name: page
type: integer
- default: 10
description: Items per page
in: query
name: limit
type: integer
produces:
- application/json
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'
security:
- BearerAuth: []
summary: List loan repayments
tags:
- loans-repayment
post:
consumes:
- application/json
description: Creates a new loan repayment record
parameters:
- description: Loan repayment payload
in: body
name: body
required: true
schema:
$ref: '#/definitions/loansrepayment.CreateLoanRepaymentDTO'
produces:
- application/json
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'
security:
- BearerAuth: []
summary: Create loan repayment
tags:
- loans-repayment
/loans-repayment/{id}:
delete:
description: Deletes a loan repayment record
parameters:
- description: Loan repayment ID
in: path
name: id
required: true
type: integer
produces:
- application/json
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'
security:
- BearerAuth: []
summary: Delete loan repayment
tags:
- loans-repayment
get:
description: Returns a single loan repayment
parameters:
- description: Loan repayment ID
in: path
name: id
required: true
type: integer
produces:
- application/json
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'
security:
- BearerAuth: []
summary: Get loan repayment by ID
tags:
- loans-repayment
put:
consumes:
- application/json
description: Updates an existing loan repayment record
parameters:
- description: Loan repayment ID
in: path
name: id
required: true
type: integer
- description: Loan repayment payload
in: body
name: body
required: true
schema:
$ref: '#/definitions/loansrepayment.UpdateLoanRepaymentDTO'
produces:
- application/json
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'
security:
- BearerAuth: []
summary: Update loan repayment
tags:
- loans-repayment
/login:
post:
consumes:

View File

@@ -14,6 +14,7 @@ var swaggerTagOrder = []struct {
{Name: "reason-card", Description: "Reason cards"},
{Name: "loan-type", Description: "Loan types"},
{Name: "loan-document", Description: "Loan required documents"},
{Name: "loans-repayment", Description: "Loan repayments"},
}
func applySwaggerTagOrder() {