Skip to content

Commit

Permalink
changes for graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhila-aot committed Mar 25, 2024
1 parent c22500f commit 9dd9151
Show file tree
Hide file tree
Showing 21 changed files with 181 additions and 0 deletions.
21 changes: 21 additions & 0 deletions backend/sites/src/app/entities/aecRemedItems.entity.ts
Original file line number Diff line number Diff line change
@@ -1,91 +1,112 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
import { AecPcocs } from "./aecPcocs.entity";
import { AecRemedApproaches } from "./aecRemedApproaches.entity";
import { Sites } from "./sites.entity";

@ObjectType()
@Index("aecremitems_pcoc_frgn", ["aecpcocId"], {})
@Index("aec_remed_items_pkey", ["aecpcocId", "aecremappId"], { unique: true })
@Index("aecremitems_remed_frgn", ["aecremId"], {})
@Index("aecremitems_sites_frgn", ["siteId"], {})
@Entity("aec_remed_items")
export class AecRemedItems {
@Field()
@Column("bigint", { primary: true, name: "aecremapp_id" })
aecremappId: string;

@Field()
@Column("bigint", { primary: true, name: "aecpcoc_id" })
aecpcocId: string;

@Field()
@Column("bigint", { name: "site_id" })
siteId: string;

@Field()
@Column("bigint", { name: "aecrem_id" })
aecremId: string;

@Field()
@Column("character varying", {
name: "protection_category",
nullable: true,
length: 40,
})
protectionCategory: string | null;

@Field()
@Column("character varying", { name: "activity", nullable: true, length: 80 })
activity: string | null;

@Field()
@Column("bigint", { name: "target_level", nullable: true })
targetLevel: string | null;

@Field()
@Column("character varying", { name: "unit", nullable: true, length: 10 })
unit: string | null;

@Field()
@Column("character varying", { name: "compound", nullable: true, length: 40 })
compound: string | null;

@Field()
@Column("character varying", {
name: "risk_objective",
nullable: true,
length: 40,
})
riskObjective: string | null;

@Field()
@Column("bigint", { name: "risk_calculated", nullable: true })
riskCalculated: string | null;

@Field()
@Column("bigint", { name: "risk_remediated", nullable: true })
riskRemediated: string | null;

@Field()
@Column("character varying", {
name: "hazard_objective",
nullable: true,
length: 40,
})
hazardObjective: string | null;

@Field()
@Column("bigint", { name: "hazard_calculated", nullable: true })
hazardCalculated: string | null;

@Column("bigint", { name: "hazard_remediated", nullable: true })
hazardRemediated: string | null;

@Field()
@Column("character varying", {
name: "risk_assessment_activity",
nullable: true,
length: 80,
})
riskAssessmentActivity: string | null;

@Field()
@Column("character varying", { name: "who_created", length: 30 })
whoCreated: string;

@Field()
@Column("timestamp without time zone", { name: "when_created" })
whenCreated: Date;

@Field()
@Column("character varying", {
name: "who_updated",
nullable: true,
length: 30,
})
whoUpdated: string | null;

@Field()
@Column("timestamp without time zone", {
name: "when_updated",
nullable: true,
Expand Down
9 changes: 9 additions & 0 deletions backend/sites/src/app/entities/aecRemedMeasures.entity.ts
Original file line number Diff line number Diff line change
@@ -1,41 +1,50 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
import { AecRemediations } from "./aecRemediations.entity";
import { RemedMeasureCd } from "./remedMeasureCd.entity";
import { Sites } from "./sites.entity";

@ObjectType()
@Index("aec_remed_measures_pkey", ["aecremId", "remedMeasureCd"], {
unique: true,
})
@Index("aecremmea_remmea_cd_indx", ["remedMeasureCd"], {})
@Index("aecremmea_sites_frgn", ["siteId"], {})
@Entity("aec_remed_measures")
export class AecRemedMeasures {
@Field()
@Column("bigint", { name: "site_id" })
siteId: string;

@Field()
@Column("bigint", { primary: true, name: "aecrem_id" })
aecremId: string;

@Field()
@Column("character varying", {
primary: true,
name: "remed_measure_cd",
length: 6,
})
remedMeasureCd: string;

@Field()
@Column("character varying", { name: "who_created", length: 30 })
whoCreated: string;

@Field()
@Column("timestamp without time zone", { name: "when_created" })
whenCreated: Date;

@Field()
@Column("character varying", {
name: "who_updated",
nullable: true,
length: 30,
})
whoUpdated: string | null;

@Field()
@Column("timestamp without time zone", {
name: "when_updated",
nullable: true,
Expand Down
14 changes: 14 additions & 0 deletions backend/sites/src/app/entities/aecRemediations.entity.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Field, ObjectType } from '@nestjs/graphql';
import {
Column,
Entity,
Expand All @@ -11,6 +12,7 @@ import { AecRemedMeasures } from "./aecRemedMeasures.entity";
import { MediaCd } from "./mediaCd.entity";
import { Sites } from "./sites.entity";

@ObjectType()
@Index("aec_remediations_pkey", ["id"], { unique: true })
@Index(
"aec_remediations_site_id_plan_name_media_code_key",
Expand All @@ -21,47 +23,59 @@ import { Sites } from "./sites.entity";
@Index("aecrem_sites_frgn", ["siteId"], {})
@Entity("aec_remediations")
export class AecRemediations {
@Field()
@Column("bigint", { primary: true, name: "id" })
id: string;

@Field()
@Column("bigint", { name: "site_id", unique: true })
siteId: string;

@Field()
@Column("character varying", { name: "plan_name", unique: true, length: 40 })
planName: string;

@Field()
@Column("character varying", { name: "media_code", unique: true, length: 6 })
mediaCode: string;

@Field()
@Column("timestamp without time zone", { name: "plan_date", nullable: true })
planDate: Date | null;

@Field()
@Column("character varying", {
name: "remed_note",
nullable: true,
length: 2000,
})
remedNote: string | null;

@Field()
@Column("smallint", { name: "rwm_flag" })
rwmFlag: number;

@Field()
@Column("smallint", { name: "rwm_note_flag" })
rwmNoteFlag: number;

@Field()
@Column("character varying", { name: "who_created", length: 30 })
whoCreated: string;

@Field()
@Column("timestamp without time zone", { name: "when_created" })
whenCreated: Date;

@Field()
@Column("character varying", {
name: "who_updated",
nullable: true,
length: 30,
})
whoUpdated: string | null;

@Field()
@Column("timestamp without time zone", {
name: "when_updated",
nullable: true,
Expand Down
10 changes: 10 additions & 0 deletions backend/sites/src/app/entities/aecSources.entity.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
import { AecAssessments } from "./aecAssessments.entity";
import { SourceCd } from "./sourceCd.entity";

@ObjectType()
@Index("aecsrce_assessment_frgn_frgn", ["aecassAreaId", "siteId"], {})
@Index("aec_sources_pkey", ["id"], { unique: true })
@Index("aecsrce_source_cd_frgn", ["sourceCd"], {})
@Entity("aec_sources")
export class AecSources {
@Field()
@Column("bigint", { primary: true, name: "id" })
id: string;

@Field()
@Column("bigint", { name: "site_id" })
siteId: string;

@Field()
@Column("character varying", { name: "aecass_area_id", length: 40 })
aecassAreaId: string;

@Field()
@Column("character varying", {
name: "source_cd",
nullable: true,
length: 80,
})
sourceCd: string | null;

@Field()
@Column("character varying", {
name: "who_created",
nullable: true,
Expand All @@ -37,18 +44,21 @@ export class AecSources {
})
whoUpdated: string | null;

@Field()
@Column("timestamp without time zone", {
name: "when_created",
nullable: true,
})
whenCreated: Date | null;

@Field()
@Column("timestamp without time zone", {
name: "when_updated",
nullable: true,
})
whenUpdated: Date | null;

@Field()
@Column("smallint", { name: "rwm_flag" })
rwmFlag: number;

Expand Down
4 changes: 4 additions & 0 deletions backend/sites/src/app/entities/bceRegionCd.entity.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { Column, Entity, Index, OneToMany } from "typeorm";
import { CityRegions } from "./cityRegions.entity";
import { Mailout } from "./mailout.entity";
import { PeopleOrgs } from "./peopleOrgs.entity";
import { Sites } from "./sites.entity";

@ObjectType()
@Index("bce_region_cd_pkey", ["code"], { unique: true })
@Entity("bce_region_cd")
export class BceRegionCd {
@Field()
@Column("character varying", { primary: true, name: "code", length: 6 })
code: string;

@Field()
@Column("character varying", { name: "description", length: 40 })
description: string;

Expand Down
4 changes: 4 additions & 0 deletions backend/sites/src/app/entities/cityRegions.entity.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
import { BceRegionCd } from "./bceRegionCd.entity";

@ObjectType()
@Index("cr_associated_region", ["bcerCode"], {})
@Index("city_regions_pkey", ["city"], { unique: true })
@Entity("city_regions")
export class CityRegions {
@Field()
@Column("character varying", { primary: true, name: "city", length: 30 })
city: string;

@Field()
@Column("character varying", { name: "bcer_code", length: 6 })
bcerCode: string;

Expand Down
4 changes: 4 additions & 0 deletions backend/sites/src/app/entities/classificationCd.entity.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { Column, Entity, Index, OneToMany } from "typeorm";
import { Sites } from "./sites.entity";

@ObjectType()
@Index("classification_cd_pkey", ["code"], { unique: true })
@Entity("classification_cd")
export class ClassificationCd {
@Field()
@Column("character varying", { primary: true, name: "code", length: 6 })
code: string;

@Field()
@Column("character varying", { name: "description", length: 40 })
description: string;

Expand Down
9 changes: 9 additions & 0 deletions backend/sites/src/app/entities/conditionsText.entity.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,44 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
import { Events } from "./events.entity";

@ObjectType()
@Index("ctext_applied_to", ["eventId"], {})
@Index("ctext_rwm_flag", ["rwmFlag"], {})
@Entity("conditions_text")
export class ConditionsText {
@Field()
@Column("bigint", { primary: true, name: "event_id" })
eventId: string;

@Field()
@Column("character varying", { name: "conditions_comment", length: 2000 })
conditionsComment: string;

@Field()
@Column("character varying", { name: "who_created", length: 30 })
whoCreated: string;

@Field()
@Column("character varying", {
name: "who_updated",
nullable: true,
length: 30,
})
whoUpdated: string | null;

@Field()
@Column("timestamp without time zone", { name: "when_created" })
whenCreated: Date;

@Field()
@Column("timestamp without time zone", {
name: "when_updated",
nullable: true,
})
whenUpdated: Date | null;

@Field()
@Column("smallint", { name: "rwm_flag" })
rwmFlag: number;

Expand Down
Loading

0 comments on commit 9dd9151

Please sign in to comment.