Skip to content

Commit

Permalink
initial check in for cats entities
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhila-aot committed Jan 29, 2025
1 parent 08555bf commit a62d1e7
Show file tree
Hide file tree
Showing 50 changed files with 3,044 additions and 23 deletions.
48 changes: 48 additions & 0 deletions backend/applications/src/app/entities/appExpense.entity.ts
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;
}
61 changes: 61 additions & 0 deletions backend/applications/src/app/entities/appLandUse.entity.ts
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;
}
48 changes: 48 additions & 0 deletions backend/applications/src/app/entities/appNote.entity.ts
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;
}
86 changes: 86 additions & 0 deletions backend/applications/src/app/entities/appParticipant.entity.ts
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;
}
61 changes: 61 additions & 0 deletions backend/applications/src/app/entities/appPriority.entity.ts
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;
}
61 changes: 61 additions & 0 deletions backend/applications/src/app/entities/appSedimentUse.entity.ts
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;
}
Loading

0 comments on commit a62d1e7

Please sign in to comment.