Skip to content

Commit

Permalink
Merge branch 'PIMS-401' of https://github.com/bcgov/PIMS into PIMS-401
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharala-Perumal committed Jan 10, 2024
2 parents 30102fa + 192b161 commit d959712
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion express-api/src/typeorm/Entities/ProjectStatus.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { ProjectStatusHistory } from '@/typeorm/Entities/ProjectStatusHistory';
import { ProjectStatusNotifications } from '@/typeorm/Entities/ProjectStatusNotifications';
import { ProjectStatusTransitions } from '@/typeorm/Entities/ProjectStatusTransitions';
import { Projects } from '@/typeorm/Entities/Projects';
import { Tasks } from '@/typeorm/Entities/Tasks';
import { WorkflowProjectStatus } from '@/typeorm/Entities/WorkflowProjectStatus';
import { BaseEntity } from '@/typeorm/Entities/abstractEntities/BaseEntity';
import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
import { Entity, PrimaryGeneratedColumn, Column, Index, OneToMany } from 'typeorm';

@Entity()
@Index(['IsDisabled', 'Name', 'Code', 'SortOrder'])
Expand Down Expand Up @@ -34,4 +40,28 @@ export class ProjectStatus extends BaseEntity {

@Column({ type: 'character varying', length: 150 })
Route: boolean;

@OneToMany(() => Projects, (Project) => Project.StatusId)
Projects: Projects[];

@OneToMany(() => ProjectStatusHistory, (ProjectStatusHistory) => ProjectStatusHistory.FromStatusId)
ProjectStatusHistoryFrom: ProjectStatusHistory[];

@OneToMany(() => ProjectStatusNotifications, (ProjectStatusNotification) => ProjectStatusNotification.FromStatusId)
ProjectStatusNotificationsFrom: ProjectStatusNotifications[];

@OneToMany(() => ProjectStatusNotifications, (ProjectStatusNotification) => ProjectStatusNotification.ToStatusId)
ProjectStatusNotificationsTo: ProjectStatusNotifications[];

@OneToMany(() => ProjectStatusTransitions, (ProjectStatusTransition) => ProjectStatusTransition.FromStatusId)
ProjectStatusTransitionsFrom: ProjectStatusTransitions[];

@OneToMany(() => ProjectStatusTransitions, (ProjectStatusTransition) => ProjectStatusTransition.ToStatusId)
ProjectStatusTransitionsTo: ProjectStatusTransitions[];

@OneToMany(() => Tasks, (Task) => Task.StatusId)
Tasks: Tasks[];

@OneToMany(() => WorkflowProjectStatus, (WorkflowProjectStatus) => WorkflowProjectStatus.StatusId)
WorkflowProjectStatuses: WorkflowProjectStatus[];
}

0 comments on commit d959712

Please sign in to comment.