Merge pull request 'feat: configure database module with schema initialization and implement recovery incident entity and DTO' (#18) from azeem into development

Reviewed-on: https://gitea.maskantech.in/gitea_admin/aeroresolve_backend/pulls/18
This commit is contained in:
Syed Waseem khadri Rafai
2026-08-04 10:10:41 +00:00
3 changed files with 20 additions and 19 deletions
+1
View File
@@ -34,6 +34,7 @@ import { ConfigModule, ConfigService } from '@nestjs/config';
await dataSource.query(`CREATE SCHEMA IF NOT EXISTS "masters";`);
await dataSource.query(`CREATE SCHEMA IF NOT EXISTS "cohort";`);
await dataSource.query(`CREATE SCHEMA IF NOT EXISTS "policy_engine";`);
await dataSource.query(`CREATE SCHEMA IF NOT EXISTS "recovery_incident";`);
// Run synchronization manually if it was enabled
if (options.synchronize) {
@@ -14,7 +14,7 @@ class IncidentStatusDto {
export class CreateRecoveryIncidentDto {
@IsString()
@IsNotEmpty()
recoveryId: string;
recoveryCode: string;
@IsDateString()
@IsNotEmpty()
@@ -1,43 +1,43 @@
import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm';
@Entity('recovery_incidents')
@Entity({ name: 'tbl_recovery_incidents', schema: 'recovery_incident' })
export class RecoveryIncident {
@PrimaryGeneratedColumn('uuid')
id: string;
id!: string;
@Column({ type: 'varchar', length: 255 })
tenantId: string;
@Column({ name: 'tenant_id', type: 'varchar', length: 255 })
tenantId!: string;
@Column({ type: 'varchar', length: 255 })
recoveryId: string;
@Column({ name: 'recovery_code', type: 'varchar', length: 255 })
recoveryCode!: string;
@Column({ type: 'timestamp with time zone' })
date: Date;
date!: Date;
@Column({ type: 'varchar', length: 255, nullable: true })
@Column({ name: 'passenger_name', type: 'varchar', length: 255, nullable: true })
passengerName?: string;
@Column({ type: 'varchar', length: 10, nullable: true })
pnr?: string;
@Column({ type: 'varchar', length: 20 })
flightNumber: string;
@Column({ name: 'flight_number', type: 'varchar', length: 20 })
flightNumber!: string;
@Column({ type: 'varchar', length: 50 })
flightRoute: string;
@Column({ name: 'flight_route', type: 'varchar', length: 50 })
flightRoute!: string;
@Column({ type: 'varchar', length: 255, nullable: true })
category?: string;
@Column({ type: 'jsonb', default: [] })
statuses: any[];
statuses!: any[];
@Column({ type: 'varchar', length: 255, nullable: true })
value: string;
value?: string;
@CreateDateColumn()
createdAt: Date;
@CreateDateColumn({ name: 'created_at' })
createdAt!: Date;
@UpdateDateColumn()
updatedAt: Date;
@UpdateDateColumn({ name: 'updated_at' })
updatedAt!: Date;
}