created loan-orders and created table

This commit is contained in:
2026-07-08 17:07:51 +05:00
parent 77bc4025d3
commit be3dc28e68
10 changed files with 2831 additions and 1 deletions

View File

@@ -408,6 +408,296 @@ const docTemplate = `{
}
}
},
"/loan-orders": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated loan orders with optional filters",
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "List loan orders",
"parameters": [
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"name": "branch_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by user ID",
"name": "user_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 order",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "Create loan order",
"parameters": [
{
"description": "Loan order payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loanorders.CreateLoanOrderDTO"
}
}
],
"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-orders/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single loan order",
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "Get loan order by ID",
"parameters": [
{
"type": "integer",
"description": "Loan order 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 order",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "Update loan order",
"parameters": [
{
"type": "integer",
"description": "Loan order ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Loan order payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loanorders.UpdateLoanOrderDTO"
}
}
],
"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 order",
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "Delete loan order",
"parameters": [
{
"type": "integer",
"description": "Loan order 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": [
@@ -3039,6 +3329,462 @@ const docTemplate = `{
}
}
},
"loanorders.CreateLoanOrderDTO": {
"type": "object",
"required": [
"bornAt",
"bornPlace",
"branchId",
"customerName",
"customerSurname",
"education",
"loanType",
"marriageStatus",
"passportAddress",
"passportFour",
"passportGivenAt",
"passportGivenBy",
"passportId",
"passportOne",
"passportSerie",
"passportThree",
"passportTwo",
"phone",
"realAddress",
"region"
],
"properties": {
"bornAt": {
"type": "string"
},
"bornPlace": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"cardMonth": {
"type": "string"
},
"cardName": {
"type": "string"
},
"cardNumber": {
"type": "string"
},
"cardYear": {
"type": "string"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"education": {
"type": "string"
},
"email": {
"type": "string"
},
"guarantor2CardMonth": {
"type": "string"
},
"guarantor2CardName": {
"type": "string"
},
"guarantor2CardNumber": {
"type": "string"
},
"guarantor2CardYear": {
"type": "string"
},
"guarantor2Name": {
"type": "string"
},
"guarantor2Note": {
"type": "string"
},
"guarantor2PassportId": {
"type": "string"
},
"guarantor2PassportSerie": {
"type": "string"
},
"guarantor2PatronicName": {
"type": "string"
},
"guarantor2Surname": {
"type": "string"
},
"guarantorCardMonth": {
"type": "string"
},
"guarantorCardName": {
"type": "string"
},
"guarantorCardNumber": {
"type": "string"
},
"guarantorCardYear": {
"type": "string"
},
"guarantorName": {
"type": "string"
},
"guarantorNote": {
"type": "string"
},
"guarantorPassportId": {
"type": "string"
},
"guarantorPassportSerie": {
"type": "string"
},
"guarantorPatronicName": {
"type": "string"
},
"guarantorSurname": {
"type": "string"
},
"loanAmount": {
"type": "string"
},
"loanCardMonth": {
"type": "string"
},
"loanCardName": {
"type": "string"
},
"loanCardNumber": {
"type": "string"
},
"loanCardYear": {
"type": "string"
},
"loanOrderRequiredDocId": {
"type": "integer"
},
"loanType": {
"type": "integer"
},
"marriageStatus": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportAddress": {
"type": "string"
},
"passportFour": {
"type": "string"
},
"passportGivenAt": {
"type": "string"
},
"passportGivenBy": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportOne": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"passportThree": {
"type": "string"
},
"passportTwo": {
"type": "string"
},
"phone": {
"type": "string"
},
"phoneAdditional": {
"type": "string"
},
"phoneHome": {
"type": "string"
},
"realAddress": {
"type": "string"
},
"region": {
"type": "string"
},
"satisfiable": {
"type": "string"
},
"source": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
},
"workCompany": {
"type": "string"
},
"workCompanyAccountantNumber": {
"type": "string"
},
"workPosition": {
"type": "string"
},
"workProvinceId": {
"type": "integer"
},
"workRegion": {
"type": "string"
},
"workSalary": {
"type": "string"
},
"workStartedAt": {
"type": "string"
}
}
},
"loanorders.UpdateLoanOrderDTO": {
"type": "object",
"required": [
"bornAt",
"bornPlace",
"branchId",
"customerName",
"customerSurname",
"education",
"loanType",
"marriageStatus",
"passportAddress",
"passportFour",
"passportGivenAt",
"passportGivenBy",
"passportId",
"passportOne",
"passportSerie",
"passportThree",
"passportTwo",
"phone",
"realAddress",
"region"
],
"properties": {
"bornAt": {
"type": "string"
},
"bornPlace": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"cardMonth": {
"type": "string"
},
"cardName": {
"type": "string"
},
"cardNumber": {
"type": "string"
},
"cardYear": {
"type": "string"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"education": {
"type": "string"
},
"email": {
"type": "string"
},
"guarantor2CardMonth": {
"type": "string"
},
"guarantor2CardName": {
"type": "string"
},
"guarantor2CardNumber": {
"type": "string"
},
"guarantor2CardYear": {
"type": "string"
},
"guarantor2Name": {
"type": "string"
},
"guarantor2Note": {
"type": "string"
},
"guarantor2PassportId": {
"type": "string"
},
"guarantor2PassportSerie": {
"type": "string"
},
"guarantor2PatronicName": {
"type": "string"
},
"guarantor2Surname": {
"type": "string"
},
"guarantorCardMonth": {
"type": "string"
},
"guarantorCardName": {
"type": "string"
},
"guarantorCardNumber": {
"type": "string"
},
"guarantorCardYear": {
"type": "string"
},
"guarantorName": {
"type": "string"
},
"guarantorNote": {
"type": "string"
},
"guarantorPassportId": {
"type": "string"
},
"guarantorPassportSerie": {
"type": "string"
},
"guarantorPatronicName": {
"type": "string"
},
"guarantorSurname": {
"type": "string"
},
"loanAmount": {
"type": "string"
},
"loanCardMonth": {
"type": "string"
},
"loanCardName": {
"type": "string"
},
"loanCardNumber": {
"type": "string"
},
"loanCardYear": {
"type": "string"
},
"loanOrderRequiredDocId": {
"type": "integer"
},
"loanType": {
"type": "integer"
},
"marriageStatus": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportAddress": {
"type": "string"
},
"passportFour": {
"type": "string"
},
"passportGivenAt": {
"type": "string"
},
"passportGivenBy": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportOne": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"passportThree": {
"type": "string"
},
"passportTwo": {
"type": "string"
},
"phone": {
"type": "string"
},
"phoneAdditional": {
"type": "string"
},
"phoneHome": {
"type": "string"
},
"realAddress": {
"type": "string"
},
"region": {
"type": "string"
},
"satisfiable": {
"type": "string"
},
"source": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
},
"workCompany": {
"type": "string"
},
"workCompanyAccountantNumber": {
"type": "string"
},
"workPosition": {
"type": "string"
},
"workProvinceId": {
"type": "integer"
},
"workRegion": {
"type": "string"
},
"workSalary": {
"type": "string"
},
"workStartedAt": {
"type": "string"
}
}
},
"loansdocument.CreateLoanDocumentDTO": {
"type": "object",
"required": [

View File

@@ -402,6 +402,296 @@
}
}
},
"/loan-orders": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated loan orders with optional filters",
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "List loan orders",
"parameters": [
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"name": "branch_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by user ID",
"name": "user_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 order",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "Create loan order",
"parameters": [
{
"description": "Loan order payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loanorders.CreateLoanOrderDTO"
}
}
],
"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-orders/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single loan order",
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "Get loan order by ID",
"parameters": [
{
"type": "integer",
"description": "Loan order 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 order",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "Update loan order",
"parameters": [
{
"type": "integer",
"description": "Loan order ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Loan order payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loanorders.UpdateLoanOrderDTO"
}
}
],
"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 order",
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "Delete loan order",
"parameters": [
{
"type": "integer",
"description": "Loan order 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": [
@@ -3033,6 +3323,462 @@
}
}
},
"loanorders.CreateLoanOrderDTO": {
"type": "object",
"required": [
"bornAt",
"bornPlace",
"branchId",
"customerName",
"customerSurname",
"education",
"loanType",
"marriageStatus",
"passportAddress",
"passportFour",
"passportGivenAt",
"passportGivenBy",
"passportId",
"passportOne",
"passportSerie",
"passportThree",
"passportTwo",
"phone",
"realAddress",
"region"
],
"properties": {
"bornAt": {
"type": "string"
},
"bornPlace": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"cardMonth": {
"type": "string"
},
"cardName": {
"type": "string"
},
"cardNumber": {
"type": "string"
},
"cardYear": {
"type": "string"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"education": {
"type": "string"
},
"email": {
"type": "string"
},
"guarantor2CardMonth": {
"type": "string"
},
"guarantor2CardName": {
"type": "string"
},
"guarantor2CardNumber": {
"type": "string"
},
"guarantor2CardYear": {
"type": "string"
},
"guarantor2Name": {
"type": "string"
},
"guarantor2Note": {
"type": "string"
},
"guarantor2PassportId": {
"type": "string"
},
"guarantor2PassportSerie": {
"type": "string"
},
"guarantor2PatronicName": {
"type": "string"
},
"guarantor2Surname": {
"type": "string"
},
"guarantorCardMonth": {
"type": "string"
},
"guarantorCardName": {
"type": "string"
},
"guarantorCardNumber": {
"type": "string"
},
"guarantorCardYear": {
"type": "string"
},
"guarantorName": {
"type": "string"
},
"guarantorNote": {
"type": "string"
},
"guarantorPassportId": {
"type": "string"
},
"guarantorPassportSerie": {
"type": "string"
},
"guarantorPatronicName": {
"type": "string"
},
"guarantorSurname": {
"type": "string"
},
"loanAmount": {
"type": "string"
},
"loanCardMonth": {
"type": "string"
},
"loanCardName": {
"type": "string"
},
"loanCardNumber": {
"type": "string"
},
"loanCardYear": {
"type": "string"
},
"loanOrderRequiredDocId": {
"type": "integer"
},
"loanType": {
"type": "integer"
},
"marriageStatus": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportAddress": {
"type": "string"
},
"passportFour": {
"type": "string"
},
"passportGivenAt": {
"type": "string"
},
"passportGivenBy": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportOne": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"passportThree": {
"type": "string"
},
"passportTwo": {
"type": "string"
},
"phone": {
"type": "string"
},
"phoneAdditional": {
"type": "string"
},
"phoneHome": {
"type": "string"
},
"realAddress": {
"type": "string"
},
"region": {
"type": "string"
},
"satisfiable": {
"type": "string"
},
"source": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
},
"workCompany": {
"type": "string"
},
"workCompanyAccountantNumber": {
"type": "string"
},
"workPosition": {
"type": "string"
},
"workProvinceId": {
"type": "integer"
},
"workRegion": {
"type": "string"
},
"workSalary": {
"type": "string"
},
"workStartedAt": {
"type": "string"
}
}
},
"loanorders.UpdateLoanOrderDTO": {
"type": "object",
"required": [
"bornAt",
"bornPlace",
"branchId",
"customerName",
"customerSurname",
"education",
"loanType",
"marriageStatus",
"passportAddress",
"passportFour",
"passportGivenAt",
"passportGivenBy",
"passportId",
"passportOne",
"passportSerie",
"passportThree",
"passportTwo",
"phone",
"realAddress",
"region"
],
"properties": {
"bornAt": {
"type": "string"
},
"bornPlace": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"cardMonth": {
"type": "string"
},
"cardName": {
"type": "string"
},
"cardNumber": {
"type": "string"
},
"cardYear": {
"type": "string"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"education": {
"type": "string"
},
"email": {
"type": "string"
},
"guarantor2CardMonth": {
"type": "string"
},
"guarantor2CardName": {
"type": "string"
},
"guarantor2CardNumber": {
"type": "string"
},
"guarantor2CardYear": {
"type": "string"
},
"guarantor2Name": {
"type": "string"
},
"guarantor2Note": {
"type": "string"
},
"guarantor2PassportId": {
"type": "string"
},
"guarantor2PassportSerie": {
"type": "string"
},
"guarantor2PatronicName": {
"type": "string"
},
"guarantor2Surname": {
"type": "string"
},
"guarantorCardMonth": {
"type": "string"
},
"guarantorCardName": {
"type": "string"
},
"guarantorCardNumber": {
"type": "string"
},
"guarantorCardYear": {
"type": "string"
},
"guarantorName": {
"type": "string"
},
"guarantorNote": {
"type": "string"
},
"guarantorPassportId": {
"type": "string"
},
"guarantorPassportSerie": {
"type": "string"
},
"guarantorPatronicName": {
"type": "string"
},
"guarantorSurname": {
"type": "string"
},
"loanAmount": {
"type": "string"
},
"loanCardMonth": {
"type": "string"
},
"loanCardName": {
"type": "string"
},
"loanCardNumber": {
"type": "string"
},
"loanCardYear": {
"type": "string"
},
"loanOrderRequiredDocId": {
"type": "integer"
},
"loanType": {
"type": "integer"
},
"marriageStatus": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportAddress": {
"type": "string"
},
"passportFour": {
"type": "string"
},
"passportGivenAt": {
"type": "string"
},
"passportGivenBy": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportOne": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"passportThree": {
"type": "string"
},
"passportTwo": {
"type": "string"
},
"phone": {
"type": "string"
},
"phoneAdditional": {
"type": "string"
},
"phoneHome": {
"type": "string"
},
"realAddress": {
"type": "string"
},
"region": {
"type": "string"
},
"satisfiable": {
"type": "string"
},
"source": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
},
"workCompany": {
"type": "string"
},
"workCompanyAccountantNumber": {
"type": "string"
},
"workPosition": {
"type": "string"
},
"workProvinceId": {
"type": "integer"
},
"workRegion": {
"type": "string"
},
"workSalary": {
"type": "string"
},
"workStartedAt": {
"type": "string"
}
}
},
"loansdocument.CreateLoanDocumentDTO": {
"type": "object",
"required": [

View File

@@ -133,6 +133,322 @@ definitions:
- name
- region
type: object
loanorders.CreateLoanOrderDTO:
properties:
bornAt:
type: string
bornPlace:
type: string
branchId:
type: integer
cardMonth:
type: string
cardName:
type: string
cardNumber:
type: string
cardYear:
type: string
customerName:
type: string
customerPatronicName:
type: string
customerSurname:
type: string
education:
type: string
email:
type: string
guarantor2CardMonth:
type: string
guarantor2CardName:
type: string
guarantor2CardNumber:
type: string
guarantor2CardYear:
type: string
guarantor2Name:
type: string
guarantor2Note:
type: string
guarantor2PassportId:
type: string
guarantor2PassportSerie:
type: string
guarantor2PatronicName:
type: string
guarantor2Surname:
type: string
guarantorCardMonth:
type: string
guarantorCardName:
type: string
guarantorCardNumber:
type: string
guarantorCardYear:
type: string
guarantorName:
type: string
guarantorNote:
type: string
guarantorPassportId:
type: string
guarantorPassportSerie:
type: string
guarantorPatronicName:
type: string
guarantorSurname:
type: string
loanAmount:
type: string
loanCardMonth:
type: string
loanCardName:
type: string
loanCardNumber:
type: string
loanCardYear:
type: string
loanOrderRequiredDocId:
type: integer
loanType:
type: integer
marriageStatus:
type: string
notes:
type: string
passportAddress:
type: string
passportFour:
type: string
passportGivenAt:
type: string
passportGivenBy:
type: string
passportId:
type: string
passportOne:
type: string
passportSerie:
type: string
passportThree:
type: string
passportTwo:
type: string
phone:
type: string
phoneAdditional:
type: string
phoneHome:
type: string
realAddress:
type: string
region:
type: string
satisfiable:
type: string
source:
type: string
status:
type: string
uniqueId:
type: string
userId:
type: integer
workCompany:
type: string
workCompanyAccountantNumber:
type: string
workPosition:
type: string
workProvinceId:
type: integer
workRegion:
type: string
workSalary:
type: string
workStartedAt:
type: string
required:
- bornAt
- bornPlace
- branchId
- customerName
- customerSurname
- education
- loanType
- marriageStatus
- passportAddress
- passportFour
- passportGivenAt
- passportGivenBy
- passportId
- passportOne
- passportSerie
- passportThree
- passportTwo
- phone
- realAddress
- region
type: object
loanorders.UpdateLoanOrderDTO:
properties:
bornAt:
type: string
bornPlace:
type: string
branchId:
type: integer
cardMonth:
type: string
cardName:
type: string
cardNumber:
type: string
cardYear:
type: string
customerName:
type: string
customerPatronicName:
type: string
customerSurname:
type: string
education:
type: string
email:
type: string
guarantor2CardMonth:
type: string
guarantor2CardName:
type: string
guarantor2CardNumber:
type: string
guarantor2CardYear:
type: string
guarantor2Name:
type: string
guarantor2Note:
type: string
guarantor2PassportId:
type: string
guarantor2PassportSerie:
type: string
guarantor2PatronicName:
type: string
guarantor2Surname:
type: string
guarantorCardMonth:
type: string
guarantorCardName:
type: string
guarantorCardNumber:
type: string
guarantorCardYear:
type: string
guarantorName:
type: string
guarantorNote:
type: string
guarantorPassportId:
type: string
guarantorPassportSerie:
type: string
guarantorPatronicName:
type: string
guarantorSurname:
type: string
loanAmount:
type: string
loanCardMonth:
type: string
loanCardName:
type: string
loanCardNumber:
type: string
loanCardYear:
type: string
loanOrderRequiredDocId:
type: integer
loanType:
type: integer
marriageStatus:
type: string
notes:
type: string
passportAddress:
type: string
passportFour:
type: string
passportGivenAt:
type: string
passportGivenBy:
type: string
passportId:
type: string
passportOne:
type: string
passportSerie:
type: string
passportThree:
type: string
passportTwo:
type: string
phone:
type: string
phoneAdditional:
type: string
phoneHome:
type: string
realAddress:
type: string
region:
type: string
satisfiable:
type: string
source:
type: string
status:
type: string
uniqueId:
type: string
userId:
type: integer
workCompany:
type: string
workCompanyAccountantNumber:
type: string
workPosition:
type: string
workProvinceId:
type: integer
workRegion:
type: string
workSalary:
type: string
workStartedAt:
type: string
required:
- bornAt
- bornPlace
- branchId
- customerName
- customerSurname
- education
- loanType
- marriageStatus
- passportAddress
- passportFour
- passportGivenAt
- passportGivenBy
- passportId
- passportOne
- passportSerie
- passportThree
- passportTwo
- phone
- realAddress
- region
type: object
loansdocument.CreateLoanDocumentDTO:
properties:
active:
@@ -691,6 +1007,192 @@ paths:
summary: Update branch
tags:
- branches
/loan-orders:
get:
description: Returns paginated loan orders with optional filters
parameters:
- 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 user ID
in: query
name: user_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 orders
tags:
- loan-orders
post:
consumes:
- application/json
description: Creates a new loan order
parameters:
- description: Loan order payload
in: body
name: body
required: true
schema:
$ref: '#/definitions/loanorders.CreateLoanOrderDTO'
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 order
tags:
- loan-orders
/loan-orders/{id}:
delete:
description: Deletes a loan order
parameters:
- description: Loan order 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 order
tags:
- loan-orders
get:
description: Returns a single loan order
parameters:
- description: Loan order 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 order by ID
tags:
- loan-orders
put:
consumes:
- application/json
description: Updates an existing loan order
parameters:
- description: Loan order ID
in: path
name: id
required: true
type: integer
- description: Loan order payload
in: body
name: body
required: true
schema:
$ref: '#/definitions/loanorders.UpdateLoanOrderDTO'
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 order
tags:
- loan-orders
/loan-types:
get:
description: Returns paginated loan types with optional filters