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": {