From eca84b4e7598c4707c92ebb911e3ecc6d9b3e692 Mon Sep 17 00:00:00 2001 From: Abdalhamid Alhamad Date: Sun, 5 Jan 2025 10:38:19 +0300 Subject: [PATCH] fix: general fixes on date types and some typos --- src/customer/dtos/response/customer-response.dto.ts | 4 ++-- src/customer/entities/customer.entity.ts | 2 +- src/saving-goals/entities/saving-goal.entity.ts | 2 +- src/task/entities/task.entity.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/customer/dtos/response/customer-response.dto.ts b/src/customer/dtos/response/customer-response.dto.ts index 61fbb22..a7f9f99 100644 --- a/src/customer/dtos/response/customer-response.dto.ts +++ b/src/customer/dtos/response/customer-response.dto.ts @@ -26,7 +26,7 @@ export class CustomerResponseDto { nationalId!: string; @ApiProperty() - nationaIdExpiry!: Date; + nationalIdExpiry!: Date; @ApiProperty() countryOfResidence!: string; @@ -66,7 +66,7 @@ export class CustomerResponseDto { this.lastName = customer.lastName; this.dateOfBirth = customer.dateOfBirth; this.nationalId = customer.nationalId; - this.nationaIdExpiry = customer.nationaIdExpiry; + this.nationalIdExpiry = customer.nationalIdExpiry; this.countryOfResidence = customer.countryOfResidence; this.sourceOfIncome = customer.sourceOfIncome; this.profession = customer.profession; diff --git a/src/customer/entities/customer.entity.ts b/src/customer/entities/customer.entity.ts index 5dfacd1..f3614af 100644 --- a/src/customer/entities/customer.entity.ts +++ b/src/customer/entities/customer.entity.ts @@ -38,7 +38,7 @@ export class Customer extends BaseEntity { nationalId!: string; @Column('date', { nullable: true, name: 'national_id_expiry' }) - nationaIdExpiry!: Date; + nationalIdExpiry!: Date; @Column('varchar', { length: 255, nullable: true, name: 'country_of_residence' }) countryOfResidence!: string; diff --git a/src/saving-goals/entities/saving-goal.entity.ts b/src/saving-goals/entities/saving-goal.entity.ts index def155a..57abcc5 100644 --- a/src/saving-goals/entities/saving-goal.entity.ts +++ b/src/saving-goals/entities/saving-goal.entity.ts @@ -24,7 +24,7 @@ export class SavingGoal extends BaseEntity { @Column({ type: 'varchar', length: 255, name: 'description', nullable: true }) description!: string; - @Column({ type: 'date', name: 'due_date' }) + @Column({ type: 'timestamp with time zone', name: 'due_date' }) dueDate!: Date; @Column({ diff --git a/src/task/entities/task.entity.ts b/src/task/entities/task.entity.ts index 1c62d77..a9a96a1 100644 --- a/src/task/entities/task.entity.ts +++ b/src/task/entities/task.entity.ts @@ -36,10 +36,10 @@ export class Task extends BaseEntity { @Column({ type: 'varchar', name: 'task_frequency' }) taskFrequency!: TaskFrequency; - @Column({ type: 'date', name: 'start_date' }) + @Column({ type: 'timestamp with time zone', name: 'start_date' }) startDate!: Date; - @Column({ type: 'date', name: 'due_date' }) + @Column({ type: 'timestamp with time zone', name: 'due_date' }) dueDate!: Date; @Column({ type: 'boolean', name: 'is_proof_required' })