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

@@ -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