Skip to content

Commit

Permalink
added graphql tags
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhila-aot committed Mar 25, 2024
1 parent 9dd9151 commit 02d0160
Show file tree
Hide file tree
Showing 15 changed files with 142 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/sites/src/app/entities/landUseCd.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Field, ObjectType } from '@nestjs/graphql';
import { Column, Entity, Index, OneToMany } from "typeorm";
import { LandHistories } from "./landHistories.entity";
import { SiteProfileLandUses } from "./siteProfileLandUses.entity";
import { observeNotification } from 'rxjs/internal/Notification';


@ObjectType()
@Index("land_use_cd_pkey", ["code"], { unique: true })
Expand Down
27 changes: 27 additions & 0 deletions backend/sites/src/app/entities/mailout.entity.ts
Original file line number Diff line number Diff line change
@@ -1,123 +1,150 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
import { BceRegionCd } from "./bceRegionCd.entity";
import { PeopleOrgs } from "./peopleOrgs.entity";
import { Sites } from "./sites.entity";

@ObjectType()
@Index("mailout_bcer_code", ["bcerCode"], {})
@Index("mailout_pkey", ["psnorgId", "siteId"], { unique: true })
@Entity("mailout")
export class Mailout {
@Field()
@Column("bigint", { primary: true, name: "site_id" })
siteId: string;

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

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

@Field()
@Column("character varying", { name: "display_name", length: 150 })
displayName: string;

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

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

@Field()
@Column("character varying", { name: "organization_address", length: 50 })
organizationAddress: string;

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

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

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

@Field()
@Column("character varying", { name: "prov_state", length: 2 })
provState: string;

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

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

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

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

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

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

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

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

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

@Field()
@Column("timestamp without time zone", {
name: "update_notation_date",
nullable: true,
})
updateNotationDate: Date | 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
11 changes: 11 additions & 0 deletions backend/sites/src/app/entities/matrixObjectives.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, Index, JoinColumn, ManyToOne } from "typeorm";
import { ActivityCd } from "./activityCd.entity";
import { ContamCd } from "./contamCd.entity";
Expand All @@ -6,6 +7,7 @@ import { MediaCd } from "./mediaCd.entity";
import { ProtectionCategoryCd } from "./protectionCategoryCd.entity";
import { RemedSiteUseCd } from "./remedSiteUseCd.entity";

@ObjectType()
@Index(
"matrix_objectives_pkey",
[
Expand Down Expand Up @@ -39,50 +41,59 @@ import { RemedSiteUseCd } from "./remedSiteUseCd.entity";
@Index("matobj_remed_use_frgn", ["remedSiteUseCode"], {})
@Entity("matrix_objectives")
export class MatrixObjectives {
@Field()
@Column("character varying", {
primary: true,
name: "criteria_code",
length: 10,
})
criteriaCode: string;

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

@Field()
@Column("character varying", {
primary: true,
name: "contaminant_code",
length: 50,
})
contaminantCode: string;

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

@Field()
@Column("character varying", {
primary: true,
name: "protcat_code",
length: 40,
})
protcatCode: string;

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

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

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

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

Expand Down
13 changes: 13 additions & 0 deletions backend/sites/src/app/entities/measurementPopulations.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,53 +12,65 @@ import { AecAssessments } from "./aecAssessments.entity";
import { Sites } from "./sites.entity";
import { Measurements } from "./measurements.entity";

@ObjectType()
@Index("msmt_pop_aecass_ind", ["associatedAecassId", "siteId"], {})
@Index("measurement_populations_pkey", ["id"], { unique: true })
@Index("msmt_pop_sdoc_ind", ["sdocId"], {})
@Index("msmt_pop_site_ind", ["siteId"], {})
@Entity("measurement_populations")
export class MeasurementPopulations {
@Field()
@Column("bigint", { primary: true, name: "id" })
id: string;

@Field()
@Column("bigint", { name: "sdoc_id" })
sdocId: string;

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

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

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

@Field()
@Column("character varying", {
name: "associated_aecass_id",
nullable: true,
length: 40,
})
associatedAecassId: 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,
})
whenUpdated: Date | null;

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

Expand Down
15 changes: 15 additions & 0 deletions backend/sites/src/app/entities/measurements.entity.ts
Original file line number Diff line number Diff line change
@@ -1,59 +1,74 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
import { ContamCd } from "./contamCd.entity";
import { MediaCd } from "./mediaCd.entity";
import { MeasurementPopulations } from "./measurementPopulations.entity";

@ObjectType()
@Index("msmt_contam_ind", ["contaminantCd"], {})
@Index("measurements_pkey", ["contaminantCd", "mediaCd", "msmtPopId"], {
unique: true,
})
@Index("msmt_media_ind", ["mediaCd"], {})
@Entity("measurements")
export class Measurements {
@Field()
@Column("bigint", { primary: true, name: "msmt_pop_id" })
msmtPopId: string;

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

@Field()
@Column("character varying", {
primary: true,
name: "contaminant_cd",
length: 50,
})
contaminantCd: string;

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

@Field()
@Column("bigint", { name: "low_value" })
lowValue: string;

@Field()
@Column("bigint", { name: "high_value" })
highValue: string;

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

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

@Field()
@Column("bigint", { name: "standard_deviation" })
standardDeviation: 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
4 changes: 4 additions & 0 deletions backend/sites/src/app/entities/mediaCd.entity.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { Column, Entity, Index, OneToMany } from "typeorm";
import { AecMedias } from "./aecMedias.entity";
import { AecRemediations } from "./aecRemediations.entity";
import { CriteriaLevelCd } from "./criteriaLevelCd.entity";
import { MatrixObjectives } from "./matrixObjectives.entity";
import { Measurements } from "./measurements.entity";

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

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

Expand Down
Loading

0 comments on commit 02d0160

Please sign in to comment.