Skip to content

Commit

Permalink
Merge pull request #32 from bcgov/EMSEDT_186_Data_Validation
Browse files Browse the repository at this point in the history
EMSED186: Data Validation
  • Loading branch information
vmanawat authored Sep 20, 2024
2 parents 27db8ed + d7f84b9 commit 22798f8
Show file tree
Hide file tree
Showing 17 changed files with 1,717 additions and 380 deletions.
2 changes: 1 addition & 1 deletion backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 117 additions & 7 deletions backend/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ model file_submission {
submission_date DateTime @db.Timestamp(6)
submitter_user_id String @db.VarChar(200)
submission_status_code String @db.VarChar(10)
file_operation_code String @db.VarChar(10)
submitter_agency_name String @db.VarChar(200)
sample_count Int?
results_count Int?
Expand All @@ -37,13 +38,14 @@ model file_submission {
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
update_utc_timestamp DateTime @db.Timestamp(6)
file_operation_codes file_operation_codes @relation(fields: [file_operation_code], references: [file_operation_code], onDelete: NoAction, onUpdate: NoAction, map: "file_operation_code_fk")
submission_status submission_status_code @relation(fields: [submission_status_code], references: [submission_status_code], onDelete: NoAction, onUpdate: NoAction, map: "submission_status_code_fk")
}

model aqi_projects {
aqi_projects_id String @id @db.Uuid
custom_id String @db.VarChar(200)
description String? @db.VarChar(200)
description String? @db.VarChar(2000)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
Expand All @@ -53,7 +55,7 @@ model aqi_projects {
model aqi_mediums {
aqi_mediums_id String @id @db.Uuid
custom_id String @db.VarChar(200)
description String? @db.VarChar(200)
description String? @db.VarChar(2000)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
Expand All @@ -63,7 +65,7 @@ model aqi_mediums {
model aqi_units {
aqi_units_id String @id @db.Uuid
custom_id String @db.VarChar(200)
description String? @db.VarChar(200)
description String? @db.VarChar(2000)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
Expand All @@ -73,7 +75,7 @@ model aqi_units {
model aqi_collection_methods {
aqi_collection_methods_id String @id @db.Uuid
custom_id String @db.VarChar(200)
description String? @db.VarChar(200)
description String? @db.VarChar(2000)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
Expand All @@ -83,7 +85,7 @@ model aqi_collection_methods {
model aqi_extended_attributes {
aqi_extended_attributes_id String @id @db.Uuid
custom_id String @db.VarChar(200)
description String? @db.VarChar(200)
description String? @db.VarChar(2000)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
Expand All @@ -103,7 +105,7 @@ model aqi_locations {
model aqi_context_tags {
aqi_context_tags_id String @id @db.Uuid
custom_id String @db.VarChar(200)
description String? @db.VarChar(200)
description String? @db.VarChar(2000)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
Expand All @@ -113,7 +115,7 @@ model aqi_context_tags {
model aqi_laboratories {
aqi_laboratories_id String @id @db.Uuid
custom_id String @db.VarChar(200)
description String? @db.VarChar(200)
description String? @db.VarChar(2000)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
Expand All @@ -139,3 +141,111 @@ model ftp_users {
update_user_id String @db.VarChar(200)
update_utc_timestamp DateTime @db.Timestamp(6)
}

model aqi_observed_properties {
aqi_observed_properties_id String @id @db.Uuid
custom_id String @db.VarChar(200)
description String? @db.VarChar(2000)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
update_utc_timestamp DateTime @db.Timestamp(6)
}

model aqi_result_grade {
aqi_result_grade_id String @id @db.Uuid
custom_id String @db.VarChar(200)
description String? @db.VarChar(2000)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
update_utc_timestamp DateTime @db.Timestamp(6)
}

model aqi_result_status {
aqi_result_status_id String @id @db.Uuid
custom_id String @db.VarChar(200)
description String? @db.VarChar(2000)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
update_utc_timestamp DateTime @db.Timestamp(6)
}

model aqi_detection_conditions {
aqi_detection_conditions_id String @id @db.Uuid
custom_id String @db.VarChar(200)
description String? @db.VarChar(2000)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
update_utc_timestamp DateTime @db.Timestamp(6)
}

model aqi_field_visits {
aqi_field_visits_id String @id @db.Uuid
aqi_field_visit_start_time DateTime @db.Timestamptz(6)
aqi_location_custom_id String @db.VarChar(200)
}

model aqi_field_activities {
aqi_field_activities_id String @id @db.Uuid
aqi_field_activities_start_time DateTime @db.Timestamptz(6)
aqi_field_activities_custom_id String @db.VarChar(200)
aqi_location_custom_id String @db.VarChar(200)
aqi_field_visit_start_time DateTime @db.Timestamptz(6)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
update_utc_timestamp DateTime @db.Timestamp(6)
}

model aqi_specimens {
aqi_specimens_id String @id @db.Uuid
aqi_specimens_custom_id String @db.VarChar(200)
aqi_field_activities_start_time DateTime @db.Timestamptz(6)
aqi_field_activities_custom_id String @db.VarChar(200)
aqi_location_custom_id String @db.VarChar(200)
}

model aqi_preservatives {
aqi_preservatives_id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
custom_id String @db.VarChar(200)
description String? @db.VarChar(2000)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
update_utc_timestamp DateTime @db.Timestamp(6)
}

model aqi_sample_fractions {
aqi_sample_fractions_id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
custom_id String @db.VarChar(200)
description String? @db.VarChar(2000)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
update_utc_timestamp DateTime @db.Timestamp(6)
}

model aqi_data_classifications {
aqi_data_classifications_id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
custom_id String @db.VarChar(200)
description String? @db.VarChar(2000)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
update_utc_timestamp DateTime @db.Timestamp(6)
}

model file_operation_codes {
file_operation_code String @id(map: "file_operation_code_pk") @db.VarChar(20)
description String @db.VarChar(250)
display_order Int
active_ind Boolean @default(true)
create_user_id String @db.VarChar(200)
create_utc_timestamp DateTime @db.Timestamp(6)
update_user_id String @db.VarChar(200)
update_utc_timestamp DateTime @db.Timestamp(6)
file_submission file_submission[]
}
Loading

0 comments on commit 22798f8

Please sign in to comment.