Skip to content

Commit b38c925

Browse files
committed
feat(src): update user risk and loan
1 parent a93b59a commit b38c925

17 files changed

+53
-19
lines changed

src/common/dtos/create.loan.dto.ts

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
// src/dto/create-customer.dto.ts
2-
3-
import { IsUUID, IsArray, ArrayNotEmpty, IsEnum } from 'class-validator';
1+
import { IsUUID, IsArray, ArrayNotEmpty, IsEnum, IsString } from 'class-validator';
42
import { ApiProperty } from '@nestjs/swagger';
53
import { ProductType } from '../enums/product-type.enum';
64

@@ -19,6 +17,27 @@ export class CreateLoanDto {
1917
@IsUUID()
2018
riskID: string;
2119

20+
@ApiProperty({
21+
description: '',
22+
example: 'debt consolidation',
23+
})
24+
@IsString()
25+
loanPurpose: string;
26+
27+
@ApiProperty({
28+
description: 'Loan amount',
29+
example: '10.000',
30+
})
31+
@IsString()
32+
loanAmount: string;
33+
34+
@ApiProperty({
35+
description: 'Property status',
36+
example: 'own',
37+
})
38+
@IsString()
39+
propertyStatus: string;
40+
2241
@ApiProperty({
2342
description: 'List of product types associated with the customer',
2443
example: ['Personal_Loan'],

src/modules/bridge-loan/dtos/create.bridge-loan.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ import {
1111
export class CreateBridgeLoanDto {
1212
@ApiProperty()
1313
@IsString()
14-
leadUuid: string;
14+
partnerUuid: string;
1515
}

src/modules/bridge-loan/entities/bridge-loan.entity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class BridgeLoan {
1212
id: string;
1313

1414
@Column({ nullable: true })
15-
leadUuid: string;
15+
partnerUuid: string;
1616

1717
@Column({ type: 'boolean', default: true, nullable: true })
1818
isActive: boolean;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export interface IBridgeLoan {
2-
leadUuid: string;
2+
partnerUuid: string;
33
}

src/modules/credit-card/credit-card.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class CreditCardService extends CrudService<CreditCard> {
101101
generateResponse() {
102102
return {
103103
uuid: faker.datatype.uuid(),
104-
leadUuid: faker.datatype.uuid(),
104+
partnerUuid: faker.datatype.uuid(),
105105
loanOffers: [],
106106
specialOffers: [],
107107
savingsOffers: [],

src/modules/credit-card/dtos/create.credit-card.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ import {
1111
export class CreateCreditCardDto {
1212
@ApiProperty()
1313
@IsString()
14-
leadUuid: string;
14+
partnerUuid: string;
1515
}

src/modules/credit-card/entities/credit-card.entity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class CreditCard {
1212
id: string;
1313

1414
@Column({ nullable: true })
15-
leadUuid: string;
15+
partnerUuid: string;
1616

1717
@Column({ type: 'boolean', default: true, nullable: true })
1818
isActive: boolean;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export interface ICreditCard {
2-
leadUuid: string;
2+
partnerUuid: string;
33
}

src/modules/home-loan/dtos/create.home-loan.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ import {
1111
export class CreateHomeLoanDto {
1212
@ApiProperty()
1313
@IsString()
14-
leadUuid: string;
14+
partnerUuid: string;
1515
}

src/modules/home-loan/entities/home-loan.entity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class HomeLoan {
1212
id: string;
1313

1414
@Column({ nullable: true })
15-
leadUuid: string;
15+
partnerUuid: string;
1616

1717
@Column({ type: 'boolean', default: true, nullable: true })
1818
isActive: boolean;

src/modules/home-loan/home-loan.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export class HomeLoanService extends CrudService<HomeLoan> {
8080
generateResponse() {
8181
return {
8282
uuid: faker.string.uuid(),
83-
leadUuid: faker.string.uuid(),
83+
partnerUuid: faker.string.uuid(),
8484
loanOffers: [],
8585
specialOffers: [],
8686
savingsOffers: [],
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export interface IHomeLoan {
2-
leadUuid: string;
2+
partnerUuid: string;
33
}

src/modules/loan/dtos/create.loan.dto.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
IsArray,
33
IsBoolean,
4-
IsDate,
54
IsOptional,
65
IsString,
76
IsUUID,

src/modules/loan/dtos/response.loan.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class PendingOriginatorDto {
6565

6666
export class PersonalLoanResponseDto {
6767
uuid: string;
68-
leadUuid: string;
68+
partnerUuid: string;
6969
loanOffers: LoanOfferDto[];
7070
specialOffers: any[];
7171
savingsOffers: any[];

src/modules/loan/loan.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export class LoanService extends CrudService<Loan> {
231231

232232
const response: PersonalLoanResponseDto = {
233233
uuid: loanId,
234-
leadUuid: uuidv4(),
234+
partnerUuid: uuidv4(),
235235
loanOffers,
236236
specialOffers: [],
237237
savingsOffers: [],

src/modules/personal-loan/personal-loan.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export class PersonalLoanService extends CrudService<PersonalLoan> {
265265
generateLoans(personaLoan: CreateLoanDto) {
266266
const response = {
267267
uuid: faker.string.uuid(),
268-
leadUuid: faker.string.uuid(),
268+
partnerUuid: faker.string.uuid(),
269269
loanOffers: [],
270270
specialOffers: [],
271271
savingsOffers: [],
Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
import { ApiProperty } from '@nestjs/swagger';
2-
import { IsUUID } from 'class-validator';
2+
import { IsString, IsUUID } from 'class-validator';
33

44
export class GenerateUserRiskDto {
55
@ApiProperty()
66
@IsUUID()
77
customerId: string;
8+
9+
@ApiProperty()
10+
@IsString()
11+
employmentStatus: string;
12+
13+
@ApiProperty()
14+
@IsString()
15+
payFrequency: string;
16+
17+
@ApiProperty()
18+
@IsString()
19+
annualIncome: string;
20+
21+
@ApiProperty()
22+
@IsString()
23+
educationLevel: string;
824
}

0 commit comments

Comments
 (0)