generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #751 from bcgov/feat/srs-644
initial check in for cats entities
- Loading branch information
Showing
50 changed files
with
3,054 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { | ||
Column, | ||
Entity, | ||
Index, | ||
JoinColumn, | ||
ManyToOne, | ||
PrimaryGeneratedColumn, | ||
} from 'typeorm'; | ||
import { Application } from './application.entity'; | ||
|
||
@Index('idx_app_expense_application_id', ['applicationId'], {}) | ||
@Index('pk_app_expense', ['id'], { unique: true }) | ||
@Entity('app_expense', { schema: 'cats' }) | ||
export class AppExpense { | ||
@PrimaryGeneratedColumn({ type: 'integer', name: 'id' }) | ||
id: number; | ||
|
||
@Column('integer', { name: 'application_id' }) | ||
applicationId: number; | ||
|
||
@Column('numeric', { name: 'expense_amt', precision: 10, scale: 2 }) | ||
expenseAmt: string; | ||
|
||
@Column('character varying', { name: 'description', length: 100 }) | ||
description: string; | ||
|
||
@Column('integer', { name: 'row_version_count' }) | ||
rowVersionCount: number; | ||
|
||
@Column('character varying', { name: 'created_by', length: 20 }) | ||
createdBy: string; | ||
|
||
@Column('timestamp without time zone', { name: 'created_date_time' }) | ||
createdDateTime: Date; | ||
|
||
@Column('character varying', { name: 'updated_by', length: 20 }) | ||
updatedBy: string; | ||
|
||
@Column('timestamp without time zone', { name: 'updated_date_time' }) | ||
updatedDateTime: Date; | ||
|
||
@Column('bytea', { name: 'ts' }) | ||
ts: Buffer; | ||
|
||
@ManyToOne(() => Application, (application) => application.appExpenses) | ||
@JoinColumn([{ name: 'application_id', referencedColumnName: 'id' }]) | ||
application: Application; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { | ||
Column, | ||
Entity, | ||
Index, | ||
JoinColumn, | ||
ManyToOne, | ||
PrimaryGeneratedColumn, | ||
} from 'typeorm'; | ||
import { Application } from './application.entity'; | ||
import { LandUse } from './landUse.entity'; | ||
|
||
@Index('idx_app_land_use_application_id', ['applicationId'], {}) | ||
@Index('pk_app_land_use', ['id'], { unique: true }) | ||
@Index('idx_app_land_use_land_use_id', ['landUseId'], {}) | ||
@Entity('app_land_use', { schema: 'cats' }) | ||
export class AppLandUse { | ||
@PrimaryGeneratedColumn({ type: 'integer', name: 'id' }) | ||
id: number; | ||
|
||
@Column('integer', { name: 'application_id' }) | ||
applicationId: number; | ||
|
||
@Column('integer', { name: 'land_use_id' }) | ||
landUseId: number; | ||
|
||
@Column('boolean', { name: 'is_current' }) | ||
isCurrent: boolean; | ||
|
||
@Column('character varying', { | ||
name: 'comment', | ||
nullable: true, | ||
length: 4000, | ||
}) | ||
comment: string | null; | ||
|
||
@Column('integer', { name: 'row_version_count' }) | ||
rowVersionCount: number; | ||
|
||
@Column('character varying', { name: 'created_by', length: 20 }) | ||
createdBy: string; | ||
|
||
@Column('timestamp without time zone', { name: 'created_date_time' }) | ||
createdDateTime: Date; | ||
|
||
@Column('character varying', { name: 'updated_by', length: 20 }) | ||
updatedBy: string; | ||
|
||
@Column('timestamp without time zone', { name: 'updated_date_time' }) | ||
updatedDateTime: Date; | ||
|
||
@Column('bytea', { name: 'ts' }) | ||
ts: Buffer; | ||
|
||
@ManyToOne(() => Application, (application) => application.appLandUses) | ||
@JoinColumn([{ name: 'application_id', referencedColumnName: 'id' }]) | ||
application: Application; | ||
|
||
@ManyToOne(() => LandUse, (landUse) => landUse.appLandUses) | ||
@JoinColumn([{ name: 'land_use_id', referencedColumnName: 'id' }]) | ||
landUse: LandUse; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { | ||
Column, | ||
Entity, | ||
Index, | ||
JoinColumn, | ||
ManyToOne, | ||
PrimaryGeneratedColumn, | ||
} from 'typeorm'; | ||
import { Application } from './application.entity'; | ||
|
||
@Index('idx_app_note_application_id', ['applicationId'], {}) | ||
@Index('pk_app_note', ['id'], { unique: true }) | ||
@Entity('app_note', { schema: 'cats' }) | ||
export class AppNote { | ||
@PrimaryGeneratedColumn({ type: 'integer', name: 'id' }) | ||
id: number; | ||
|
||
@Column('integer', { name: 'application_id' }) | ||
applicationId: number; | ||
|
||
@Column('date', { name: 'note_date' }) | ||
noteDate: string; | ||
|
||
@Column('character varying', { name: 'note_text', length: 4000 }) | ||
noteText: string; | ||
|
||
@Column('integer', { name: 'row_version_count' }) | ||
rowVersionCount: number; | ||
|
||
@Column('character varying', { name: 'created_by', length: 20 }) | ||
createdBy: string; | ||
|
||
@Column('timestamp without time zone', { name: 'created_date_time' }) | ||
createdDateTime: Date; | ||
|
||
@Column('character varying', { name: 'updated_by', length: 20 }) | ||
updatedBy: string; | ||
|
||
@Column('timestamp without time zone', { name: 'updated_date_time' }) | ||
updatedDateTime: Date; | ||
|
||
@Column('bytea', { name: 'ts' }) | ||
ts: Buffer; | ||
|
||
@ManyToOne(() => Application, (application) => application.appNotes) | ||
@JoinColumn([{ name: 'application_id', referencedColumnName: 'id' }]) | ||
application: Application; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import { | ||
Column, | ||
Entity, | ||
Index, | ||
JoinColumn, | ||
ManyToOne, | ||
PrimaryGeneratedColumn, | ||
} from 'typeorm'; | ||
import { Application } from './application.entity'; | ||
import { Organization } from './organization.entity'; | ||
import { ParticipantRole } from './participantRole.entity'; | ||
import { Person } from './person.entity'; | ||
|
||
@Index('idx_app_participant_application_id', ['applicationId'], {}) | ||
@Index( | ||
'uidx_application_id_participant_role_id', | ||
['applicationId', 'participantRoleId'], | ||
{ unique: true }, | ||
) | ||
@Index('pk_app_participant', ['id'], { unique: true }) | ||
@Index('idx_app_participant_organization_id', ['organizationId'], {}) | ||
@Index('idx_app_participant_participant_role_id', ['participantRoleId'], {}) | ||
@Index('idx_app_participant_person_id', ['personId'], {}) | ||
@Entity('app_participant', { schema: 'cats' }) | ||
export class AppParticipant { | ||
@PrimaryGeneratedColumn({ type: 'integer', name: 'id' }) | ||
id: number; | ||
|
||
@Column('integer', { name: 'application_id' }) | ||
applicationId: number; | ||
|
||
@Column('integer', { name: 'person_id' }) | ||
personId: number; | ||
|
||
@Column('integer', { name: 'participant_role_id' }) | ||
participantRoleId: number; | ||
|
||
@Column('integer', { name: 'organization_id', nullable: true }) | ||
organizationId: number | null; | ||
|
||
@Column('boolean', { name: 'is_main_participant' }) | ||
isMainParticipant: boolean; | ||
|
||
@Column('date', { name: 'effective_start_date' }) | ||
effectiveStartDate: string; | ||
|
||
@Column('date', { name: 'effective_end_date', nullable: true }) | ||
effectiveEndDate: string | null; | ||
|
||
@Column('integer', { name: 'row_version_count' }) | ||
rowVersionCount: number; | ||
|
||
@Column('character varying', { name: 'created_by', length: 20 }) | ||
createdBy: string; | ||
|
||
@Column('timestamp without time zone', { name: 'created_date_time' }) | ||
createdDateTime: Date; | ||
|
||
@Column('character varying', { name: 'updated_by', length: 20 }) | ||
updatedBy: string; | ||
|
||
@Column('timestamp without time zone', { name: 'updated_date_time' }) | ||
updatedDateTime: Date; | ||
|
||
@Column('bytea', { name: 'ts' }) | ||
ts: Buffer; | ||
|
||
@ManyToOne(() => Application, (application) => application.appParticipants) | ||
@JoinColumn([{ name: 'application_id', referencedColumnName: 'id' }]) | ||
application: Application; | ||
|
||
@ManyToOne(() => Organization, (organization) => organization.appParticipants) | ||
@JoinColumn([{ name: 'organization_id', referencedColumnName: 'id' }]) | ||
organization: Organization; | ||
|
||
@ManyToOne( | ||
() => ParticipantRole, | ||
(participantRole) => participantRole.appParticipants, | ||
) | ||
@JoinColumn([{ name: 'participant_role_id', referencedColumnName: 'id' }]) | ||
participantRole: ParticipantRole; | ||
|
||
@ManyToOne(() => Person, (person) => person.appParticipants) | ||
@JoinColumn([{ name: 'person_id', referencedColumnName: 'id' }]) | ||
person: Person; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { | ||
Column, | ||
Entity, | ||
Index, | ||
JoinColumn, | ||
ManyToOne, | ||
PrimaryGeneratedColumn, | ||
} from 'typeorm'; | ||
import { Application } from './application.entity'; | ||
import { Priority } from './priority.entity'; | ||
|
||
@Index('idx_app_priority_application_id', ['applicationId'], {}) | ||
@Index('pk_app_priority', ['id'], { unique: true }) | ||
@Index('idx_app_priority_priority_id', ['priorityId'], {}) | ||
@Entity('app_priority', { schema: 'cats' }) | ||
export class AppPriority { | ||
@PrimaryGeneratedColumn({ type: 'integer', name: 'id' }) | ||
id: number; | ||
|
||
@Column('integer', { name: 'application_id' }) | ||
applicationId: number; | ||
|
||
@Column('integer', { name: 'priority_id' }) | ||
priorityId: number; | ||
|
||
@Column('boolean', { name: 'is_current' }) | ||
isCurrent: boolean; | ||
|
||
@Column('character varying', { | ||
name: 'comment', | ||
nullable: true, | ||
length: 4000, | ||
}) | ||
comment: string | null; | ||
|
||
@Column('integer', { name: 'row_version_count' }) | ||
rowVersionCount: number; | ||
|
||
@Column('character varying', { name: 'created_by', length: 20 }) | ||
createdBy: string; | ||
|
||
@Column('timestamp without time zone', { name: 'created_date_time' }) | ||
createdDateTime: Date; | ||
|
||
@Column('character varying', { name: 'updated_by', length: 20 }) | ||
updatedBy: string; | ||
|
||
@Column('timestamp without time zone', { name: 'updated_date_time' }) | ||
updatedDateTime: Date; | ||
|
||
@Column('bytea', { name: 'ts' }) | ||
ts: Buffer; | ||
|
||
@ManyToOne(() => Application, (application) => application.appPriorities) | ||
@JoinColumn([{ name: 'application_id', referencedColumnName: 'id' }]) | ||
application: Application; | ||
|
||
@ManyToOne(() => Priority, (priority) => priority.appPriorities) | ||
@JoinColumn([{ name: 'priority_id', referencedColumnName: 'id' }]) | ||
priority: Priority; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { | ||
Column, | ||
Entity, | ||
Index, | ||
JoinColumn, | ||
ManyToOne, | ||
PrimaryGeneratedColumn, | ||
} from 'typeorm'; | ||
import { Application } from './application.entity'; | ||
import { SedimentUse } from './sedimentUse.entity'; | ||
|
||
@Index('idx_app_sediment_use_application_id', ['applicationId'], {}) | ||
@Index('pk_app_sediment_use', ['id'], { unique: true }) | ||
@Index('idx_app_sediment_use_sediment_use_id', ['sedimentUseId'], {}) | ||
@Entity('app_sediment_use', { schema: 'cats' }) | ||
export class AppSedimentUse { | ||
@PrimaryGeneratedColumn({ type: 'integer', name: 'id' }) | ||
id: number; | ||
|
||
@Column('integer', { name: 'application_id' }) | ||
applicationId: number; | ||
|
||
@Column('integer', { name: 'sediment_use_id' }) | ||
sedimentUseId: number; | ||
|
||
@Column('boolean', { name: 'is_current' }) | ||
isCurrent: boolean; | ||
|
||
@Column('character varying', { | ||
name: 'comment', | ||
nullable: true, | ||
length: 4000, | ||
}) | ||
comment: string | null; | ||
|
||
@Column('integer', { name: 'row_version_count' }) | ||
rowVersionCount: number; | ||
|
||
@Column('character varying', { name: 'created_by', length: 20 }) | ||
createdBy: string; | ||
|
||
@Column('timestamp without time zone', { name: 'created_date_time' }) | ||
createdDateTime: Date; | ||
|
||
@Column('character varying', { name: 'updated_by', length: 20 }) | ||
updatedBy: string; | ||
|
||
@Column('timestamp without time zone', { name: 'updated_date_time' }) | ||
updatedDateTime: Date; | ||
|
||
@Column('bytea', { name: 'ts' }) | ||
ts: Buffer; | ||
|
||
@ManyToOne(() => Application, (application) => application.appSedimentUses) | ||
@JoinColumn([{ name: 'application_id', referencedColumnName: 'id' }]) | ||
application: Application; | ||
|
||
@ManyToOne(() => SedimentUse, (sedimentUse) => sedimentUse.appSedimentUses) | ||
@JoinColumn([{ name: 'sediment_use_id', referencedColumnName: 'id' }]) | ||
sedimentUse: SedimentUse; | ||
} |
Oops, something went wrong.