refactor(f4): align inspection entity with retired columns
This commit is contained in:
@@ -14,7 +14,7 @@ export enum InspectionVisitStatus {
|
||||
@Index('idx_inspection_visits_status', ['status'])
|
||||
@Index('idx_inspection_visits_scope_asset_id', ['scopeAssetId'])
|
||||
@Index('idx_inspection_visits_lead_inspector_user_id', ['leadInspectorUserId'])
|
||||
@Index('idx_inspection_visits_planned_dates', ['plannedStartAt', 'plannedEndAt'])
|
||||
@Index('idx_inspection_visits_planned_start_at', ['plannedStartAt'])
|
||||
@Index('idx_inspection_visits_operational_context', ['operationalAreaId', 'operatorCompanyId'])
|
||||
export class InspectionVisit extends TimestampedEntity {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
@@ -23,8 +23,11 @@ export class InspectionVisit extends TimestampedEntity {
|
||||
@Column({ type: 'varchar', length: 80 })
|
||||
code!: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 200 })
|
||||
title!: string;
|
||||
/**
|
||||
* Compatibilidad TypeScript transitoria con el constructor de Inspecciones.
|
||||
* No es una columna ORM: F4 retiró inspection_visits.title físicamente.
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
@Column({ type: 'text', nullable: true })
|
||||
objective!: string | null;
|
||||
@@ -47,8 +50,11 @@ export class InspectionVisit extends TimestampedEntity {
|
||||
@Column({ name: 'planned_start_at', type: 'timestamptz', nullable: true })
|
||||
plannedStartAt!: Date | null;
|
||||
|
||||
@Column({ name: 'planned_end_at', type: 'timestamptz', nullable: true })
|
||||
plannedEndAt!: Date | null;
|
||||
/**
|
||||
* Compatibilidad TypeScript transitoria con el constructor de Inspecciones.
|
||||
* No es una columna ORM: F4 retiró inspection_visits.planned_end_at físicamente.
|
||||
*/
|
||||
plannedEndAt?: Date | null;
|
||||
|
||||
@Column({ name: 'actual_started_at', type: 'timestamptz', nullable: true })
|
||||
actualStartedAt!: Date | null;
|
||||
|
||||
Reference in New Issue
Block a user