diff --git a/CHANGELOG.md b/CHANGELOG.md index 3508991cc..0f3ea7ab0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ - Replaced label for layer description quality. - Reduced number of seeded boreholes for development from 10'000 to 3'000. - Use reusable card components for hydrogeology. +- Renamed various codelists to have more evocative names (e.g. `location_precision` instead of `qt_location`, `plasticity` instead of `mlpr101`, …) ### Fixed diff --git a/src/api-legacy/v1/action.py b/src/api-legacy/v1/action.py index ab9580efe..b78648548 100644 --- a/src/api-legacy/v1/action.py +++ b/src/api-legacy/v1/action.py @@ -389,8 +389,8 @@ def filterProfileLayers(self, filter={}): cohesion_id_cli = %s """ % self.getIdx()) - if 'qt_description' in keys and filter['qt_description'] not in ['', None]: - params.append(filter['qt_description']) + if 'description_quality' in keys and filter['description_quality'] not in ['', None]: + params.append(filter['description_quality']) where.append(""" qt_description_id_cli = %s """ % self.getIdx()) @@ -649,11 +649,11 @@ def filterBorehole(self, filter={}): drilling_diameter_bho <= %s """ % self.getIdx()) - if 'qt_location' in keys and filter[ - 'qt_location'] not in ['', None]: - params.append(int(filter['qt_location'])) + if 'location_precision' in keys and filter[ + 'location_precision'] not in ['', None]: + params.append(int(filter['location_precision'])) where.append(""" - qt_location_id_cli = %s + location_precision_id_cli = %s """ % self.getIdx()) if 'reference_elevation_from' in keys and filter['reference_elevation_from'] not in ['', None]: @@ -694,9 +694,9 @@ def filterBorehole(self, filter={}): elevation_z_bho <= %s """ % self.getIdx()) - if 'qt_elevation' in keys and filter[ - 'qt_elevation'] not in ['', None]: - params.append(int(filter['qt_elevation'])) + if 'elevation_precision' in keys and filter[ + 'elevation_precision'] not in ['', None]: + params.append(int(filter['elevation_precision'])) where.append(""" qt_elevation_id_cli = %s """ % self.getIdx()) diff --git a/src/api-legacy/v1/borehole/get.py b/src/api-legacy/v1/borehole/get.py index f05cd5bbf..6ae598ec6 100644 --- a/src/api-legacy/v1/borehole/get.py +++ b/src/api-legacy/v1/borehole/get.py @@ -53,10 +53,10 @@ def get_sql(sql_lock='', file_permission=''): location_x_lv03_bho as location_x_lv03, location_y_lv03_bho as location_y_lv03, srs_id_cli as srs, - qt_location_id_cli as qt_location, + qt_location_id_cli as location_precision, elevation_z_bho as elevation_z, hrs_id_cli as hrs, - qt_elevation_id_cli as qt_elevation, + qt_elevation_id_cli as elevation_precision, reference_elevation_bho as reference_elevation, qt_reference_elevation_id_cli as qt_reference_elevation, diff --git a/src/api-legacy/v1/borehole/list.py b/src/api-legacy/v1/borehole/list.py index 244115081..c8e6c3117 100644 --- a/src/api-legacy/v1/borehole/list.py +++ b/src/api-legacy/v1/borehole/list.py @@ -45,7 +45,7 @@ def get_sql_text(language='en', cols=None): COALESCE( qtloc.text_cli_{language}, qtloc.text_cli_{fallback} - ) as qt_location, + ) as location_precision, elevation_z_bho as elevation_z, COALESCE( hrs.text_cli_{language}, @@ -54,7 +54,7 @@ def get_sql_text(language='en', cols=None): COALESCE( qth.text_cli_{language}, qth.text_cli_{fallback} - ) as qt_elevation, + ) as elevation_precision, reference_elevation_bho as reference_elevation, COALESCE( @@ -230,10 +230,10 @@ def get_sql_geolcode(cols=None, join=None, where=None): location_y_lv03_bho as location_y_lv03, srd.geolcode as srs, - qtloc.geolcode as qt_location, + qtloc.geolcode as location_precision, elevation_z_bho as elevation_z, hrs.geolcode as hrs, - qth.geolcode as qt_elevation, + qth.geolcode as elevation_precision, reference_elevation_bho as reference_elevation, qre.geolcode as qt_reference_elevation, diff --git a/src/api-legacy/v1/borehole/patch.py b/src/api-legacy/v1/borehole/patch.py index 3b3e4ff2a..a4971a135 100644 --- a/src/api-legacy/v1/borehole/patch.py +++ b/src/api-legacy/v1/borehole/patch.py @@ -119,10 +119,10 @@ def get_column(field): elif field == 'srs': column = 'srs_id_cli' - elif field == 'qt_location': + elif field == 'location_precision': column = 'qt_location_id_cli' - elif field == 'qt_elevation': + elif field == 'elevation_precision': column = 'qt_elevation_id_cli' elif field == 'reference_elevation': @@ -273,8 +273,8 @@ async def execute(self, id, field, value, user): 'restriction', 'kind', 'srs', - 'qt_location', - 'qt_elevation', + 'location_precision', + 'elevation_precision', 'hrs', 'custom.landuse', 'extended.drilling_method', @@ -307,10 +307,10 @@ async def execute(self, id, field, value, user): schema = 'custom.qt_top_bedrock' elif field == 'qt_reference_elevation': - schema = 'qt_elevation' + schema = 'elevation_precision' elif field == 'reference_elevation_type': - schema = 'ibor117' + schema = 'reference_elevation_type' elif field == 'qt_total_depth_tvd': schema = 'custom.qt_top_bedrock' diff --git a/src/api-legacy/v1/borehole/profile/layer/get.py b/src/api-legacy/v1/borehole/profile/layer/get.py index 8d7d6347f..6f990fbec 100644 --- a/src/api-legacy/v1/borehole/profile/layer/get.py +++ b/src/api-legacy/v1/borehole/profile/layer/get.py @@ -167,11 +167,11 @@ class GetGeologyLayer(Action): depth_from_lay AS depth_from, depth_to_lay AS depth_to, last_lay AS last, - layer.qt_description_id_cli AS qt_description, + layer.qt_description_id_cli AS description_quality, layer.lithology_id_cli AS lithology, layer.lithostratigraphy_id_cli AS lithostratigraphy, COALESCE( - mlpr112, '{}'::int[] + colour, '{}'::int[] ) AS color, layer.plasticity_id_cli AS plasticity, layer.humidity_id_cli AS humidity, @@ -183,22 +183,22 @@ class GetGeologyLayer(Action): mlpr113, '{}'::int[] ) AS jointing,*/ COALESCE( - mlpr108, '{}'::int[] + organic_components, '{}'::int[] ) AS organic_component, striae_lay AS striae, layer.grain_size_1_id_cli AS grain_size_1, layer.grain_size_2_id_cli AS grain_size_2, COALESCE( - mlpr110, '{}'::int[] + grain_shape, '{}'::int[] ) AS grain_shape, COALESCE( - mlpr115, '{}'::int[] + grain_angularity, '{}'::int[] ) AS grain_granularity, layer.cohesion_id_cli AS cohesion, layer.uscs_1_id_cli AS uscs_1, layer.uscs_2_id_cli AS uscs_2, COALESCE( - mcla101, '{}'::int[] + uscs_type, '{}'::int[] ) AS uscs_3, COALESCE( uscs_original_lay, '' @@ -208,7 +208,7 @@ class GetGeologyLayer(Action): ) AS original_lithology, uscs_determination_id_cli AS uscs_determination, COALESCE( - mcla107, '{}'::int[] + debris, '{}'::int[] ) AS debris, layer.lithology_top_bedrock_id_cli AS lithology_top_bedrock, COALESCE( @@ -270,11 +270,11 @@ class GetGeologyLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr112 + id_lay_fk, array_agg(id_cli_fk) as colour FROM bdms.layer_codelist WHERE - code_cli = 'mlpr112' + code_cli = 'colour' GROUP BY id_lay_fk ) clr ON clr.id_lay_fk = id_lay @@ -292,55 +292,55 @@ class GetGeologyLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr108 + id_lay_fk, array_agg(id_cli_fk) as organic_components FROM bdms.layer_codelist WHERE - code_cli = 'mlpr108' + code_cli = 'organic_components' GROUP BY id_lay_fk ) oco ON oco.id_lay_fk = id_lay LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr110 + id_lay_fk, array_agg(id_cli_fk) as grain_shape FROM bdms.layer_codelist WHERE - code_cli = 'mlpr110' + code_cli = 'grain_shape' GROUP BY id_lay_fk ) gsh ON gsh.id_lay_fk = id_lay LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mcla101 + id_lay_fk, array_agg(id_cli_fk) as uscs_type FROM bdms.layer_codelist WHERE - code_cli = 'mcla101' + code_cli = 'uscs_type' GROUP BY id_lay_fk ) us3 ON us3.id_lay_fk = id_lay LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr115 + id_lay_fk, array_agg(id_cli_fk) as grain_angularity FROM bdms.layer_codelist WHERE - code_cli = 'mlpr115' + code_cli = 'grain_angularity' GROUP BY id_lay_fk ) ggr ON ggr.id_lay_fk = id_lay LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mcla107 + id_lay_fk, array_agg(id_cli_fk) as debris FROM bdms.layer_codelist WHERE - code_cli = 'mcla107' + code_cli = 'debris' GROUP BY id_lay_fk ) dbr ON dbr.id_lay_fk = id_lay diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py index 21e283a6e..5dd27f259 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py @@ -35,11 +35,11 @@ class GetLayer(Action): depth_from_lay AS depth_from, depth_to_lay AS depth_to, last_lay AS last, - layer.qt_description_id_cli AS qt_description, + layer.qt_description_id_cli AS description_quality, layer.lithology_id_cli AS lithology, layer.lithostratigraphy_id_cli AS lithostratigraphy, COALESCE( - mlpr112, '{}'::int[] + colour, '{}'::int[] ) AS color, layer.plasticity_id_cli AS plasticity, layer.humidity_id_cli AS humidity, @@ -48,22 +48,22 @@ class GetLayer(Action): layer.alteration_id_cli AS alteration, layer.compactness_id_cli AS compactness, COALESCE( - mlpr108, '{}'::int[] + organic_components, '{}'::int[] ) AS organic_component, striae_lay AS striae, layer.grain_size_1_id_cli AS grain_size_1, layer.grain_size_2_id_cli AS grain_size_2, COALESCE( - mlpr110, '{}'::int[] + grain_shape, '{}'::int[] ) AS grain_shape, COALESCE( - mlpr115, '{}'::int[] + grain_angularity, '{}'::int[] ) AS grain_granularity, layer.cohesion_id_cli AS cohesion, layer.uscs_1_id_cli AS uscs_1, layer.uscs_2_id_cli AS uscs_2, COALESCE( - mcla101, '{}'::int[] + uscs_type, '{}'::int[] ) AS uscs_3, layer.lithology_top_bedrock_id_cli AS lithology_top_bedrock, COALESCE( @@ -74,7 +74,7 @@ class GetLayer(Action): ) AS original_lithology, uscs_determination_id_cli AS uscs_determination, COALESCE( - mcla107, '{}'::int[] + debris, '{}'::int[] ) AS debris, COALESCE( notes_lay, '' @@ -135,11 +135,11 @@ class GetLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr112 + id_lay_fk, array_agg(id_cli_fk) as colour FROM bdms.layer_codelist WHERE - code_cli = 'mlpr112' + code_cli = 'colour' GROUP BY id_lay_fk ) clr ON clr.id_lay_fk = id_lay @@ -157,55 +157,55 @@ class GetLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr108 + id_lay_fk, array_agg(id_cli_fk) as organic_components FROM bdms.layer_codelist WHERE - code_cli = 'mlpr108' + code_cli = 'organic_components' GROUP BY id_lay_fk ) oco ON oco.id_lay_fk = id_lay LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr110 + id_lay_fk, array_agg(id_cli_fk) as grain_shape FROM bdms.layer_codelist WHERE - code_cli = 'mlpr110' + code_cli = 'grain_shape' GROUP BY id_lay_fk ) us3 ON us3.id_lay_fk = id_lay LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mcla101 + id_lay_fk, array_agg(id_cli_fk) as uscs_type FROM bdms.layer_codelist WHERE - code_cli = 'mcla101' + code_cli = 'uscs_type' GROUP BY id_lay_fk ) gsh ON gsh.id_lay_fk = id_lay LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr115 + id_lay_fk, array_agg(id_cli_fk) as grain_angularity FROM bdms.layer_codelist WHERE - code_cli = 'mlpr115' + code_cli = 'grain_angularity' GROUP BY id_lay_fk ) ggr ON ggr.id_lay_fk = id_lay LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mcla107 + id_lay_fk, array_agg(id_cli_fk) as debris FROM bdms.layer_codelist WHERE - code_cli = 'mcla107' + code_cli = 'debris' GROUP BY id_lay_fk ) dbr ON dbr.id_lay_fk = id_lay diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index 7f28923ad..f9e7454cb 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -20,7 +20,7 @@ def get_column(field): elif field == 'last': column = 'last_lay' - elif field == 'qt_description': + elif field == 'description_quality': column = 'qt_description_id_cli' elif field == 'lithology': @@ -132,7 +132,7 @@ async def execute(self, id, field, value, user_id): """ % column, value, user_id, id) elif field in [ - 'qt_description', + 'description_quality', 'lithology', 'lithostratigraphy', 'plasticity', @@ -158,40 +158,40 @@ async def execute(self, id, field, value, user_id): schema = 'custom.lithostratigraphy_top_bedrock' elif field == 'plasticity': - schema = 'mlpr101' + schema = 'plasticity' elif field == 'humidity': - schema = 'mlpr105' + schema = 'humidity' elif field == 'consistance': - schema = 'mlpr103' + schema = 'consistency' elif field == 'gradation': schema = 'gradation' elif field == 'alteration': - schema = 'mlpr106' + schema = 'alteration' elif field == 'compactness': - schema = 'mlpr102' + schema = 'compactness' elif field == 'grain_size_1': - schema = 'mlpr109' + schema = 'grain_size' elif field == 'grain_size_2': - schema = 'mlpr109' + schema = 'grain_size' elif field == 'cohesion': - schema = 'mlpr116' + schema = 'cohesion' elif field == 'uscs_1': - schema = 'mcla101' + schema = 'uscs_type' elif field == 'uscs_2': - schema = 'mcla101' + schema = 'uscs_type' elif field == 'uscs_determination': - schema = 'mcla104' + schema = 'uscs_determination' elif field == 'lithology_top_bedrock': schema = 'custom.lithology_top_bedrock' @@ -229,36 +229,28 @@ async def execute(self, id, field, value, user_id): 'grain_shape', 'grain_granularity', 'uscs_3', - # 'uscs_determination', 'debris', - # 'lithology_top_bedrock' ]: schema = field if field == 'color': - schema = 'mlpr112' + schema = 'colour' elif field == 'organic_component': - schema = 'mlpr108' + schema = 'organic_components' elif field == 'grain_shape': - schema = 'mlpr110' + schema = 'grain_shape' elif field == 'grain_granularity': - schema = 'mlpr115' + schema = 'grain_angularity' elif field == 'uscs_3': - schema = 'mcla101' - - # elif field == 'uscs_determination': - # schema = 'mcla104' + schema = 'uscs_type' elif field == 'debris': - schema = 'mcla107' - - # elif field == 'lithology_top_bedrock': - # schema = 'custom.lithology_top_bedrock' + schema = 'debris' await self.conn.execute(""" DELETE FROM bdms.layer_codelist diff --git a/src/api/BdmsContext.cs b/src/api/BdmsContext.cs index 8f241e881..82931d5bf 100644 --- a/src/api/BdmsContext.cs +++ b/src/api/BdmsContext.cs @@ -124,9 +124,9 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity().HasOne(l => l.Lithostratigraphy).WithMany().HasForeignKey(l => l.LithostratigraphyId); modelBuilder.Entity().HasOne(l => l.Purpose).WithMany().HasForeignKey(l => l.PurposeId); modelBuilder.Entity().HasOne(l => l.QtDepth).WithMany().HasForeignKey(l => l.QtDepthId); - modelBuilder.Entity().HasOne(l => l.QtElevation).WithMany().HasForeignKey(l => l.QtElevationId); + modelBuilder.Entity().HasOne(l => l.ElevationPrecision).WithMany().HasForeignKey(l => l.ElevationPrecisionId); modelBuilder.Entity().HasOne(l => l.QtInclinationDirection).WithMany().HasForeignKey(l => l.QtInclinationDirectionId); - modelBuilder.Entity().HasOne(l => l.QtLocation).WithMany().HasForeignKey(l => l.QtLocationId); + modelBuilder.Entity().HasOne(l => l.LocationPrecision).WithMany().HasForeignKey(l => l.LocationPrecisionId); modelBuilder.Entity().HasOne(l => l.QtTotalDepthTvd).WithMany().HasForeignKey(l => l.QtTotalDepthTvdId); modelBuilder.Entity().HasOne(l => l.QtReferenceElevation).WithMany().HasForeignKey(l => l.QtReferenceElevationId); modelBuilder.Entity().HasOne(l => l.ReferenceElevationType).WithMany().HasForeignKey(l => l.ReferenceElevationTypeId); @@ -159,7 +159,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity().HasOne(l => l.LithologyTopBedrock).WithMany().HasForeignKey(l => l.LithologyTopBedrockId); modelBuilder.Entity().HasOne(l => l.Lithostratigraphy).WithMany().HasForeignKey(l => l.LithostratigraphyId); modelBuilder.Entity().HasOne(l => l.Plasticity).WithMany().HasForeignKey(l => l.PlasticityId); - modelBuilder.Entity().HasOne(l => l.QtDescription).WithMany().HasForeignKey(l => l.QtDescriptionId); + modelBuilder.Entity().HasOne(l => l.DescriptionQuality).WithMany().HasForeignKey(l => l.DescriptionQualityId); modelBuilder.Entity().HasOne(l => l.Uscs1).WithMany().HasForeignKey(l => l.Uscs1Id); modelBuilder.Entity().HasOne(l => l.Uscs2).WithMany().HasForeignKey(l => l.Uscs2Id); modelBuilder.Entity().HasOne(l => l.UscsDetermination).WithMany().HasForeignKey(l => l.UscsDeterminationId); diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index 06c33dc49..37a6e8a99 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -62,12 +62,12 @@ public static void SeedData(this BdmsContext context) List srsIds = codelists.Where(c => c.Schema == "srs").Select(s => s.Id).ToList(); List hrsIds = codelists.Where(c => c.Schema == "hrs").Select(s => s.Id).ToList(); List restrictionIds = codelists.Where(c => c.Schema == "restriction").Select(s => s.Id).ToList(); - List qtLocationnIds = codelists.Where(c => c.Schema == "qt_location").Select(s => s.Id).ToList(); - List qtDescriptionIds = codelists.Where(c => c.Schema == "qt_description").Select(s => s.Id).ToList(); + List locationPrecisionIds = codelists.Where(c => c.Schema == "location_precision").Select(s => s.Id).ToList(); + List descriptionQualityIds = codelists.Where(c => c.Schema == "description_quality").Select(s => s.Id).ToList(); List drillingMethodIds = codelists.Where(c => c.Schema == "extended.drilling_method").Select(s => s.Id).ToList(); List cuttingsIds = codelists.Where(c => c.Schema == "custom.cuttings").Select(s => s.Id).ToList(); List qtDepthIds = codelists.Where(c => c.Schema == "custom.qt_top_bedrock").Select(s => s.Id).ToList(); - List qtElevationIds = codelists.Where(c => c.Schema == "qt_elevation").Select(s => s.Id).ToList(); + List elevationPrecisionIds = codelists.Where(c => c.Schema == "elevation_precision").Select(s => s.Id).ToList(); List layerKindIds = codelists.Where(c => c.Schema == "layer_kind").Select(s => s.Id).ToList(); List purposeIds = codelists.Where(c => c.Schema == "extended.purpose").Select(s => s.Id).ToList(); List statusIds = codelists.Where(c => c.Schema == "extended.status").Select(s => s.Id).ToList(); @@ -75,26 +75,26 @@ public static void SeedData(this BdmsContext context) List qtInclinationDirectionIds = codelists.Where(c => c.Schema == "custom.qt_bore_inc_dir").Select(s => s.Id).ToList(); List chronostratigraphyTopBedrockIds = codelists.Where(c => c.Schema == "custom.chronostratigraphy_top_bedrock").Select(s => s.Id).ToList(); List lithostratigraphyTopBedrockIds = codelists.Where(c => c.Schema == "custom.lithostratigraphy_top_bedrock").Select(s => s.Id).ToList(); - List instrumentKindIds = codelists.Where(c => c.Schema == CompletionSchemas.InstrumentationKindSchema).Select(s => s.Id).ToList(); + List instrumentKindIds = codelists.Where(c => c.Schema == CompletionSchemas.InstrumentationTypeSchema).Select(s => s.Id).ToList(); List instrumentStatusIds = codelists.Where(c => c.Schema == CompletionSchemas.InstrumentationStatusSchema).Select(s => s.Id).ToList(); - List casingKindIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingKindSchema).Select(s => s.Id).ToList(); + List casingKindIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingTypeSchema).Select(s => s.Id).ToList(); List casingMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Select(s => s.Id).ToList(); - List plasticityIds = codelists.Where(c => c.Schema == "mlpr101").Select(s => s.Id).ToList(); - List compactnessIds = codelists.Where(c => c.Schema == "mlpr102").Select(s => s.Id).ToList(); - List consistanceIds = codelists.Where(c => c.Schema == "mlpr103").Select(s => s.Id).ToList(); - List humidityIds = codelists.Where(c => c.Schema == "mlpr105").Select(s => s.Id).ToList(); - List alterationIds = codelists.Where(c => c.Schema == "mlpr106").Select(s => s.Id).ToList(); - List cohesionIds = codelists.Where(c => c.Schema == "mlpr116").Select(s => s.Id).ToList(); - List backfillKindIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillKindSchema).Select(s => s.Id).ToList(); + List plasticityIds = codelists.Where(c => c.Schema == "plasticity").Select(s => s.Id).ToList(); + List compactnessIds = codelists.Where(c => c.Schema == "compactness").Select(s => s.Id).ToList(); + List consistanceIds = codelists.Where(c => c.Schema == "consistency").Select(s => s.Id).ToList(); + List humidityIds = codelists.Where(c => c.Schema == "humidity").Select(s => s.Id).ToList(); + List alterationIds = codelists.Where(c => c.Schema == "alteration").Select(s => s.Id).ToList(); + List cohesionIds = codelists.Where(c => c.Schema == "cohesion").Select(s => s.Id).ToList(); + List backfillKindIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Select(s => s.Id).ToList(); List backfillMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Select(s => s.Id).ToList(); - List uscsIds = codelists.Where(c => c.Schema == "mcla101").Select(s => s.Id).ToList(); - List uscsDeterminationIds = codelists.Where(c => c.Schema == "mcla104").Select(s => s.Id).ToList(); + List uscsIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); + List uscsDeterminationIds = codelists.Where(c => c.Schema == "uscs_determination").Select(s => s.Id).ToList(); List gradationIds = codelists.Where(c => c.Schema == "gradation").Select(s => s.Id).ToList(); - List soilStateIds = codelists.Where(c => c.Schema == "mcla101").Select(s => s.Id).ToList(); // unclear with codelist - List kirostIds = codelists.Where(c => c.Schema == "mcla101").Select(s => s.Id).ToList(); // unclear with codelist - List grainSize1Ids = codelists.Where(c => c.Schema == "mlpr101").Select(s => s.Id).ToList(); // unclear with codelist - List grainSize2Ids = codelists.Where(c => c.Schema == "mlpr103").Select(s => s.Id).ToList(); // unclear with codelist - List referenceElevationTypeIds = codelists.Where(c => c.Schema == "ibor117").Select(s => s.Id).ToList(); + List soilStateIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist + List kirostIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist + List grainSize1Ids = codelists.Where(c => c.Schema == "grain_size").Select(s => s.Id).ToList(); + List grainSize2Ids = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist + List referenceElevationTypeIds = codelists.Where(c => c.Schema == "reference_elevation_type").Select(s => s.Id).ToList(); List waterIngressReliabilityIds = codelists.Where(c => c.Schema == HydrogeologySchemas.ObservationReliabilitySchema).Select(s => s.Id).ToList(); List waterIngressQuantityIds = codelists.Where(c => c.Schema == HydrogeologySchemas.WateringressQualitySchema).Select(s => s.Id).ToList(); List waterIngressConditionsIds = codelists.Where(c => c.Schema == HydrogeologySchemas.WateringressConditionsSchema).Select(s => s.Id).ToList(); @@ -139,10 +139,10 @@ public static void SeedData(this BdmsContext context) .RuleFor(o => o.RestrictionUntil, f => f.Date.Future().ToUniversalTime().OrNull(f, .9f)) .RuleFor(o => o.OriginalName, f => f.Name.FullName()) .RuleFor(o => o.AlternateName, f => f.Person.UserName.OrNull(f, .1f)) - .RuleFor(o => o.QtLocationId, f => f.PickRandom(qtLocationnIds).OrNull(f, .1f)) - .RuleFor(o => o.QtLocation, _ => default!) - .RuleFor(o => o.QtElevationId, f => f.PickRandom(qtElevationIds).OrNull(f, .1f)) - .RuleFor(o => o.QtElevation, _ => default!) + .RuleFor(o => o.LocationPrecisionId, f => f.PickRandom(locationPrecisionIds).OrNull(f, .1f)) + .RuleFor(o => o.LocationPrecision, _ => default!) + .RuleFor(o => o.ElevationPrecisionId, f => f.PickRandom(elevationPrecisionIds).OrNull(f, .1f)) + .RuleFor(o => o.ElevationPrecision, _ => default!) .RuleFor(o => o.ProjectName, f => f.Company.CatchPhrase().OrNull(f, .1f)) .RuleFor(o => o.Country, f => f.Address.Country().OrNull(f, 0.01f)) .RuleFor(o => o.Canton, f => f.Address.State().OrNull(f, 0.01f)) @@ -175,7 +175,7 @@ public static void SeedData(this BdmsContext context) .RuleFor(o => o.TopBedrockTvd, f => f.Random.Double(0, 1000).OrNull(f, .05f)) .RuleFor(o => o.QtTopBedrockTvd, f => f.Random.Double(0, 2).OrNull(f, .05f)) .RuleFor(o => o.ReferenceElevation, f => f.Random.Double(0, 4500).OrNull(f, .05f)) - .RuleFor(o => o.QtReferenceElevationId, f => f.PickRandom(qtElevationIds).OrNull(f, .05f)) + .RuleFor(o => o.QtReferenceElevationId, f => f.PickRandom(elevationPrecisionIds).OrNull(f, .05f)) .RuleFor(o => o.QtReferenceElevation, _ => default!) .RuleFor(o => o.QtInclinationDirectionId, f => f.PickRandom(qtInclinationDirectionIds).OrNull(f, .05f)) .RuleFor(o => o.QtInclinationDirection, _ => default!) @@ -342,8 +342,8 @@ int GetStratigraphyOrCasingId(int currentLayerId, int startId) .RuleFor(o => o.Lithostratigraphy, _ => default!) .RuleFor(o => o.PlasticityId, f => f.PickRandom(plasticityIds).OrNull(f, .05f)) .RuleFor(o => o.Plasticity, _ => default!) - .RuleFor(o => o.QtDescriptionId, f => f.PickRandom(qtDescriptionIds).OrNull(f, .05f)) - .RuleFor(o => o.QtDescription, _ => default!) + .RuleFor(o => o.DescriptionQualityId, f => f.PickRandom(descriptionQualityIds).OrNull(f, .05f)) + .RuleFor(o => o.DescriptionQuality, _ => default!) .RuleFor(o => o.StratigraphyId, f => GetStratigraphyOrCasingId(layer_ids, 7_000_000)) .RuleFor(o => o.Stratigraphy, _ => default!) .RuleFor(o => o.IsStriae, f => f.Random.Bool()) @@ -402,8 +402,8 @@ int GetStratigraphyOrCasingId(int currentLayerId, int startId) .StrictMode(true) .RuleFor(o => o.FromDepth, f => (lithologicalDescription_ids % 10) * 10) .RuleFor(o => o.ToDepth, f => ((lithologicalDescription_ids % 10) + 1) * 10) - .RuleFor(o => o.QtDescriptionId, f => f.PickRandom(qtDescriptionIds).OrNull(f, .05f)) - .RuleFor(o => o.QtDescription, _ => default!) + .RuleFor(o => o.DescriptionQualityId, f => f.PickRandom(descriptionQualityIds).OrNull(f, .05f)) + .RuleFor(o => o.DescriptionQuality, _ => default!) .RuleFor(o => o.StratigraphyId, f => GetStratigraphyOrCasingId(lithologicalDescription_ids, 9_000_000)) .RuleFor(o => o.Stratigraphy, _ => default!) .RuleFor(o => o.Description, f => f.Random.Words(3).OrNull(f, .05f)) @@ -435,8 +435,8 @@ int GetStratigraphyOrCasingId(int currentLayerId, int startId) .StrictMode(true) .RuleFor(o => o.FromDepth, f => (faciesDescription_ids % 10) * 10) .RuleFor(o => o.ToDepth, f => ((faciesDescription_ids % 10) + 1) * 10) - .RuleFor(o => o.QtDescriptionId, f => f.PickRandom(qtDescriptionIds).OrNull(f, .05f)) - .RuleFor(o => o.QtDescription, _ => default!) + .RuleFor(o => o.DescriptionQualityId, f => f.PickRandom(descriptionQualityIds).OrNull(f, .05f)) + .RuleFor(o => o.DescriptionQuality, _ => default!) .RuleFor(o => o.StratigraphyId, f => GetStratigraphyOrCasingId(faciesDescription_ids, 10_000_000)) .RuleFor(o => o.Stratigraphy, _ => default!) .RuleFor(o => o.Description, f => f.Random.Words(3).OrNull(f, .05f)) @@ -533,7 +533,7 @@ int GetStratigraphyOrCasingId(int currentLayerId, int startId) .StrictMode(true) .RuleFor(o => o.LayerId, f => f.PickRandom(layerRange)) .RuleFor(o => o.CodelistId, f => f.PickRandom(uscsIds)) - .RuleFor(o => o.SchemaName, "mcla101") + .RuleFor(o => o.SchemaName, "uscs_type") .RuleFor(o => o.Layer, _ => default!) .RuleFor(o => o.Codelist, _ => default!); diff --git a/src/api/Controllers/FaciesDescriptionController.cs b/src/api/Controllers/FaciesDescriptionController.cs index 7108e121d..1b29c328f 100644 --- a/src/api/Controllers/FaciesDescriptionController.cs +++ b/src/api/Controllers/FaciesDescriptionController.cs @@ -24,7 +24,7 @@ public FaciesDescriptionController(BdmsContext context, ILogger> GetAsync([FromQuery] int? stratigraphyId = null) { var faciesDescriptions = Context.FaciesDescriptions - .Include(l => l.QtDescription) + .Include(l => l.DescriptionQuality) .AsNoTracking(); if (stratigraphyId != null) @@ -44,7 +44,7 @@ public async Task> GetAsync([FromQuery] int? stra public async Task> GetByIdAsync(int id) { var faciesDescription = await Context.FaciesDescriptions - .Include(l => l.QtDescription) + .Include(l => l.DescriptionQuality) .AsNoTracking() .SingleOrDefaultAsync(l => l.Id == id) .ConfigureAwait(false); diff --git a/src/api/Controllers/LayerController.cs b/src/api/Controllers/LayerController.cs index 56c748087..d24eb1292 100644 --- a/src/api/Controllers/LayerController.cs +++ b/src/api/Controllers/LayerController.cs @@ -127,7 +127,7 @@ public override async Task> CreateAsync(Layer entity) private IQueryable GetLayersWithIncludes() { return Context.Layers - .Include(l => l.QtDescription) + .Include(l => l.DescriptionQuality) .Include(l => l.Lithology) .Include(l => l.Plasticity) .Include(l => l.Consistance) diff --git a/src/api/Controllers/LithologicalDescriptionController.cs b/src/api/Controllers/LithologicalDescriptionController.cs index 4bf471be4..4e7c966d8 100644 --- a/src/api/Controllers/LithologicalDescriptionController.cs +++ b/src/api/Controllers/LithologicalDescriptionController.cs @@ -24,7 +24,7 @@ public LithologicalDescriptionController(BdmsContext context, ILogger> GetAsync([FromQuery] int? stratigraphyId = null) { var lithologicalDescriptions = Context.LithologicalDescriptions - .Include(l => l.QtDescription) + .Include(l => l.DescriptionQuality) .AsNoTracking(); if (stratigraphyId != null) @@ -44,7 +44,7 @@ public async Task> GetAsync([FromQuery] int public async Task> GetByIdAsync(int id) { var lithologicalDescription = await Context.LithologicalDescriptions - .Include(l => l.QtDescription) + .Include(l => l.DescriptionQuality) .AsNoTracking() .SingleOrDefaultAsync(l => l.Id == id) .ConfigureAwait(false); diff --git a/src/api/Controllers/UploadController.cs b/src/api/Controllers/UploadController.cs index c58f40e69..650c9e7d5 100644 --- a/src/api/Controllers/UploadController.cs +++ b/src/api/Controllers/UploadController.cs @@ -469,8 +469,8 @@ public CsvImportBoreholeMap() Map(m => m.RestrictionUntil).Optional(); Map(m => m.NationalInterest).Optional(); Map(m => m.AlternateName).Optional(); - Map(m => m.QtLocationId).Optional(); - Map(m => m.QtElevationId).Optional(); + Map(m => m.LocationPrecisionId).Optional(); + Map(m => m.ElevationPrecisionId).Optional(); Map(m => m.ProjectName).Optional(); Map(m => m.DrillingMethodId).Optional(); Map(m => m.DrillingDate).Optional(); @@ -573,7 +573,7 @@ public CsvImportLithologyMap() Map(m => m.Updated).Optional(); Map(m => m.IsUndefined).Optional(); Map(m => m.IsLast).Optional(); - Map(m => m.QtDescriptionId).Optional(); + Map(m => m.DescriptionQualityId).Optional(); Map(m => m.LithologyId).Optional(); Map(m => m.PlasticityId).Optional(); Map(m => m.ConsistanceId).Optional(); diff --git a/src/api/Controllers/UserController.cs b/src/api/Controllers/UserController.cs index 89fb9c9e8..7fb5cda25 100644 --- a/src/api/Controllers/UserController.cs +++ b/src/api/Controllers/UserController.cs @@ -68,7 +68,7 @@ public ActionResult ResetAllSettings() context.Database.ExecuteSqlRaw("UPDATE bdms.users SET settings_usr = '{{\"filter\": {{\"custom\": {{\"borehole_identifier\": true, \"project_name\": true, \"landuse\": true, \"alternate_name\": true, \"canton\": true, \"city\": true}}, \"restriction\": true, \"mapfilter\": true, \"restriction_until\": true, \"extended\": {{ \"original_name\": true, \"method\": true, \"status\": true}}, \"kind\": true, \"elevation_z\": true, \"length\": true, \"drilling_date\": true, \"zoom2selected\": true}}, \"boreholetable\": {{ \"orderby\": \"original_name\", \"direction\": \"ASC\"}}, \"eboreholetable\": {{ \"orderby\": \"creation\", \"direction\": \"DESC\"}}, \"map\": {{ \"explorer\": {{ }}, \"editor\": {{ }} }}, \"appearance\": {{ \"explorer\": 1}}}}' WHERE username = 'admin';"); // Reset codelist settings to initial state - context.Database.ExecuteSqlRaw("UPDATE bdms.codelist SET conf_cli = '{{\"text\": \"lithology_id_cli\", \"color\": \"lithostratigraphy\", \"title\": \"lithostratigraphy_id_cli\", \"fields\": {{\"color\": true, \"notes\": true, \"debris\": true, \"striae\": true, \"uscs_1\": true, \"uscs_2\": true, \"uscs_3\": true, \"geology\": true, \"cohesion\": true, \"humidity\": true, \"jointing\": true, \"lithology\": true, \"alteration\": true, \"plasticity\": true, \"soil_state\": true, \"compactness\": true, \"consistance\": true, \"description\": true, \"grain_shape\": true, \"lit_pet_deb\": true, \"grain_size_1\": true, \"grain_size_2\": true, \"tectonic_unit\": true, \"uscs_original\": true, \"qt_description\": true, \"grain_granularity\": true, \"lithostratigraphy\": true, \"organic_component\": true, \"chronostratigraphy\": true, \"further_properties\": true, \"uscs_determination\": true}}, \"textNS\": \"custom.lithology_top_bedrock\", \"colorNS\": \"custom.lithostratigraphy_top_bedrock\", \"pattern\": \"lithology\", \"titleNS\": \"custom.chro_str_top_bedrock\", \"patternNS\": \"custom.lithology_top_bedrock\"}}' WHERE conf_cli IS NOT NULL and schema_cli = 'layer_kind';"); + context.Database.ExecuteSqlRaw("UPDATE bdms.codelist SET conf_cli = '{{\"text\": \"lithology_id_cli\", \"color\": \"lithostratigraphy\", \"title\": \"lithostratigraphy_id_cli\", \"fields\": {{\"color\": true, \"notes\": true, \"debris\": true, \"striae\": true, \"uscs_1\": true, \"uscs_2\": true, \"uscs_3\": true, \"geology\": true, \"cohesion\": true, \"humidity\": true, \"jointing\": true, \"lithology\": true, \"alteration\": true, \"plasticity\": true, \"soil_state\": true, \"compactness\": true, \"consistance\": true, \"description\": true, \"grain_shape\": true, \"lit_pet_deb\": true, \"grain_size_1\": true, \"grain_size_2\": true, \"tectonic_unit\": true, \"uscs_original\": true, \"description_quality\": true, \"grain_granularity\": true, \"lithostratigraphy\": true, \"organic_component\": true, \"chronostratigraphy\": true, \"further_properties\": true, \"uscs_determination\": true}}, \"textNS\": \"custom.lithology_top_bedrock\", \"colorNS\": \"custom.lithostratigraphy_top_bedrock\", \"pattern\": \"lithology\", \"titleNS\": \"custom.chro_str_top_bedrock\", \"patternNS\": \"custom.lithology_top_bedrock\"}}' WHERE conf_cli IS NOT NULL and schema_cli = 'layer_kind';"); return Ok(); } diff --git a/src/api/Migrations/20240214101707_RenameCodelists.Designer.cs b/src/api/Migrations/20240214101707_RenameCodelists.Designer.cs new file mode 100644 index 000000000..204aefafe --- /dev/null +++ b/src/api/Migrations/20240214101707_RenameCodelists.Designer.cs @@ -0,0 +1,2794 @@ +// +using System; +using BDMS; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using NetTopologySuite.Geometries; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace BDMS.Migrations +{ + [DbContext(typeof(BdmsContext))] + [Migration("20240214101707_RenameCodelists")] + partial class RenameCodelists + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasDefaultSchema("bdms") + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "ltree"); + NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "postgis"); + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("BDMS.Models.Backfill", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CompletionId") + .HasColumnType("integer") + .HasColumnName("completion_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("from_depth"); + + b.Property("KindId") + .HasColumnType("integer") + .HasColumnName("kind_id"); + + b.Property("MaterialId") + .HasColumnType("integer") + .HasColumnName("material_id"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("to_depth"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CompletionId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("KindId"); + + b.HasIndex("MaterialId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("backfill", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Borehole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_bho"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AlternateName") + .HasColumnType("text") + .HasColumnName("alternate_name_bho"); + + b.Property("Canton") + .HasColumnType("text") + .HasColumnName("canton_bho"); + + b.Property("ChronostratigraphyId") + .HasColumnType("integer") + .HasColumnName("chronostrat_id_cli"); + + b.Property("Country") + .HasColumnType("text") + .HasColumnName("country_bho"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_bho"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("created_by_bho"); + + b.Property("CuttingsId") + .HasColumnType("integer") + .HasColumnName("cuttings_id_cli"); + + b.Property("DrillingDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("drilling_date_bho"); + + b.Property("DrillingDiameter") + .HasColumnType("double precision") + .HasColumnName("drilling_diameter_bho"); + + b.Property("DrillingMethodId") + .HasColumnType("integer") + .HasColumnName("drilling_method_id_cli"); + + b.Property("ElevationPrecisionId") + .HasColumnType("integer") + .HasColumnName("qt_elevation_id_cli"); + + b.Property("ElevationZ") + .HasColumnType("double precision") + .HasColumnName("elevation_z_bho"); + + b.Property("Geometry") + .HasColumnType("geometry") + .HasColumnName("geom_bho"); + + b.Property("HasGroundwater") + .HasColumnType("boolean") + .HasColumnName("groundwater_bho"); + + b.Property("HrsId") + .HasColumnType("integer") + .HasColumnName("hrs_id_cli"); + + b.Property("Inclination") + .HasColumnType("double precision") + .HasColumnName("inclination_bho"); + + b.Property("InclinationDirection") + .HasColumnType("double precision") + .HasColumnName("inclination_direction_bho"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("public_bho"); + + b.Property("KindId") + .HasColumnType("integer") + .HasColumnName("kind_id_cli"); + + b.Property("LithologyTopBedrockId") + .HasColumnType("integer") + .HasColumnName("lithology_top_bedrock_id_cli"); + + b.Property("LithostratigraphyId") + .HasColumnType("integer") + .HasColumnName("lithostrat_id_cli"); + + b.Property("LocationPrecisionId") + .HasColumnType("integer") + .HasColumnName("qt_location_id_cli"); + + b.Property("LocationX") + .HasColumnType("double precision") + .HasColumnName("location_x_bho"); + + b.Property("LocationXLV03") + .HasColumnType("double precision") + .HasColumnName("location_x_lv03_bho"); + + b.Property("LocationY") + .HasColumnType("double precision") + .HasColumnName("location_y_bho"); + + b.Property("LocationYLV03") + .HasColumnType("double precision") + .HasColumnName("location_y_lv03_bho"); + + b.Property("Locked") + .HasColumnType("timestamp with time zone") + .HasColumnName("locked_bho"); + + b.Property("LockedById") + .HasColumnType("integer") + .HasColumnName("locked_by_bho"); + + b.Property("Municipality") + .HasColumnType("text") + .HasColumnName("municipality_bho"); + + b.Property("NationalInterest") + .HasColumnType("boolean") + .HasColumnName("national_interest"); + + b.Property("OriginalName") + .HasColumnType("text") + .HasColumnName("original_name_bho"); + + b.Property("OriginalReferenceSystem") + .HasColumnType("integer") + .HasColumnName("srs_id_cli"); + + b.Property("ProjectName") + .HasColumnType("text") + .HasColumnName("project_name_bho"); + + b.Property("PurposeId") + .HasColumnType("integer") + .HasColumnName("purpose_id_cli"); + + b.Property("QtDepthId") + .HasColumnType("integer") + .HasColumnName("qt_depth_id_cli"); + + b.Property("QtInclinationDirectionId") + .HasColumnType("integer") + .HasColumnName("qt_inclination_direction_id_cli"); + + b.Property("QtReferenceElevationId") + .HasColumnType("integer") + .HasColumnName("qt_reference_elevation_id_cli"); + + b.Property("QtTopBedrock") + .HasColumnType("double precision") + .HasColumnName("qt_top_bedrock"); + + b.Property("QtTopBedrockTvd") + .HasColumnType("double precision") + .HasColumnName("qt_top_bedrock_tvd"); + + b.Property("QtTotalDepthTvdId") + .HasColumnType("integer") + .HasColumnName("qt_total_depth_tvd_id_cli"); + + b.Property("ReferenceElevation") + .HasColumnType("double precision") + .HasColumnName("reference_elevation_bho"); + + b.Property("ReferenceElevationTypeId") + .HasColumnType("integer") + .HasColumnName("reference_elevation_type_id_cli"); + + b.Property("Remarks") + .HasColumnType("text") + .HasColumnName("remarks_bho"); + + b.Property("RestrictionId") + .HasColumnType("integer") + .HasColumnName("restriction_id_cli"); + + b.Property("RestrictionUntil") + .HasColumnType("timestamp with time zone") + .HasColumnName("restriction_until_bho"); + + b.Property("SpudDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("spud_date_bho"); + + b.Property("StatusId") + .HasColumnType("integer") + .HasColumnName("status_id_cli"); + + b.Property("TopBedrock") + .HasColumnType("double precision") + .HasColumnName("top_bedrock_bho"); + + b.Property("TopBedrockTvd") + .HasColumnType("double precision") + .HasColumnName("top_bedrock_tvd_bho"); + + b.Property("TotalDepth") + .HasColumnType("double precision") + .HasColumnName("total_depth_bho"); + + b.Property("TotalDepthTvd") + .HasColumnType("double precision") + .HasColumnName("total_depth_tvd_bho"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("updated_bho"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updated_by_bho"); + + b.Property("WorkgroupId") + .HasColumnType("integer") + .HasColumnName("id_wgp_fk"); + + b.HasKey("Id"); + + b.HasIndex("ChronostratigraphyId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("CuttingsId"); + + b.HasIndex("DrillingMethodId"); + + b.HasIndex("ElevationPrecisionId"); + + b.HasIndex("HrsId"); + + b.HasIndex("KindId"); + + b.HasIndex("LithologyTopBedrockId"); + + b.HasIndex("LithostratigraphyId"); + + b.HasIndex("LocationPrecisionId"); + + b.HasIndex("LockedById"); + + b.HasIndex("PurposeId"); + + b.HasIndex("QtDepthId"); + + b.HasIndex("QtInclinationDirectionId"); + + b.HasIndex("QtReferenceElevationId"); + + b.HasIndex("QtTotalDepthTvdId"); + + b.HasIndex("ReferenceElevationTypeId"); + + b.HasIndex("RestrictionId"); + + b.HasIndex("StatusId"); + + b.HasIndex("UpdatedById"); + + b.HasIndex("WorkgroupId"); + + b.ToTable("borehole", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.BoreholeCodelist", b => + { + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("id_bho_fk"); + + b.Property("CodelistId") + .HasColumnType("integer") + .HasColumnName("id_cli_fk"); + + b.Property("SchemaName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("code_cli"); + + b.Property("Value") + .IsRequired() + .HasColumnType("text") + .HasColumnName("value_bco"); + + b.HasKey("BoreholeId", "CodelistId"); + + b.HasIndex("CodelistId"); + + b.ToTable("borehole_codelist", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.BoreholeFile", b => + { + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("id_bho_fk"); + + b.Property("FileId") + .HasColumnType("integer") + .HasColumnName("id_fil_fk"); + + b.Property("Attached") + .HasColumnType("timestamp with time zone") + .HasColumnName("attached_bfi"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_bfi"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("created_by_bfi"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description_bfi"); + + b.Property("Public") + .HasColumnType("boolean") + .HasColumnName("public_bfi"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update_bfi"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater_bfi"); + + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.HasKey("BoreholeId", "FileId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("FileId"); + + b.HasIndex("UpdatedById"); + + b.HasIndex("UserId"); + + b.ToTable("borehole_files", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Casing", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CompletionId") + .HasColumnType("integer") + .HasColumnName("completion_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("DateFinish") + .HasColumnType("date") + .HasColumnName("date_finish"); + + b.Property("DateStart") + .HasColumnType("date") + .HasColumnName("date_start"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("from_depth"); + + b.Property("InnerDiameter") + .HasColumnType("double precision") + .HasColumnName("inner_diameter"); + + b.Property("KindId") + .HasColumnType("integer") + .HasColumnName("kind_id"); + + b.Property("MaterialId") + .HasColumnType("integer") + .HasColumnName("material_id"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes"); + + b.Property("OuterDiameter") + .HasColumnType("double precision") + .HasColumnName("outer_diameter"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("to_depth"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CompletionId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("KindId"); + + b.HasIndex("MaterialId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("casing", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.ChronostratigraphyLayer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_chr"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChronostratigraphyId") + .HasColumnType("integer") + .HasColumnName("chronostratigraphy_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("is_last"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("id_sty_fk"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("ChronostratigraphyId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("chronostratigraphy", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Codelist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_cli"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Code") + .IsRequired() + .HasColumnType("text") + .HasColumnName("code_cli"); + + b.Property("Conf") + .HasColumnType("text") + .HasColumnName("conf_cli"); + + b.Property("De") + .HasColumnType("text") + .HasColumnName("text_cli_de"); + + b.Property("DescriptionDe") + .HasColumnType("text") + .HasColumnName("description_cli_de"); + + b.Property("DescriptionEn") + .IsRequired() + .HasColumnType("text") + .HasColumnName("description_cli_en"); + + b.Property("DescriptionFr") + .HasColumnType("text") + .HasColumnName("description_cli_fr"); + + b.Property("DescriptionIt") + .HasColumnType("text") + .HasColumnName("description_cli_it"); + + b.Property("DescriptionRo") + .HasColumnType("text") + .HasColumnName("description_cli_ro"); + + b.Property("En") + .IsRequired() + .HasColumnType("text") + .HasColumnName("text_cli_en"); + + b.Property("Fr") + .HasColumnType("text") + .HasColumnName("text_cli_fr"); + + b.Property("Geolcode") + .HasColumnType("integer") + .HasColumnName("geolcode"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("default_cli"); + + b.Property("It") + .HasColumnType("text") + .HasColumnName("text_cli_it"); + + b.Property("Order") + .HasColumnType("integer") + .HasColumnName("order_cli"); + + b.Property("Path") + .HasColumnType("ltree") + .HasColumnName("path_cli"); + + b.Property("Ro") + .HasColumnType("text") + .HasColumnName("text_cli_ro"); + + b.Property("Schema") + .HasColumnType("text") + .HasColumnName("schema_cli"); + + b.HasKey("Id"); + + b.ToTable("codelist", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Completion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AbandonDate") + .HasColumnType("date") + .HasColumnName("abandon_date"); + + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("borehole_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("IsPrimary") + .HasColumnType("boolean") + .HasColumnName("is_primary"); + + b.Property("KindId") + .HasColumnType("integer") + .HasColumnName("kind_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("BoreholeId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("KindId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("completion", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Config", b => + { + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name_cfg"); + + b.Property("Value") + .HasColumnType("text") + .HasColumnName("value_cfg"); + + b.HasKey("Name"); + + b.ToTable("config", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Content", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_cnt"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Creation") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_cnt"); + + b.Property("Expired") + .HasColumnType("timestamp with time zone") + .HasColumnName("expired_cnt"); + + b.Property("IsDraft") + .HasColumnType("boolean") + .HasColumnName("draft_cnt"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name_cnt"); + + b.Property("TextDe") + .HasColumnType("text") + .HasColumnName("text_cnt_de"); + + b.Property("TextEn") + .HasColumnType("text") + .HasColumnName("text_cnt_en"); + + b.Property("TextFr") + .HasColumnType("text") + .HasColumnName("text_cnt_fr"); + + b.Property("TextIt") + .HasColumnType("text") + .HasColumnName("text_cnt_it"); + + b.Property("TextRo") + .HasColumnType("text") + .HasColumnName("text_cnt_ro"); + + b.Property("TitelRo") + .HasColumnType("text") + .HasColumnName("title_cnt_ro"); + + b.Property("TitleDe") + .HasColumnType("text") + .HasColumnName("title_cnt_de"); + + b.Property("TitleEn") + .HasColumnType("text") + .HasColumnName("title_cnt_en"); + + b.Property("TitleFr") + .HasColumnType("text") + .HasColumnName("title_cnt_fr"); + + b.Property("TitleIt") + .HasColumnType("text") + .HasColumnName("title_cnt_it"); + + b.HasKey("Id"); + + b.ToTable("contents", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.FaciesDescription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_fac"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); + + b.Property("DescriptionQualityId") + .HasColumnType("integer") + .HasColumnName("qt_description_id"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("is_last"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("id_sty_fk"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("DescriptionQualityId"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("facies_description", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Feedback", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_feb"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_feb"); + + b.Property("IsFrw") + .HasColumnType("boolean") + .HasColumnName("frw_feb"); + + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message_feb"); + + b.Property("Tag") + .HasColumnType("text") + .HasColumnName("tag_feb"); + + b.Property("User") + .IsRequired() + .HasColumnType("text") + .HasColumnName("user_feb"); + + b.HasKey("Id"); + + b.ToTable("feedbacks", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.File", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_fil"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("uploaded_fil"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.Property("Hash") + .IsRequired() + .HasColumnType("text") + .HasColumnName("hash_fil"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name_fil"); + + b.Property("NameUuid") + .HasColumnType("text") + .HasColumnName("name_uuid_fil"); + + b.Property("Type") + .IsRequired() + .HasColumnType("text") + .HasColumnName("type_fil"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("updated_fil"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updated_by_fil"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("UpdatedById"); + + b.ToTable("files", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.HydrotestCodelist", b => + { + b.Property("HydrotestId") + .HasColumnType("integer") + .HasColumnName("id_ht_fk"); + + b.Property("CodelistId") + .HasColumnType("integer") + .HasColumnName("id_cli_fk"); + + b.HasKey("HydrotestId", "CodelistId"); + + b.HasIndex("CodelistId"); + + b.ToTable("hydrotest_codelist", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.HydrotestResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("HydrotestId") + .HasColumnType("integer") + .HasColumnName("hydrotest_id"); + + b.Property("MaxValue") + .HasColumnType("double precision") + .HasColumnName("max_value"); + + b.Property("MinValue") + .HasColumnType("double precision") + .HasColumnName("min_value"); + + b.Property("ParameterId") + .HasColumnType("integer") + .HasColumnName("parameter"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.Property("Value") + .HasColumnType("double precision") + .HasColumnName("value"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("HydrotestId"); + + b.HasIndex("ParameterId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("hydrotest_result", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Instrumentation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CasingId") + .HasColumnType("integer") + .HasColumnName("casing_id"); + + b.Property("CompletionId") + .HasColumnType("integer") + .HasColumnName("completion_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("from_depth"); + + b.Property("KindId") + .HasColumnType("integer") + .HasColumnName("kind_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes"); + + b.Property("StatusId") + .HasColumnType("integer") + .HasColumnName("status_id"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("to_depth"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CasingId"); + + b.HasIndex("CompletionId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("KindId"); + + b.HasIndex("StatusId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("instrumentation", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Layer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_lay"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AlterationId") + .HasColumnType("integer") + .HasColumnName("alteration_id_cli"); + + b.Property("CohesionId") + .HasColumnType("integer") + .HasColumnName("cohesion_id_cli"); + + b.Property("CompactnessId") + .HasColumnType("integer") + .HasColumnName("compactness_id_cli"); + + b.Property("ConsistanceId") + .HasColumnType("integer") + .HasColumnName("consistance_id_cli"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_lay"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator_lay"); + + b.Property("DescriptionQualityId") + .HasColumnType("integer") + .HasColumnName("qt_description_id_cli"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from_lay"); + + b.Property("GradationId") + .HasColumnType("integer") + .HasColumnName("gradation_id_cli"); + + b.Property("GrainSize1Id") + .HasColumnType("integer") + .HasColumnName("grain_size_1_id_cli"); + + b.Property("GrainSize2Id") + .HasColumnType("integer") + .HasColumnName("grain_size_2_id_cli"); + + b.Property("HumidityId") + .HasColumnType("integer") + .HasColumnName("humidity_id_cli"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("last_lay"); + + b.Property("IsStriae") + .HasColumnType("boolean") + .HasColumnName("striae_lay"); + + b.Property("IsUndefined") + .HasColumnType("boolean") + .HasColumnName("undefined_lay"); + + b.Property("LithologyId") + .HasColumnType("integer") + .HasColumnName("lithology_id_cli"); + + b.Property("LithologyTopBedrockId") + .HasColumnType("integer") + .HasColumnName("lithology_top_bedrock_id_cli"); + + b.Property("LithostratigraphyId") + .HasColumnType("integer") + .HasColumnName("lithostratigraphy_id_cli"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes_lay"); + + b.Property("OriginalLithology") + .HasColumnType("text") + .HasColumnName("original_lithology"); + + b.Property("OriginalUscs") + .HasColumnType("text") + .HasColumnName("uscs_original_lay"); + + b.Property("PlasticityId") + .HasColumnType("integer") + .HasColumnName("plasticity_id_cli"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("id_sty_fk"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to_lay"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update_lay"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater_lay"); + + b.Property("Uscs1Id") + .HasColumnType("integer") + .HasColumnName("uscs_1_id_cli"); + + b.Property("Uscs2Id") + .HasColumnType("integer") + .HasColumnName("uscs_2_id_cli"); + + b.Property("UscsDeterminationId") + .HasColumnType("integer") + .HasColumnName("uscs_determination_id_cli"); + + b.HasKey("Id"); + + b.HasIndex("AlterationId"); + + b.HasIndex("CohesionId"); + + b.HasIndex("CompactnessId"); + + b.HasIndex("ConsistanceId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("DescriptionQualityId"); + + b.HasIndex("GradationId"); + + b.HasIndex("GrainSize1Id"); + + b.HasIndex("GrainSize2Id"); + + b.HasIndex("HumidityId"); + + b.HasIndex("LithologyId"); + + b.HasIndex("LithologyTopBedrockId"); + + b.HasIndex("LithostratigraphyId"); + + b.HasIndex("PlasticityId"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.HasIndex("Uscs1Id"); + + b.HasIndex("Uscs2Id"); + + b.HasIndex("UscsDeterminationId"); + + b.ToTable("layer", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.LayerCodelist", b => + { + b.Property("LayerId") + .HasColumnType("integer") + .HasColumnName("id_lay_fk"); + + b.Property("CodelistId") + .HasColumnType("integer") + .HasColumnName("id_cli_fk"); + + b.Property("SchemaName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("code_cli"); + + b.HasKey("LayerId", "CodelistId"); + + b.HasIndex("CodelistId"); + + b.ToTable("layer_codelist", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.LithologicalDescription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_ldp"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); + + b.Property("DescriptionQualityId") + .HasColumnType("integer") + .HasColumnName("qt_description_id"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("is_last"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("id_sty_fk"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("DescriptionQualityId"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("lithological_description", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.LithostratigraphyLayer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("is_last"); + + b.Property("LithostratigraphyId") + .HasColumnType("integer") + .HasColumnName("lithostratigraphy_id"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("stratigraphy_id"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("LithostratigraphyId"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("lithostratigraphy", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Observation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("borehole_id"); + + b.Property("CasingId") + .HasColumnType("integer") + .HasColumnName("casing_id"); + + b.Property("Comment") + .HasColumnType("text") + .HasColumnName("comment"); + + b.Property("CompletionFinished") + .HasColumnType("boolean") + .HasColumnName("completion_finished"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("Duration") + .HasColumnType("double precision") + .HasColumnName("duration"); + + b.Property("EndTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("end_time"); + + b.Property("FromDepthM") + .HasColumnType("double precision") + .HasColumnName("from_depth_m"); + + b.Property("FromDepthMasl") + .HasColumnType("double precision") + .HasColumnName("from_depth_masl"); + + b.Property("ReliabilityId") + .HasColumnType("integer") + .HasColumnName("reliability"); + + b.Property("StartTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("start_time"); + + b.Property("ToDepthM") + .HasColumnType("double precision") + .HasColumnName("to_depth_m"); + + b.Property("ToDepthMasl") + .HasColumnType("double precision") + .HasColumnName("to_depth_masl"); + + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("observation_type"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("BoreholeId"); + + b.HasIndex("CasingId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("ReliabilityId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("observation", "bdms"); + + b.UseTptMappingStrategy(); + }); + + modelBuilder.Entity("BDMS.Models.Stratigraphy", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_sty"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("id_bho_fk"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_sty"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("author_sty"); + + b.Property("Date") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_sty"); + + b.Property("IsPrimary") + .HasColumnType("boolean") + .HasColumnName("primary_sty"); + + b.Property("KindId") + .HasColumnType("integer") + .HasColumnName("kind_id_cli"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name_sty"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes_sty"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update_sty"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater_sty"); + + b.HasKey("Id"); + + b.HasIndex("BoreholeId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("KindId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("stratigraphy", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Term", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_tes"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Creation") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_tes"); + + b.Property("Expiration") + .HasColumnType("timestamp with time zone") + .HasColumnName("expired_tes"); + + b.Property("IsDraft") + .HasColumnType("boolean") + .HasColumnName("draft_tes"); + + b.Property("TextDe") + .HasColumnType("text") + .HasColumnName("text_tes_de"); + + b.Property("TextEn") + .IsRequired() + .HasColumnType("text") + .HasColumnName("text_tes_en"); + + b.Property("TextFr") + .HasColumnType("text") + .HasColumnName("text_tes_fr"); + + b.Property("TextIt") + .HasColumnType("text") + .HasColumnName("text_tes_it"); + + b.Property("TextRo") + .HasColumnType("text") + .HasColumnName("text_tes_ro"); + + b.HasKey("Id"); + + b.ToTable("terms", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_usr"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DisabledAt") + .HasColumnType("timestamp with time zone") + .HasColumnName("disabled_usr"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("firstname"); + + b.Property("IsAdmin") + .HasColumnType("boolean") + .HasColumnName("admin_usr"); + + b.Property("IsViewer") + .HasColumnType("boolean") + .HasColumnName("viewer_usr"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("lastname"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("username"); + + b.Property("SubjectId") + .IsRequired() + .HasColumnType("text") + .HasColumnName("subject_id"); + + b.HasKey("Id"); + + b.ToTable("users", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.UserEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_evs"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_evs"); + + b.Property("Payload") + .HasColumnType("jsonb") + .HasColumnName("payload_evs"); + + b.Property("Topic") + .IsRequired() + .HasColumnType("text") + .HasColumnName("topic_evs"); + + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("events", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.UserWorkgroupRole", b => + { + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.Property("WorkgroupId") + .HasColumnType("integer") + .HasColumnName("id_wgp_fk"); + + b.Property("Role") + .HasColumnType("int") + .HasColumnName("id_rol_fk"); + + b.HasKey("UserId", "WorkgroupId", "Role"); + + b.ToTable("users_roles", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Workflow", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_wkf"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("id_bho_fk"); + + b.Property("Finished") + .HasColumnType("timestamp with time zone") + .HasColumnName("finished_wkf"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes_wkf"); + + b.Property("Role") + .HasColumnType("integer") + .HasColumnName("id_rol_fk"); + + b.Property("Started") + .HasColumnType("timestamp with time zone") + .HasColumnName("started_wkf"); + + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.HasKey("Id"); + + b.HasIndex("BoreholeId"); + + b.HasIndex("UserId"); + + b.ToTable("workflow", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Workgroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_wgp"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_wgp"); + + b.Property("Disabled") + .HasColumnType("timestamp with time zone") + .HasColumnName("disabled_wgp"); + + b.Property("IsSupplier") + .HasColumnType("boolean") + .HasColumnName("supplier_wgp"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name_wgp"); + + b.Property("Settings") + .HasColumnType("json") + .HasColumnName("settings_wgp"); + + b.HasKey("Id"); + + b.ToTable("workgroups", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.FieldMeasurement", b => + { + b.HasBaseType("BDMS.Models.Observation"); + + b.Property("ParameterId") + .HasColumnType("integer") + .HasColumnName("parameter"); + + b.Property("SampleTypeId") + .HasColumnType("integer") + .HasColumnName("sample_type"); + + b.Property("Value") + .HasColumnType("double precision") + .HasColumnName("value"); + + b.HasIndex("ParameterId"); + + b.HasIndex("SampleTypeId"); + + b.ToTable("field_measurement", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.GroundwaterLevelMeasurement", b => + { + b.HasBaseType("BDMS.Models.Observation"); + + b.Property("KindId") + .HasColumnType("integer") + .HasColumnName("kind"); + + b.Property("LevelM") + .HasColumnType("double precision") + .HasColumnName("level_m"); + + b.Property("LevelMasl") + .HasColumnType("double precision") + .HasColumnName("level_masl"); + + b.HasIndex("KindId"); + + b.ToTable("groundwater_level_measurement", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Hydrotest", b => + { + b.HasBaseType("BDMS.Models.Observation"); + + b.ToTable("hydrotest", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.WaterIngress", b => + { + b.HasBaseType("BDMS.Models.Observation"); + + b.Property("ConditionsId") + .HasColumnType("integer") + .HasColumnName("conditions"); + + b.Property("QuantityId") + .HasColumnType("integer") + .HasColumnName("quantity"); + + b.HasIndex("ConditionsId"); + + b.HasIndex("QuantityId"); + + b.ToTable("water_ingress", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Backfill", b => + { + b.HasOne("BDMS.Models.Completion", "Completion") + .WithMany("Backfills") + .HasForeignKey("CompletionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("KindId"); + + b.HasOne("BDMS.Models.Codelist", "Material") + .WithMany() + .HasForeignKey("MaterialId"); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Completion"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("Material"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Borehole", b => + { + b.HasOne("BDMS.Models.Codelist", "Chronostratigraphy") + .WithMany() + .HasForeignKey("ChronostratigraphyId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Cuttings") + .WithMany() + .HasForeignKey("CuttingsId"); + + b.HasOne("BDMS.Models.Codelist", "DrillingMethod") + .WithMany() + .HasForeignKey("DrillingMethodId"); + + b.HasOne("BDMS.Models.Codelist", "ElevationPrecision") + .WithMany() + .HasForeignKey("ElevationPrecisionId"); + + b.HasOne("BDMS.Models.Codelist", "Hrs") + .WithMany() + .HasForeignKey("HrsId"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("KindId"); + + b.HasOne("BDMS.Models.Codelist", "LithologyTopBedrock") + .WithMany() + .HasForeignKey("LithologyTopBedrockId"); + + b.HasOne("BDMS.Models.Codelist", "Lithostratigraphy") + .WithMany() + .HasForeignKey("LithostratigraphyId"); + + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + .WithMany() + .HasForeignKey("LocationPrecisionId"); + + b.HasOne("BDMS.Models.User", "LockedBy") + .WithMany() + .HasForeignKey("LockedById"); + + b.HasOne("BDMS.Models.Codelist", "Purpose") + .WithMany() + .HasForeignKey("PurposeId"); + + b.HasOne("BDMS.Models.Codelist", "QtDepth") + .WithMany() + .HasForeignKey("QtDepthId"); + + b.HasOne("BDMS.Models.Codelist", "QtInclinationDirection") + .WithMany() + .HasForeignKey("QtInclinationDirectionId"); + + b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") + .WithMany() + .HasForeignKey("QtReferenceElevationId"); + + b.HasOne("BDMS.Models.Codelist", "QtTotalDepthTvd") + .WithMany() + .HasForeignKey("QtTotalDepthTvdId"); + + b.HasOne("BDMS.Models.Codelist", "ReferenceElevationType") + .WithMany() + .HasForeignKey("ReferenceElevationTypeId"); + + b.HasOne("BDMS.Models.Codelist", "Restriction") + .WithMany() + .HasForeignKey("RestrictionId"); + + b.HasOne("BDMS.Models.Codelist", "Status") + .WithMany() + .HasForeignKey("StatusId"); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.HasOne("BDMS.Models.Workgroup", "Workgroup") + .WithMany("Boreholes") + .HasForeignKey("WorkgroupId"); + + b.Navigation("Chronostratigraphy"); + + b.Navigation("CreatedBy"); + + b.Navigation("Cuttings"); + + b.Navigation("DrillingMethod"); + + b.Navigation("ElevationPrecision"); + + b.Navigation("Hrs"); + + b.Navigation("Kind"); + + b.Navigation("LithologyTopBedrock"); + + b.Navigation("Lithostratigraphy"); + + b.Navigation("LocationPrecision"); + + b.Navigation("LockedBy"); + + b.Navigation("Purpose"); + + b.Navigation("QtDepth"); + + b.Navigation("QtInclinationDirection"); + + b.Navigation("QtReferenceElevation"); + + b.Navigation("QtTotalDepthTvd"); + + b.Navigation("ReferenceElevationType"); + + b.Navigation("Restriction"); + + b.Navigation("Status"); + + b.Navigation("UpdatedBy"); + + b.Navigation("Workgroup"); + }); + + modelBuilder.Entity("BDMS.Models.BoreholeCodelist", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("BoreholeCodelists") + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Codelist") + .WithMany("BoreholeCodelists") + .HasForeignKey("CodelistId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Borehole"); + + b.Navigation("Codelist"); + }); + + modelBuilder.Entity("BDMS.Models.BoreholeFile", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("BoreholeFiles") + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.File", "File") + .WithMany("BoreholeFiles") + .HasForeignKey("FileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.HasOne("BDMS.Models.User", "User") + .WithMany() + .HasForeignKey("UserId"); + + b.Navigation("Borehole"); + + b.Navigation("CreatedBy"); + + b.Navigation("File"); + + b.Navigation("UpdatedBy"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("BDMS.Models.Casing", b => + { + b.HasOne("BDMS.Models.Completion", "Completion") + .WithMany("Casings") + .HasForeignKey("CompletionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("KindId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Material") + .WithMany() + .HasForeignKey("MaterialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Completion"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("Material"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.ChronostratigraphyLayer", b => + { + b.HasOne("BDMS.Models.Codelist", "Chronostratigraphy") + .WithMany() + .HasForeignKey("ChronostratigraphyId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("ChronostratigraphyLayers") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Chronostratigraphy"); + + b.Navigation("CreatedBy"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Completion", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("Completions") + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("KindId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Borehole"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.FaciesDescription", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "DescriptionQuality") + .WithMany() + .HasForeignKey("DescriptionQualityId"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("FaciesDescriptions") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("DescriptionQuality"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.File", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.HydrotestCodelist", b => + { + b.HasOne("BDMS.Models.Codelist", "Codelist") + .WithMany("HydrotestCodelists") + .HasForeignKey("CodelistId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Hydrotest", "Hydrotest") + .WithMany("HydrotestCodelists") + .HasForeignKey("HydrotestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Codelist"); + + b.Navigation("Hydrotest"); + }); + + modelBuilder.Entity("BDMS.Models.HydrotestResult", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Hydrotest", "Hydrotest") + .WithMany("HydrotestResults") + .HasForeignKey("HydrotestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Parameter") + .WithMany() + .HasForeignKey("ParameterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("Hydrotest"); + + b.Navigation("Parameter"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Instrumentation", b => + { + b.HasOne("BDMS.Models.Casing", "Casing") + .WithMany("Instrumentations") + .HasForeignKey("CasingId"); + + b.HasOne("BDMS.Models.Completion", "Completion") + .WithMany("Instrumentations") + .HasForeignKey("CompletionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("KindId"); + + b.HasOne("BDMS.Models.Codelist", "Status") + .WithMany() + .HasForeignKey("StatusId"); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Casing"); + + b.Navigation("Completion"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("Status"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Layer", b => + { + b.HasOne("BDMS.Models.Codelist", "Alteration") + .WithMany() + .HasForeignKey("AlterationId"); + + b.HasOne("BDMS.Models.Codelist", "Cohesion") + .WithMany() + .HasForeignKey("CohesionId"); + + b.HasOne("BDMS.Models.Codelist", "Compactness") + .WithMany() + .HasForeignKey("CompactnessId"); + + b.HasOne("BDMS.Models.Codelist", "Consistance") + .WithMany() + .HasForeignKey("ConsistanceId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "DescriptionQuality") + .WithMany() + .HasForeignKey("DescriptionQualityId"); + + b.HasOne("BDMS.Models.Codelist", "Gradation") + .WithMany() + .HasForeignKey("GradationId"); + + b.HasOne("BDMS.Models.Codelist", "GrainSize1") + .WithMany() + .HasForeignKey("GrainSize1Id"); + + b.HasOne("BDMS.Models.Codelist", "GrainSize2") + .WithMany() + .HasForeignKey("GrainSize2Id"); + + b.HasOne("BDMS.Models.Codelist", "Humidity") + .WithMany() + .HasForeignKey("HumidityId"); + + b.HasOne("BDMS.Models.Codelist", "Lithology") + .WithMany() + .HasForeignKey("LithologyId"); + + b.HasOne("BDMS.Models.Codelist", "LithologyTopBedrock") + .WithMany() + .HasForeignKey("LithologyTopBedrockId"); + + b.HasOne("BDMS.Models.Codelist", "Lithostratigraphy") + .WithMany() + .HasForeignKey("LithostratigraphyId"); + + b.HasOne("BDMS.Models.Codelist", "Plasticity") + .WithMany() + .HasForeignKey("PlasticityId"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("Layers") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.HasOne("BDMS.Models.Codelist", "Uscs1") + .WithMany() + .HasForeignKey("Uscs1Id"); + + b.HasOne("BDMS.Models.Codelist", "Uscs2") + .WithMany() + .HasForeignKey("Uscs2Id"); + + b.HasOne("BDMS.Models.Codelist", "UscsDetermination") + .WithMany() + .HasForeignKey("UscsDeterminationId"); + + b.Navigation("Alteration"); + + b.Navigation("Cohesion"); + + b.Navigation("Compactness"); + + b.Navigation("Consistance"); + + b.Navigation("CreatedBy"); + + b.Navigation("DescriptionQuality"); + + b.Navigation("Gradation"); + + b.Navigation("GrainSize1"); + + b.Navigation("GrainSize2"); + + b.Navigation("Humidity"); + + b.Navigation("Lithology"); + + b.Navigation("LithologyTopBedrock"); + + b.Navigation("Lithostratigraphy"); + + b.Navigation("Plasticity"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + + b.Navigation("Uscs1"); + + b.Navigation("Uscs2"); + + b.Navigation("UscsDetermination"); + }); + + modelBuilder.Entity("BDMS.Models.LayerCodelist", b => + { + b.HasOne("BDMS.Models.Codelist", "Codelist") + .WithMany("LayerCodelists") + .HasForeignKey("CodelistId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Layer", "Layer") + .WithMany("LayerCodelists") + .HasForeignKey("LayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Codelist"); + + b.Navigation("Layer"); + }); + + modelBuilder.Entity("BDMS.Models.LithologicalDescription", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "DescriptionQuality") + .WithMany() + .HasForeignKey("DescriptionQualityId"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("LithologicalDescriptions") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("DescriptionQuality"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.LithostratigraphyLayer", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Lithostratigraphy") + .WithMany() + .HasForeignKey("LithostratigraphyId"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("LithostratigraphyLayers") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("Lithostratigraphy"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Observation", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany() + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Casing", "Casing") + .WithMany("Observations") + .HasForeignKey("CasingId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Reliability") + .WithMany() + .HasForeignKey("ReliabilityId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Borehole"); + + b.Navigation("Casing"); + + b.Navigation("CreatedBy"); + + b.Navigation("Reliability"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Stratigraphy", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("Stratigraphies") + .HasForeignKey("BoreholeId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("KindId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Borehole"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.UserEvent", b => + { + b.HasOne("BDMS.Models.User", "User") + .WithMany("BoringEvents") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("BDMS.Models.UserWorkgroupRole", b => + { + b.HasOne("BDMS.Models.User", null) + .WithMany("WorkgroupRoles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("BDMS.Models.Workflow", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("Workflows") + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Borehole"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("BDMS.Models.FieldMeasurement", b => + { + b.HasOne("BDMS.Models.Observation", null) + .WithOne() + .HasForeignKey("BDMS.Models.FieldMeasurement", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Parameter") + .WithMany() + .HasForeignKey("ParameterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "SampleType") + .WithMany() + .HasForeignKey("SampleTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Parameter"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("BDMS.Models.GroundwaterLevelMeasurement", b => + { + b.HasOne("BDMS.Models.Observation", null) + .WithOne() + .HasForeignKey("BDMS.Models.GroundwaterLevelMeasurement", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("KindId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Kind"); + }); + + modelBuilder.Entity("BDMS.Models.Hydrotest", b => + { + b.HasOne("BDMS.Models.Observation", null) + .WithOne() + .HasForeignKey("BDMS.Models.Hydrotest", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("BDMS.Models.WaterIngress", b => + { + b.HasOne("BDMS.Models.Codelist", "Conditions") + .WithMany() + .HasForeignKey("ConditionsId"); + + b.HasOne("BDMS.Models.Observation", null) + .WithOne() + .HasForeignKey("BDMS.Models.WaterIngress", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Quantity") + .WithMany() + .HasForeignKey("QuantityId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Conditions"); + + b.Navigation("Quantity"); + }); + + modelBuilder.Entity("BDMS.Models.Borehole", b => + { + b.Navigation("BoreholeCodelists"); + + b.Navigation("BoreholeFiles"); + + b.Navigation("Completions"); + + b.Navigation("Stratigraphies"); + + b.Navigation("Workflows"); + }); + + modelBuilder.Entity("BDMS.Models.Casing", b => + { + b.Navigation("Instrumentations"); + + b.Navigation("Observations"); + }); + + modelBuilder.Entity("BDMS.Models.Codelist", b => + { + b.Navigation("BoreholeCodelists"); + + b.Navigation("HydrotestCodelists"); + + b.Navigation("LayerCodelists"); + }); + + modelBuilder.Entity("BDMS.Models.Completion", b => + { + b.Navigation("Backfills"); + + b.Navigation("Casings"); + + b.Navigation("Instrumentations"); + }); + + modelBuilder.Entity("BDMS.Models.File", b => + { + b.Navigation("BoreholeFiles"); + }); + + modelBuilder.Entity("BDMS.Models.Layer", b => + { + b.Navigation("LayerCodelists"); + }); + + modelBuilder.Entity("BDMS.Models.Stratigraphy", b => + { + b.Navigation("ChronostratigraphyLayers"); + + b.Navigation("FaciesDescriptions"); + + b.Navigation("Layers"); + + b.Navigation("LithologicalDescriptions"); + + b.Navigation("LithostratigraphyLayers"); + }); + + modelBuilder.Entity("BDMS.Models.User", b => + { + b.Navigation("BoringEvents"); + + b.Navigation("WorkgroupRoles"); + }); + + modelBuilder.Entity("BDMS.Models.Workgroup", b => + { + b.Navigation("Boreholes"); + }); + + modelBuilder.Entity("BDMS.Models.Hydrotest", b => + { + b.Navigation("HydrotestCodelists"); + + b.Navigation("HydrotestResults"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/api/Migrations/20240214101707_RenameCodelists.cs b/src/api/Migrations/20240214101707_RenameCodelists.cs new file mode 100644 index 000000000..7fb3a948e --- /dev/null +++ b/src/api/Migrations/20240214101707_RenameCodelists.cs @@ -0,0 +1,41 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BDMS.Migrations; + +/// +public partial class RenameCodelists : Migration +{ + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.Sql(@" + UPDATE bdms.codelist SET schema_cli = 'casing_type' WHERE schema_cli = 'casi200'; + UPDATE bdms.codelist SET schema_cli = 'casing_material' WHERE schema_cli = 'casi201'; + UPDATE bdms.codelist SET schema_cli = 'backfill_type' WHERE schema_cli = 'fill100'; + UPDATE bdms.codelist SET schema_cli = 'backfill_material' WHERE schema_cli = 'fill200'; + UPDATE bdms.codelist SET schema_cli = 'location_precision' WHERE schema_cli = 'qt_location'; + UPDATE bdms.codelist SET schema_cli = 'elevation_precision' WHERE schema_cli = 'qt_elevation'; + UPDATE bdms.codelist SET schema_cli = 'reference_elevation_type' WHERE schema_cli = 'ibor117'; + UPDATE bdms.codelist SET schema_cli = 'instrument_type' WHERE schema_cli = 'inst100'; + UPDATE bdms.codelist SET schema_cli = 'instrument_status' WHERE schema_cli = 'inst101'; + UPDATE bdms.codelist SET schema_cli = 'uscs_type' WHERE schema_cli = 'mcla101'; + UPDATE bdms.codelist SET schema_cli = 'uscs_determination' WHERE schema_cli = 'mcla104'; + UPDATE bdms.codelist SET schema_cli = 'debris' WHERE schema_cli = 'mcla107'; + UPDATE bdms.codelist SET schema_cli = 'plasticity' WHERE schema_cli = 'mlpr101'; + UPDATE bdms.codelist SET schema_cli = 'compactness' WHERE schema_cli = 'mlpr102'; + UPDATE bdms.codelist SET schema_cli = 'consistency' WHERE schema_cli = 'mlpr103'; + UPDATE bdms.codelist SET schema_cli = 'humidity' WHERE schema_cli = 'mlpr105'; + UPDATE bdms.codelist SET schema_cli = 'alteration' WHERE schema_cli = 'mlpr106'; + UPDATE bdms.codelist SET schema_cli = 'organic_components' WHERE schema_cli = 'mlpr108'; + UPDATE bdms.codelist SET schema_cli = 'grain_size' WHERE schema_cli = 'mlpr109'; + UPDATE bdms.codelist SET schema_cli = 'grain_shape' WHERE schema_cli = 'mlpr110'; + UPDATE bdms.codelist SET schema_cli = 'description_quality' WHERE schema_cli = 'qt_description'; + UPDATE bdms.codelist SET schema_cli = 'colour' WHERE schema_cli = 'mlpr112'; + UPDATE bdms.codelist SET schema_cli = 'grain_angularity' WHERE schema_cli = 'mlpr115'; + UPDATE bdms.codelist SET schema_cli = 'cohesion' WHERE schema_cli = 'mlpr116'; + DELETE FROM bdms.codelist WHERE schema_cli = 'casi100'; + DELETE FROM bdms.codelist WHERE schema_cli = 'casi101'; "); + } +} diff --git a/src/api/Migrations/BdmsContextModelSnapshot.cs b/src/api/Migrations/BdmsContextModelSnapshot.cs index b0b98065a..fb251c32a 100644 --- a/src/api/Migrations/BdmsContextModelSnapshot.cs +++ b/src/api/Migrations/BdmsContextModelSnapshot.cs @@ -139,6 +139,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("drilling_method_id_cli"); + b.Property("ElevationPrecisionId") + .HasColumnType("integer") + .HasColumnName("qt_elevation_id_cli"); + b.Property("ElevationZ") .HasColumnType("double precision") .HasColumnName("elevation_z_bho"); @@ -179,6 +183,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("lithostrat_id_cli"); + b.Property("LocationPrecisionId") + .HasColumnType("integer") + .HasColumnName("qt_location_id_cli"); + b.Property("LocationX") .HasColumnType("double precision") .HasColumnName("location_x_bho"); @@ -231,18 +239,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_depth_id_cli"); - b.Property("QtElevationId") - .HasColumnType("integer") - .HasColumnName("qt_elevation_id_cli"); - b.Property("QtInclinationDirectionId") .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") - .HasColumnType("integer") - .HasColumnName("qt_location_id_cli"); - b.Property("QtReferenceElevationId") .HasColumnType("integer") .HasColumnName("qt_reference_elevation_id_cli"); @@ -325,6 +325,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("DrillingMethodId"); + b.HasIndex("ElevationPrecisionId"); + b.HasIndex("HrsId"); b.HasIndex("KindId"); @@ -333,18 +335,16 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("LithostratigraphyId"); + b.HasIndex("LocationPrecisionId"); + b.HasIndex("LockedById"); b.HasIndex("PurposeId"); b.HasIndex("QtDepthId"); - b.HasIndex("QtElevationId"); - b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); - b.HasIndex("QtReferenceElevationId"); b.HasIndex("QtTotalDepthTvdId"); @@ -841,6 +841,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("text") .HasColumnName("description"); + b.Property("DescriptionQualityId") + .HasColumnType("integer") + .HasColumnName("qt_description_id"); + b.Property("FromDepth") .HasColumnType("double precision") .HasColumnName("depth_from"); @@ -849,10 +853,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("boolean") .HasColumnName("is_last"); - b.Property("QtDescriptionId") - .HasColumnType("integer") - .HasColumnName("qt_description_id"); - b.Property("StratigraphyId") .HasColumnType("integer") .HasColumnName("id_sty_fk"); @@ -873,7 +873,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("CreatedById"); - b.HasIndex("QtDescriptionId"); + b.HasIndex("DescriptionQualityId"); b.HasIndex("StratigraphyId"); @@ -1152,6 +1152,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("creator_lay"); + b.Property("DescriptionQualityId") + .HasColumnType("integer") + .HasColumnName("qt_description_id_cli"); + b.Property("FromDepth") .HasColumnType("double precision") .HasColumnName("depth_from_lay"); @@ -1212,10 +1216,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("plasticity_id_cli"); - b.Property("QtDescriptionId") - .HasColumnType("integer") - .HasColumnName("qt_description_id_cli"); - b.Property("StratigraphyId") .HasColumnType("integer") .HasColumnName("id_sty_fk"); @@ -1256,6 +1256,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("CreatedById"); + b.HasIndex("DescriptionQualityId"); + b.HasIndex("GradationId"); b.HasIndex("GrainSize1Id"); @@ -1272,8 +1274,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("PlasticityId"); - b.HasIndex("QtDescriptionId"); - b.HasIndex("StratigraphyId"); b.HasIndex("UpdatedById"); @@ -1330,6 +1330,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("text") .HasColumnName("description"); + b.Property("DescriptionQualityId") + .HasColumnType("integer") + .HasColumnName("qt_description_id"); + b.Property("FromDepth") .HasColumnType("double precision") .HasColumnName("depth_from"); @@ -1338,10 +1342,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("boolean") .HasColumnName("is_last"); - b.Property("QtDescriptionId") - .HasColumnType("integer") - .HasColumnName("qt_description_id"); - b.Property("StratigraphyId") .HasColumnType("integer") .HasColumnName("id_sty_fk"); @@ -1362,7 +1362,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("CreatedById"); - b.HasIndex("QtDescriptionId"); + b.HasIndex("DescriptionQualityId"); b.HasIndex("StratigraphyId"); @@ -1930,6 +1930,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("DrillingMethodId"); + b.HasOne("BDMS.Models.Codelist", "ElevationPrecision") + .WithMany() + .HasForeignKey("ElevationPrecisionId"); + b.HasOne("BDMS.Models.Codelist", "Hrs") .WithMany() .HasForeignKey("HrsId"); @@ -1946,6 +1950,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("LithostratigraphyId"); + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + .WithMany() + .HasForeignKey("LocationPrecisionId"); + b.HasOne("BDMS.Models.User", "LockedBy") .WithMany() .HasForeignKey("LockedById"); @@ -1958,18 +1966,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtDepthId"); - b.HasOne("BDMS.Models.Codelist", "QtElevation") - .WithMany() - .HasForeignKey("QtElevationId"); - b.HasOne("BDMS.Models.Codelist", "QtInclinationDirection") .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") - .WithMany() - .HasForeignKey("QtLocationId"); - b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() .HasForeignKey("QtReferenceElevationId"); @@ -2006,6 +2006,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("DrillingMethod"); + b.Navigation("ElevationPrecision"); + b.Navigation("Hrs"); b.Navigation("Kind"); @@ -2014,18 +2016,16 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("Lithostratigraphy"); + b.Navigation("LocationPrecision"); + b.Navigation("LockedBy"); b.Navigation("Purpose"); b.Navigation("QtDepth"); - b.Navigation("QtElevation"); - b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); - b.Navigation("QtReferenceElevation"); b.Navigation("QtTotalDepthTvd"); @@ -2202,9 +2202,9 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("CreatedById"); - b.HasOne("BDMS.Models.Codelist", "QtDescription") + b.HasOne("BDMS.Models.Codelist", "DescriptionQuality") .WithMany() - .HasForeignKey("QtDescriptionId"); + .HasForeignKey("DescriptionQualityId"); b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") .WithMany("FaciesDescriptions") @@ -2218,7 +2218,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("CreatedBy"); - b.Navigation("QtDescription"); + b.Navigation("DescriptionQuality"); b.Navigation("Stratigraphy"); @@ -2353,6 +2353,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("CreatedById"); + b.HasOne("BDMS.Models.Codelist", "DescriptionQuality") + .WithMany() + .HasForeignKey("DescriptionQualityId"); + b.HasOne("BDMS.Models.Codelist", "Gradation") .WithMany() .HasForeignKey("GradationId"); @@ -2385,10 +2389,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("PlasticityId"); - b.HasOne("BDMS.Models.Codelist", "QtDescription") - .WithMany() - .HasForeignKey("QtDescriptionId"); - b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") .WithMany("Layers") .HasForeignKey("StratigraphyId") @@ -2421,6 +2421,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("CreatedBy"); + b.Navigation("DescriptionQuality"); + b.Navigation("Gradation"); b.Navigation("GrainSize1"); @@ -2437,8 +2439,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("Plasticity"); - b.Navigation("QtDescription"); - b.Navigation("Stratigraphy"); b.Navigation("UpdatedBy"); @@ -2475,9 +2475,9 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("CreatedById"); - b.HasOne("BDMS.Models.Codelist", "QtDescription") + b.HasOne("BDMS.Models.Codelist", "DescriptionQuality") .WithMany() - .HasForeignKey("QtDescriptionId"); + .HasForeignKey("DescriptionQualityId"); b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") .WithMany("LithologicalDescriptions") @@ -2491,7 +2491,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("CreatedBy"); - b.Navigation("QtDescription"); + b.Navigation("DescriptionQuality"); b.Navigation("Stratigraphy"); diff --git a/src/api/Models/Borehole.cs b/src/api/Models/Borehole.cs index f327b4095..c5fecc2b2 100644 --- a/src/api/Models/Borehole.cs +++ b/src/api/Models/Borehole.cs @@ -163,22 +163,22 @@ public class Borehole : IChangeTracking, IIdentifyable public string? AlternateName { get; set; } /// - /// Gets or sets the 's QTLocationId. + /// Gets or sets the 's location precision. /// [Column("qt_location_id_cli")] - public int? QtLocationId { get; set; } - public Codelist? QtLocation { get; set; } + public int? LocationPrecisionId { get; set; } + public Codelist? LocationPrecision { get; set; } /// - /// Gets or sets the 's QTElevationId. + /// Gets or sets the 's elevation precision id. /// [Column("qt_elevation_id_cli")] - public int? QtElevationId { get; set; } + public int? ElevationPrecisionId { get; set; } /// - /// Gets or sets the 's QTElevation. + /// Gets or sets the 's elevation precision. /// - public Codelist? QtElevation { get; set; } + public Codelist? ElevationPrecision { get; set; } /// /// Gets or sets the 's project name. diff --git a/src/api/Models/CompletionSchemas.cs b/src/api/Models/CompletionSchemas.cs index ac8f5b0d4..a194ba57f 100644 --- a/src/api/Models/CompletionSchemas.cs +++ b/src/api/Models/CompletionSchemas.cs @@ -6,10 +6,10 @@ public static class CompletionSchemas { public const string CompletionKindSchema = "completion_kind"; - public const string InstrumentationKindSchema = "inst100"; - public const string InstrumentationStatusSchema = "inst101"; - public const string BackfillKindSchema = "fill100"; - public const string BackfillMaterialSchema = "fill200"; - public const string CasingKindSchema = "casi200"; - public const string CasingMaterialSchema = "casi201"; + public const string InstrumentationTypeSchema = "instrument_type"; + public const string InstrumentationStatusSchema = "instrument_status"; + public const string BackfillTypeSchema = "backfill_type"; + public const string BackfillMaterialSchema = "backfill_material"; + public const string CasingTypeSchema = "casing_type"; + public const string CasingMaterialSchema = "casing_material"; } diff --git a/src/api/Models/FaciesDescription.cs b/src/api/Models/FaciesDescription.cs index 8921ca861..eedf86a65 100644 --- a/src/api/Models/FaciesDescription.cs +++ b/src/api/Models/FaciesDescription.cs @@ -53,12 +53,12 @@ public class FaciesDescription : ILayerDescription, IChangeTracking, IIdentifyab /// Gets or sets the id of the quality of the 's description. /// [Column("qt_description_id")] - public int? QtDescriptionId { get; set; } + public int? DescriptionQualityId { get; set; } /// /// Gets or sets the quality of the 's description. /// - public Codelist? QtDescription { get; set; } + public Codelist? DescriptionQuality { get; set; } /// [Column("depth_from")] diff --git a/src/api/Models/Layer.cs b/src/api/Models/Layer.cs index 8a3a8d225..a94e1cd94 100644 --- a/src/api/Models/Layer.cs +++ b/src/api/Models/Layer.cs @@ -65,12 +65,12 @@ public class Layer : ILayerDescription, IChangeTracking, IIdentifyable /// Gets or sets the id of the quality of the 's description. /// [Column("qt_description_id_cli")] - public int? QtDescriptionId { get; set; } + public int? DescriptionQualityId { get; set; } /// /// Gets or sets the quality of the 's description. /// - public Codelist? QtDescription { get; set; } + public Codelist? DescriptionQuality { get; set; } /// /// Gets or sets the id of the 's lithology. @@ -161,24 +161,24 @@ public class Layer : ILayerDescription, IChangeTracking, IIdentifyable public Codelist? Cohesion { get; set; } /// - /// Gets or sets the id of the 's Uscs 1. + /// Gets or sets the id of the 's uscs type id 1. /// [Column("uscs_1_id_cli")] public int? Uscs1Id { get; set; } /// - /// Gets or sets the 's Uscs 1. + /// Gets or sets the 's uscs type 1. /// public Codelist? Uscs1 { get; set; } /// - /// Gets or sets the id of the 's Uscs 2. + /// Gets or sets the id of the 's uscs type id 2. /// [Column("uscs_2_id_cli")] public int? Uscs2Id { get; set; } /// - /// Gets or sets the 's Uscs 2. + /// Gets or sets the 's uscs type 2. /// public Codelist? Uscs2 { get; set; } diff --git a/src/api/Models/LithologicalDescription.cs b/src/api/Models/LithologicalDescription.cs index a9a8ffe56..d803d1ff9 100644 --- a/src/api/Models/LithologicalDescription.cs +++ b/src/api/Models/LithologicalDescription.cs @@ -53,12 +53,12 @@ public class LithologicalDescription : ILayerDescription, IChangeTracking, IIden /// Gets or sets the id of the quality of the 's description. /// [Column("qt_description_id")] - public int? QtDescriptionId { get; set; } + public int? DescriptionQualityId { get; set; } /// /// Gets or sets the quality of the 's description. /// - public Codelist? QtDescription { get; set; } + public Codelist? DescriptionQuality { get; set; } /// [Column("depth_from")] diff --git a/src/client/cypress/e2e/codeList.cy.js b/src/client/cypress/e2e/codeList.cy.js index efe91faa3..308b76511 100644 --- a/src/client/cypress/e2e/codeList.cy.js +++ b/src/client/cypress/e2e/codeList.cy.js @@ -26,10 +26,10 @@ describe("Codelist translations tests", () => { .find("button") .click(); - cy.contains("p", "mlpr102").click(); - cy.get("div[name=mlpr102]").children().should("have.length", 6); - cy.contains("p", "mcla107").click(); - cy.get("div[name=mcla107]").children().should("have.length", 6); + cy.contains("p", "compactness").click(); + cy.get("div[name=compactness]").children().should("have.length", 6); + cy.contains("p", "debris").click(); + cy.get("div[name=debris]").children().should("have.length", 6); // assure input fields are empty cy.get("input[name=german-input]").should("have.value", ""); diff --git a/src/client/cypress/fixtures/import/data-sets/invalid-lithology/lithology-single-not-valid.csv b/src/client/cypress/fixtures/import/data-sets/invalid-lithology/lithology-single-not-valid.csv index 92786c949..629a807ea 100644 --- a/src/client/cypress/fixtures/import/data-sets/invalid-lithology/lithology-single-not-valid.csv +++ b/src/client/cypress/fixtures/import/data-sets/invalid-lithology/lithology-single-not-valid.csv @@ -1,2 +1,2 @@ -import_id;strati_import_id;strati_date;strati_name;from_depth;to_depth;is_last;qt_description_id;lithology_id;lithostratigraphy_id;original_uscs;uscs_determination_id;uscs_1_id;grain_size_1_id;uscs_2_id;grain_size_2_id;is_striae;consistance_id;plasticity_id;compactness_id;cohesion_id;humidity_id;alteration_id;notes;original_lithology;uscs_3_ids;grain_shape_ids;grain_granularity_ids;organic_component_ids;debris_ids;color_ids; +import_id;strati_import_id;strati_date;strati_name;from_depth;to_depth;is_last;description_quality_id;lithology_id;lithostratigraphy_id;original_uscs;uscs_determination_id;uscs_1_id;grain_size_1_id;uscs_2_id;grain_size_2_id;is_striae;consistance_id;plasticity_id;compactness_id;cohesion_id;humidity_id;alteration_id;notes;original_lithology;uscs_3_ids;grain_shape_ids;grain_granularity_ids;organic_component_ids;debris_ids;color_ids; 123456;1001;2021-08-06 00:36:21.991827+00;Bennett;0.125;;false;9001;15104448;15202034;Granite;23107001;23101005;21101001;23101008;21103008;false;21103003;21101001;21102007;21116005;21105002;21106004;instruction set Dynamic backing up Lock;trace back Peso;23101001,23101004,23101005;21110002,21110005;21115001,21115004;21108002,21108004,21108005;9100,9102;21112001,21112004; diff --git a/src/client/cypress/fixtures/import/lithology-single-valid.csv b/src/client/cypress/fixtures/import/lithology-single-valid.csv index 17d676764..4ddc34728 100644 --- a/src/client/cypress/fixtures/import/lithology-single-valid.csv +++ b/src/client/cypress/fixtures/import/lithology-single-valid.csv @@ -1,2 +1,2 @@ -import_id;strati_import_id;strati_date;strati_name;from_depth;to_depth;is_last;qt_description_id;lithology_id;lithostratigraphy_id;original_uscs;uscs_determination_id;uscs_1_id;grain_size_1_id;uscs_2_id;grain_size_2_id;is_striae;consistance_id;plasticity_id;compactness_id;cohesion_id;humidity_id;alteration_id;notes;original_lithology;uscs_3_ids;grain_shape_ids;grain_granularity_ids;organic_component_ids;debris_ids;color_ids; +import_id;strati_import_id;strati_date;strati_name;from_depth;to_depth;is_last;description_quality_id;lithology_id;lithostratigraphy_id;original_uscs;uscs_determination_id;uscs_1_id;grain_size_1_id;uscs_2_id;grain_size_2_id;is_striae;consistance_id;plasticity_id;compactness_id;cohesion_id;humidity_id;alteration_id;notes;original_lithology;uscs_3_ids;grain_shape_ids;grain_granularity_ids;organic_component_ids;debris_ids;color_ids; 344;1001;2021-08-06 00:36:21.991827+00;Bennett;0.125;100;false;9001;15104448;15202034;Granite;23107001;23101005;21101001;23101008;21103008;false;21103003;21101001;21102007;21116005;21105002;21106004;instruction set Dynamic backing up Lock;trace back Peso;23101001,23101004,23101005;21110002,21110005;21115001,21115004;21108002,21108004,21108005;9100,9102;21112001,21112004; diff --git a/src/client/docs/import.md b/src/client/docs/import.md index 287960376..cc7da72ac 100644 --- a/src/client/docs/import.md +++ b/src/client/docs/import.md @@ -120,7 +120,7 @@ Die zu importierenden Daten müssen gemäss obigen Anforderungen im CSV-Format v | from_depth | Zahl | Ja | Von Tiefe der Schicht | | to_depth | Zahl | Ja | Bis Tiefe der Schicht | | is_last | True/False | Nein | Ist die Schicht die letzte in der Stratigraphie? | -| qt_description_id | ID (Codeliste) | Nein | Qualität der Beschreibung | +| description_quality_id | ID (Codeliste) | Nein | Qualität der Beschreibung | | lithology_id | ID (Codeliste) | Nein | Lithologie | | original_uscs | Text | Nein | USCS Originalklassifikation | | uscs_determination_id | ID (Codeliste) | Nein | USCS Bestimmungsmethode | diff --git a/src/client/public/locale/common.json b/src/client/public/locale/common.json index f00e45640..c87ca43f0 100644 --- a/src/client/public/locale/common.json +++ b/src/client/public/locale/common.json @@ -213,7 +213,7 @@ "organic_component": "", "plasticity": "", "completeness": "", - "qt_description": "", + "description_quality": "", "striae": "", "uscs_1": "", "uscs_2": "", @@ -287,9 +287,9 @@ "publish": "", "purpose": "", "qt_bore_inc_dir": "", - "qt_elevation": "", + "elevation_precision": "", "qt_depth": "", - "qt_location": "", + "location_precision": "", "qt_top_bedrock": "", "refElevationCasing": "", "refresh": "", diff --git a/src/client/public/locale/de/common.json b/src/client/public/locale/de/common.json index 9f97eec36..f5d4e7fc5 100644 --- a/src/client/public/locale/de/common.json +++ b/src/client/public/locale/de/common.json @@ -222,7 +222,7 @@ "organic_component": "Organische Komponenten", "plasticity": "Plastizität", "completeness": "Vollständigkeit der Einträge", - "qt_description": "Qualität der Beschreibung", + "description_quality": "Qualität der Beschreibung", "striae": "Striemung", "uscs_1": "USCS 1", "uscs_2": "USCS 2", @@ -294,8 +294,8 @@ "purpose": "Bohrzweck", "qt_bore_inc_dir": "Ink. / Richtung Genauigkeit", "qt_depth": "+/- Bohrlochlänge [m MD]", - "qt_elevation": "+/- Terrainhöhe [m]", - "qt_location": "+/- Koordinaten [m]", + "elevation_precision": "+/- Terrainhöhe [m]", + "location_precision": "+/- Koordinaten [m]", "qt_top_bedrock": "+/- Top Fels [m MD]", "reference_elevation": "Referenz Ansatzhöhe [m ü.M.]", "reference_elevation_qt": "+/- Referenz Ansatzhöhe [m]", diff --git a/src/client/public/locale/en/common.json b/src/client/public/locale/en/common.json index a0077cbdf..00b7544a7 100644 --- a/src/client/public/locale/en/common.json +++ b/src/client/public/locale/en/common.json @@ -222,7 +222,7 @@ "organic_component": "Organic components", "plasticity": "Plasticity", "completeness": "Completeness of entries", - "qt_description": "Quality of the description", + "description_quality": "Quality of the description", "striae": "Striations", "uscs_1": "USCS 1", "uscs_2": "USCS 2", @@ -294,8 +294,8 @@ "purpose": "Drilling purpose", "qt_bore_inc_dir": "Inclin. / direction precision", "qt_depth": "+/- Borehole length [m MD]", - "qt_elevation": "+/- Ground elevation [m]", - "qt_location": "+/- Coordinates [m]", + "elevation_precision": "+/- Ground elevation [m]", + "location_precision": "+/- Coordinates [m]", "qt_top_bedrock": "+/- Top bedrock [m MD]", "reference_elevation": "Reference elevation [m a.s.l.]", "reference_elevation_qt": "+/- Reference elevation [m]", diff --git a/src/client/public/locale/fr/common.json b/src/client/public/locale/fr/common.json index 6914ffe85..c2fc179a3 100644 --- a/src/client/public/locale/fr/common.json +++ b/src/client/public/locale/fr/common.json @@ -222,7 +222,7 @@ "organic_component": "Composants organiques", "plasticity": "Plasticité", "completeness": "Exhaustivité des informations", - "qt_description": "Qualité de la description", + "description_quality": "Qualité de la description", "striae": "Stries", "uscs_1": "USCS 1", "uscs_2": "USCS 2", @@ -294,8 +294,8 @@ "purpose": "But du forage", "qt_bore_inc_dir": "Précision de inclin. / direction", "qt_depth": "+/- Longueur du forage [m MD]", - "qt_elevation": "+/- Niveau du terrain [m]", - "qt_location": "+/- Coordonnées [m]", + "elevation_precision": "+/- Niveau du terrain [m]", + "location_precision": "+/- Coordonnées [m]", "qt_top_bedrock": "+/- Toit du rocher [m MD]", "reference_elevation": "Référence altitudinale [m s.m.]", "reference_elevation_qt": "+/- Référence altitudinale [m]", diff --git a/src/client/public/locale/it/common.json b/src/client/public/locale/it/common.json index 9393873ed..6ef3e7951 100644 --- a/src/client/public/locale/it/common.json +++ b/src/client/public/locale/it/common.json @@ -222,7 +222,7 @@ "organic_component": "Componenti organici", "plasticity": "Plasticità", "completeness": "Integralità dei dati", - "qt_description": "Qualità della descrizione", + "description_quality": "Qualità della descrizione", "striae": "Strie", "uscs_1": "USCS 1", "uscs_2": "USCS 2", @@ -294,8 +294,8 @@ "purpose": "Scopo della perforazione", "qt_bore_inc_dir": "Qualità inclinazione / direzione", "qt_depth": "+/- Lunghezza della perforazione [m MD]", - "qt_elevation": "+/- Quota livello del terreno [m]", - "qt_location": "+/- Coordinate [m]", + "elevation_precision": "+/- Quota livello del terreno [m]", + "location_precision": "+/- Coordinate [m]", "qt_top_bedrock": "+/- Top del substrato roccioso [m MD]", "reference_elevation": "Riferimento della quota [m s.l.m.]", "reference_elevation_qt": "+/- Riferimento della quota [m]", diff --git a/src/client/src/api-lib/reducers/index.js b/src/client/src/api-lib/reducers/index.js index 2c08d31d2..96970b9fb 100644 --- a/src/client/src/api-lib/reducers/index.js +++ b/src/client/src/api-lib/reducers/index.js @@ -330,10 +330,10 @@ export function borehole() { location_x: "", location_y: "", srs: null, - qt_location: null, + location_precision: null, elevation_z: "", hrs: null, - qt_elevation: null, + elevation_precision: null, drilling_date: null, bore_inc: null, bore_inc_dir: null, diff --git a/src/client/src/commons/detail/meta/metaComponent.js b/src/client/src/commons/detail/meta/metaComponent.js index 70271804b..8443f4a8b 100644 --- a/src/client/src/commons/detail/meta/metaComponent.js +++ b/src/client/src/commons/detail/meta/metaComponent.js @@ -274,16 +274,16 @@ class MetaComponent extends React.Component { data.reference_elevation, )} {this.getDomainRow( - "ibor117", + "reference_elevation_type", data.reference_elevation_type, "reference_elevation_type", )}
- {this.getDomainRow("qt_location", data.qt_location)} - {this.getDomainRow("qt_elevation", data.qt_elevation)} + {this.getDomainRow("location_precision", data.location_precision)} + {this.getDomainRow("elevation_precision", data.elevation_precision)} {this.getDomainRow( - "qt_elevation", + "elevation_precision", data.qt_reference_elevation, "reference_elevation_qt", )} diff --git a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js index fcc17b7ae..947c2c8d0 100644 --- a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js +++ b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js @@ -232,7 +232,7 @@ const ProfileView = props => { ? t("common:no") : null, )} - {getDomainRow(layer.qtDescription, "qt_description")} + {getDomainRow(layer.descriptionQuality, "description_quality")} {getDomainRow(layer.lithology, "lithology")} {getTextRow("original_lithology", layer.originalLithology)} @@ -243,23 +243,23 @@ const ProfileView = props => { {getDomainRow(layer.uscs2, "uscs_2")} {getDomainRow(layer.grainSize2, "grain_size_2")} {getDomainRowMultiple( - layer.codelists.filter(c => c.schema === "mcla101"), + layer.codelists.filter(c => c.schema === "uscs_type"), "uscs_3", )} {getDomainRowMultiple( - layer.codelists.filter(c => c.schema === "mlpr110"), + layer.codelists.filter(c => c.schema === "grain_shape"), "grain_shape", )} {getDomainRowMultiple( - layer.codelists.filter(c => c.schema === "mlpr115"), + layer.codelists.filter(c => c.schema === "grain_angularity"), "grain_granularity", )} {getDomainRowMultiple( - layer.codelists.filter(c => c.schema === "mlpr108"), + layer.codelists.filter(c => c.schema === "organic_components"), "organic_component", )} {getDomainRowMultiple( - layer.codelists.filter(c => c.schema === "mcla107"), + layer.codelists.filter(c => c.schema === "debris"), "debris", )} {getDomainRow( @@ -275,7 +275,7 @@ const ProfileView = props => { : null, )} {getDomainRowMultiple( - layer.codelists.filter(c => c.schema === "mlpr112"), + layer.codelists.filter(c => c.schema === "colour"), "color", )} {getDomainRow(layer.consistance, "consistance")} diff --git a/src/client/src/commons/form/borehole/completion/backfillInput.js b/src/client/src/commons/form/borehole/completion/backfillInput.js index e03ededce..82e321cc2 100644 --- a/src/client/src/commons/form/borehole/completion/backfillInput.js +++ b/src/client/src/commons/form/borehole/completion/backfillInput.js @@ -51,7 +51,7 @@ const BackfillInput = ({ selected={item.kindId} required={true} values={domains?.data - ?.filter(d => d.schema === completionSchemaConstants.backfillKind) + ?.filter(d => d.schema === completionSchemaConstants.backfillType) .sort((a, b) => a.order - b.order) .map(d => ({ key: d.id, diff --git a/src/client/src/commons/form/borehole/completion/casingInput.js b/src/client/src/commons/form/borehole/completion/casingInput.js index 713ac25b5..351e0875c 100644 --- a/src/client/src/commons/form/borehole/completion/casingInput.js +++ b/src/client/src/commons/form/borehole/completion/casingInput.js @@ -57,7 +57,7 @@ const CasingInput = ({ item, setSelected, parentId, addData, updateData }) => { selected={item.kindId} required={true} values={domains?.data - ?.filter(d => d.schema === completionSchemaConstants.casingKind) + ?.filter(d => d.schema === completionSchemaConstants.casingType) .sort((a, b) => a.order - b.order) .map(d => ({ key: d.id, diff --git a/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js b/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js index 4caea1f7d..f93faa0ee 100644 --- a/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js +++ b/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js @@ -1,9 +1,9 @@ export const completionSchemaConstants = { completionKind: "completion_kind", - instrumentationKind: "inst100", - instrumentationStatus: "inst101", - backfillKind: "fill100", - backfillMaterial: "fill200", - casingKind: "casi200", - casingMaterial: "casi201", + instrumentationType: "instrument_type", + instrumentationStatus: "instrument_status", + backfillType: "backfill_type", + backfillMaterial: "backfill_material", + casingType: "casing_type", + casingMaterial: "casing_material", }; diff --git a/src/client/src/commons/form/borehole/completion/instrumentationInput.js b/src/client/src/commons/form/borehole/completion/instrumentationInput.js index f57959c7f..6d52bcbfd 100644 --- a/src/client/src/commons/form/borehole/completion/instrumentationInput.js +++ b/src/client/src/commons/form/borehole/completion/instrumentationInput.js @@ -81,7 +81,7 @@ const InstrumentationInput = ({ required={true} values={domains?.data ?.filter( - d => d.schema === completionSchemaConstants.instrumentationKind, + d => d.schema === completionSchemaConstants.instrumentationType, ) .sort((a, b) => a.order - b.order) .map(d => ({ diff --git a/src/client/src/commons/form/borehole/segments/coordinatesSegment.js b/src/client/src/commons/form/borehole/segments/coordinatesSegment.js index 4be33557f..6fa9c2abb 100644 --- a/src/client/src/commons/form/borehole/segments/coordinatesSegment.js +++ b/src/client/src/commons/form/borehole/segments/coordinatesSegment.js @@ -568,14 +568,14 @@ const CoordinatesSegment = props => { { - updateChange("qt_location", selected.id, false); + updateChange("location_precision", selected.id, false); }} - schema="qt_location" - selected={borehole.data.qt_location} + schema="location_precision" + selected={borehole.data.location_precision} readOnly={!isEditable} /> @@ -604,14 +604,14 @@ const CoordinatesSegment = props => { { - updateChange("qt_elevation", selected.id, false); + updateChange("elevation_precision", selected.id, false); }} - schema="qt_elevation" - selected={borehole.data.qt_elevation} + schema="elevation_precision" + selected={borehole.data.elevation_precision} readOnly={!isEditable} /> @@ -654,7 +654,7 @@ const CoordinatesSegment = props => { onSelected={selected => { updateChange("qt_reference_elevation", selected.id, false); }} - schema="qt_elevation" + schema="elevation_precision" selected={borehole.data.qt_reference_elevation} readOnly={!isEditable} /> @@ -671,7 +671,7 @@ const CoordinatesSegment = props => { onSelected={selected => { updateChange("reference_elevation_type", selected.id, false); }} - schema="ibor117" + schema="reference_elevation_type" selected={borehole.data.reference_elevation_type} readOnly={!isEditable} /> diff --git a/src/client/src/commons/form/multiple/multipleForm.js b/src/client/src/commons/form/multiple/multipleForm.js index 51957c827..591b2fffb 100644 --- a/src/client/src/commons/form/multiple/multipleForm.js +++ b/src/client/src/commons/form/multiple/multipleForm.js @@ -44,8 +44,8 @@ class MultipleForm extends React.Component { value: null, }, national_interest: { api: "national_interest", value: null }, - qt_location: { api: "qt_location", value: null }, - qt_elevation: { api: "qt_elevation", value: null }, + location_precision: { api: "location_precision", value: null }, + elevation_precision: { api: "elevation_precision", value: null }, reference_elevation_qt: { api: "qt_reference_elevation", value: null, @@ -409,10 +409,10 @@ class MultipleForm extends React.Component { ) : null} {this.getGroup([ - this.getDomain("qt_location"), - this.getDomain("qt_elevation"), - this.getDomain("reference_elevation_qt", "qt_elevation"), - this.getDomain("reference_elevation_type", "ibor117"), + this.getDomain("location_precision"), + this.getDomain("elevation_precision"), + this.getDomain("reference_elevation_qt", "elevation_precision"), + this.getDomain("reference_elevation_type"), ])} {this.getGroup([ this.getDomain("kind"), diff --git a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js index 1e85ad566..e236428c1 100644 --- a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js +++ b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js @@ -43,7 +43,7 @@ const ProfileAttributes = props => { depth_from: null, depth_to: null, last: null, - qt_description: null, + description_quality: null, lithology: null, color: [], plasticity: null, @@ -85,25 +85,22 @@ const ProfileAttributes = props => { if (response?.codelists?.length > 0) { response["uscs_3"] = mapCodelistToAttribute( response.codelists, - "mcla101", + "uscs_type", ); response["grain_shape"] = mapCodelistToAttribute( response.codelists, - "mlpr110", + "grain_shape", ); response["grain_granularity"] = mapCodelistToAttribute( response.codelists, - "mlpr115", + "grain_angularity", ); response["organic_component"] = mapCodelistToAttribute( response.codelists, - "mlpr108", + "organic_components", ); - response["debris"] = mapCodelistToAttribute( - response.codelists, - "mcla107", - ); - response["color"] = mapCodelistToAttribute(response.codelists, "mlpr112"); + response["debris"] = mapCodelistToAttribute(response.codelists, "debris"); + response["color"] = mapCodelistToAttribute(response.codelists, "colour"); } setState({ isPatching: false, diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionDisplay.js b/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionDisplay.js index 44029ec73..456248a02 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionDisplay.js +++ b/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionDisplay.js @@ -31,8 +31,8 @@ const DescriptionDisplay = props => { {item.id !== null && ( - {t("qt_description")}:{" "} - {item.qtDescription?.[i18n.language] ?? "-"} + {t("description_quality")}:{" "} + {item.descriptionQuality?.[i18n.language] ?? "-"} )} diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.js b/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.js index e7abc3f56..cbfe3c6ad 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.js +++ b/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.js @@ -9,7 +9,7 @@ const DescriptionInput = props => { setFromDepth, setDescription, setToDepth, - setQtDescriptionId, + setDescriptionQualityId, selectableDepths, descriptions, } = props; @@ -106,19 +106,20 @@ const DescriptionInput = props => { sx={{ flex: "1", margin: "10px" }} variant="outlined" size="small" - label={t("qt_description")} - defaultValue={item.qtDescriptionId || ""} + label={t("description_quality")} + defaultValue={item.descriptionQualityId || ""} data-cy="qt-decription-select" InputLabelProps={{ shrink: true }} onChange={e => { e.stopPropagation(); - setQtDescriptionId(e.target.value); + setDescriptionQualityId(e.target.value); }}> {t("reset")} {domains?.data - ?.filter(d => d.schema === "qt_description") + ?.filter(d => d.schema === "description_quality") + .sort((a, b) => a.order - b.order) .map(d => ( {d[i18n.language]} ))} diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionLayers.js b/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionLayers.js index 4a0573c53..bed9bab9f 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionLayers.js +++ b/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionLayers.js @@ -25,7 +25,7 @@ const DescriptionLayers = props => { const [fromDepth, setFromDepth] = useState(null); const [toDepth, setToDepth] = useState(null); const [description, setDescription] = useState(null); - const [qtDescriptionId, setQtDescriptionId] = useState(null); + const [descriptionQualityId, setDescriptionQualityId] = useState(null); const [displayDescriptions, setDisplayDescriptions] = useState(null); const [descriptionIdSelectedForDelete, setDescriptionIdSelectedForDelete] = useState(0); @@ -92,7 +92,7 @@ const DescriptionLayers = props => { ), - qtDescription: null, + descriptionQuality: null, }); } tempDescriptions.push(description); @@ -142,19 +142,19 @@ const DescriptionLayers = props => { draft.fromDepth = parseFloat(fromDepth); draft.toDepth = parseFloat(toDepth); draft.description = description; - draft.qtDescriptionId = parseInt(qtDescriptionId); + draft.descriptionQualityId = parseInt(descriptionQualityId); }); updateMutation.mutate(updatedDescription); } // eslint-disable-next-line - }, [description, qtDescriptionId, toDepth, fromDepth]); + }, [description, descriptionQualityId, toDepth, fromDepth]); const selectItem = item => { if (item) { setFromDepth(item.fromDepth); setToDepth(item.toDepth); setDescription(item.description); - setQtDescriptionId(item.qtDescriptionId); + setDescriptionQualityId(item.descriptionQualityId); } setSelectedDescription(item); }; @@ -273,12 +273,12 @@ const DescriptionLayers = props => { { const grainSize1 = item?.grainSize1?.[i18n.language] ?? null; let color = []; item?.codelists - .filter(c => c.schema === "mlpr112") + .filter(c => c.schema === "colour") .forEach(element => { color.push(element[i18n.language]); }); @@ -133,35 +133,35 @@ const ProfileLayersList = props => { let uscs3 = []; item?.codelists - .filter(c => c.schema === "mcla101") + .filter(c => c.schema === "uscs_type") .forEach(element => { uscs3.push(element[i18n.language]); }); let grainshape = []; item?.codelists - .filter(c => c.schema === "mlpr110") + .filter(c => c.schema === "grain_shape") .forEach(element => { grainshape.push(element[i18n.language]); }); let angularity = []; item?.codelists - .filter(c => c.schema === "mlpr115") + .filter(c => c.schema === "grain_angularity") .forEach(element => { angularity.push(element[i18n.language]); }); let organicCompounds = []; item?.codelists - .filter(c => c.schema === "mlpr108") + .filter(c => c.schema === "organic_components") .forEach(element => { organicCompounds.push(element[i18n.language]); }); let debris = []; item?.codelists - .filter(c => c.schema === "mcla107") + .filter(c => c.schema === "debris") .forEach(element => { debris.push(element[i18n.language]); }); diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index 6df2868d4..d29226ac8 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -45,12 +45,12 @@ export const stratigraphyData = { id: 3, type: "Dropdown", label: "completeness", - value: "qtDescriptionId", - schema: "qt_description", + value: "descriptionQualityId", + schema: "description_quality", multiple: false, search: false, require: true, - isVisibleValue: "qt_description", + isVisibleValue: "description_quality", }, { id: 4, @@ -88,7 +88,7 @@ export const stratigraphyData = { type: "Dropdown", label: "uscs_determination", value: "uscsDeterminationId", - schema: "mcla104", + schema: "uscs_determination", multiple: false, search: true, isVisibleValue: "uscs_determination", @@ -98,7 +98,7 @@ export const stratigraphyData = { type: "Dropdown", label: "uscs_1", value: "uscs1Id", - schema: "mcla101", + schema: "uscs_type", multiple: false, search: false, isVisibleValue: "uscs_1", @@ -108,7 +108,7 @@ export const stratigraphyData = { type: "Dropdown", label: "grain_size_1", value: "grainSize1Id", - schema: "mlpr109", + schema: "grain_size", multiple: false, search: false, isVisibleValue: "grain_size_1", @@ -118,7 +118,7 @@ export const stratigraphyData = { type: "Dropdown", label: "uscs_2", value: "uscs2Id", - schema: "mcla101", + schema: "uscs_type", multiple: false, search: false, isVisibleValue: "uscs_2", @@ -128,7 +128,7 @@ export const stratigraphyData = { type: "Dropdown", label: "grain_size_2", value: "grainSize2Id", - schema: "mlpr109", + schema: "grain_size", multiple: false, search: false, isVisibleValue: "grain_size_2", @@ -138,7 +138,7 @@ export const stratigraphyData = { type: "Dropdown", label: "uscs_3", value: "uscs_3", - schema: "mcla101", + schema: "uscs_type", multiple: true, search: false, isVisibleValue: "uscs_3", @@ -148,7 +148,7 @@ export const stratigraphyData = { type: "Dropdown", label: "grain_shape", value: "grain_shape", - schema: "mlpr110", + schema: "grain_shape", multiple: true, search: true, isVisibleValue: "grain_shape", @@ -158,7 +158,7 @@ export const stratigraphyData = { type: "Dropdown", label: "grain_granularity", value: "grain_granularity", - schema: "mlpr115", + schema: "grain_angularity", multiple: true, search: true, isVisibleValue: "grain_granularity", @@ -168,7 +168,7 @@ export const stratigraphyData = { type: "Dropdown", label: "organic_component", value: "organic_component", - schema: "mlpr108", + schema: "organic_components", multiple: true, search: true, isVisibleValue: "organic_component", @@ -178,7 +178,7 @@ export const stratigraphyData = { type: "Dropdown", label: "debris", value: "debris", - schema: "mcla107", + schema: "debris", multiple: true, search: true, isVisibleValue: "debris", @@ -206,7 +206,7 @@ export const stratigraphyData = { type: "Dropdown", label: "color", value: "color", - schema: "mlpr112", + schema: "colour", multiple: true, search: true, isVisibleValue: "color", @@ -216,7 +216,7 @@ export const stratigraphyData = { type: "Dropdown", label: "consistance", value: "consistanceId", - schema: "mlpr103", + schema: "consistency", multiple: false, search: true, isVisibleValue: "consistance", @@ -226,7 +226,7 @@ export const stratigraphyData = { type: "Dropdown", label: "plasticity", value: "plasticityId", - schema: "mlpr101", + schema: "plasticity", multiple: false, search: false, isVisibleValue: "plasticity", @@ -236,7 +236,7 @@ export const stratigraphyData = { type: "Dropdown", label: "compactness", value: "compactnessId", - schema: "mlpr102", + schema: "compactness", multiple: false, search: false, isVisibleValue: "compactness", @@ -246,7 +246,7 @@ export const stratigraphyData = { type: "Dropdown", label: "cohesion", value: "cohesionId", - schema: "mlpr116", + schema: "cohesion", multiple: false, search: false, isVisibleValue: "cohesion", @@ -266,7 +266,7 @@ export const stratigraphyData = { type: "Dropdown", label: "humidity", value: "humidityId", - schema: "mlpr105", + schema: "humidity", multiple: false, search: false, isVisibleValue: "humidity", @@ -276,7 +276,7 @@ export const stratigraphyData = { type: "Dropdown", label: "alteration", value: "alterationId", - schema: "mlpr106", + schema: "alteration", multiple: false, search: false, isVisibleValue: "alteration", diff --git a/src/client/src/commons/menu/editor/menuEditorSearch.js b/src/client/src/commons/menu/editor/menuEditorSearch.js index 0d88c8ac6..6ade3e45e 100644 --- a/src/client/src/commons/menu/editor/menuEditorSearch.js +++ b/src/client/src/commons/menu/editor/menuEditorSearch.js @@ -328,7 +328,7 @@ class MenuEditorSearch extends React.Component { {this.ExampleHeadings( "import_id;strati_import_id;strati_date;strati_name;from_depth;to_depth;" + - "is_last;qt_description_id;lithology_id;" + + "is_last;description_quality_id;lithology_id;" + "original_uscs;uscs_determination_id;uscs_1_id;grain_size_1_id;uscs_2_id;grain_size_2_id;" + "is_striae;consistance_id;plasticity_id;compactness_id;cohesion_id;humidity_id;alteration_id;" + "notes;original_lithology;uscs_3_ids;grain_shape_ids;grain_granularity_ids;organic_component_ids;" + diff --git a/src/client/src/commons/search/data/LocationSearchData.js b/src/client/src/commons/search/data/LocationSearchData.js index 18a3dbe0a..34d2a4643 100644 --- a/src/client/src/commons/search/data/LocationSearchData.js +++ b/src/client/src/commons/search/data/LocationSearchData.js @@ -149,7 +149,7 @@ export const LocationSearchData = [ type: "Dropdown", label: "reference_elevation_type", value: "reference_elevation_type", - schema: "ibor117", + schema: "reference_elevation_type", multiple: false, search: false, isVisibleValue: "reference_elevation_type", @@ -157,29 +157,29 @@ export const LocationSearchData = [ { id: 14, type: "Dropdown", - label: "qt_location", - value: "qt_location", - schema: "qt_location", + label: "location_precision", + value: "location_precision", + schema: "location_precision", multiple: false, search: false, - isVisibleValue: "qt_location", + isVisibleValue: "location_precision", }, { id: 15, type: "Dropdown", - label: "qt_elevation", - value: "qt_elevation", - schema: "qt_elevation", + label: "elevation_precision", + value: "elevation_precision", + schema: "elevation_precision", multiple: false, search: false, - isVisibleValue: "qt_elevation", + isVisibleValue: "elevation_precision", }, { id: 16, type: "Dropdown", label: "reference_elevation_qt", value: "qt_reference_elevation", - schema: "qt_elevation", + schema: "elevation_precision", multiple: false, search: false, isVisibleValue: "reference_elevation_qt", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index ab82513ad..a1572fb16 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -48,12 +48,12 @@ export const lithologySearchData = [ { id: 4, type: "Dropdown", - label: "qt_description", - value: "qt_description", - schema: "qt_description", + label: "description_quality", + value: "description_quality", + schema: "description_quality", multiple: false, search: false, - isVisibleValue: "layer.qt_description", + isVisibleValue: "layer.description_quality", }, { id: 5, @@ -90,7 +90,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "uscs_determination", value: "uscs_determination", - schema: "mcla104", + schema: "uscs_determination", multiple: false, search: true, isVisibleValue: "layer.uscs_determination", @@ -100,7 +100,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "uscs_1", value: "uscs_1", - schema: "mcla101", + schema: "uscs_type", multiple: false, search: false, isVisibleValue: "layer.uscs_1", @@ -110,7 +110,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "grain_size_1", value: "grain_size_1", - schema: "mlpr109", + schema: "grain_size", multiple: false, search: false, isVisibleValue: "layer.grain_size_1", @@ -120,7 +120,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "uscs_2", value: "uscs_2", - schema: "mcla101", + schema: "uscs_type", multiple: false, search: false, isVisibleValue: "layer.uscs_2", @@ -130,7 +130,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "grain_size_2", value: "grain_size_2", - schema: "mlpr109", + schema: "grain_size", multiple: false, search: false, isVisibleValue: "layer.grain_size_2", @@ -140,7 +140,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "uscs_3", value: "uscs_3", - schema: "mcla101", + schema: "uscs_type", multiple: false, search: true, isVisibleValue: "layer.uscs_3", @@ -150,7 +150,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "grain_shape", value: "grain_shape", - schema: "mlpr110", + schema: "grain_shape", multiple: false, search: true, isVisibleValue: "layer.grain_shape", @@ -160,7 +160,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "grain_granularity", value: "grain_granularity", - schema: "mlpr115", + schema: "grain_angularity", multiple: false, search: true, isVisibleValue: "layer.grain_granularity", @@ -170,7 +170,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "organic_component", value: "organic_component", - schema: "mlpr108", + schema: "organic_components", multiple: false, search: true, isVisibleValue: "layer.organic_component", @@ -180,7 +180,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "debris", value: "debris", - schema: "mcla107", + schema: "debris", multiple: false, search: true, isVisibleValue: "layer.debris", @@ -209,7 +209,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "color", value: "color", - schema: "mlpr112", + schema: "colour", multiple: false, search: true, isVisibleValue: "layer.color", @@ -219,7 +219,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "consistance", value: "consistance", - schema: "mlpr103", + schema: "consistency", multiple: false, search: true, isVisibleValue: "layer.consistance", @@ -229,7 +229,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "plasticity", value: "plasticity", - schema: "mlpr101", + schema: "plasticity", multiple: false, search: false, isVisibleValue: "layer.plasticity", @@ -239,7 +239,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "compactness", value: "compactness", - schema: "mlpr102", + schema: "compactness", multiple: false, search: false, isVisibleValue: "layer.compactness", @@ -249,7 +249,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "cohesion", value: "cohesion", - schema: "mlpr116", + schema: "cohesion", multiple: false, search: false, isVisibleValue: "layer.cohesion", @@ -269,7 +269,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "humidity", value: "humidity", - schema: "mlpr105", + schema: "humidity", multiple: false, search: false, isVisibleValue: "layer.humidity", @@ -279,7 +279,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "alteration", value: "alteration", - schema: "mlpr106", + schema: "alteration", multiple: false, search: false, isVisibleValue: "layer.alteration", diff --git a/src/client/src/commons/search/editor/searchEditorState.js b/src/client/src/commons/search/editor/searchEditorState.js index e4408b320..6a320dd63 100644 --- a/src/client/src/commons/search/editor/searchEditorState.js +++ b/src/client/src/commons/search/editor/searchEditorState.js @@ -90,7 +90,7 @@ const initialState = { // Lithostratigraphy filter lithostratigraphy_id: null, - qt_description: null, + description_quality: null, uscs_original: "", original_lithology: "", layer_gradation: null, @@ -111,8 +111,8 @@ const initialState = { reference_elevation_type: null, qt_reference_elevation: null, - qt_elevation: null, - qt_location: null, + elevation_precision: null, + location_precision: null, reference_elevation_from: "", reference_elevation_to: "", srs: null, diff --git a/src/client/src/commons/search/searchState.js b/src/client/src/commons/search/searchState.js index a43d8cc1c..da58e5e77 100644 --- a/src/client/src/commons/search/searchState.js +++ b/src/client/src/commons/search/searchState.js @@ -84,7 +84,7 @@ const initialState = { uscs_determination: null, debris: null, - qt_description: null, + description_quality: null, uscs_original: "", original_lithology: "", layer_gradation: null, @@ -105,8 +105,8 @@ const initialState = { reference_elevation_type: null, qt_reference_elevation: null, - qt_elevation: null, - qt_location: null, + elevation_precision: null, + location_precision: null, reference_elevation_from: "", reference_elevation_to: "", srs: null, diff --git a/src/client/src/pages/settings/data/lithologyFieldEditorData.js b/src/client/src/pages/settings/data/lithologyFieldEditorData.js index 805656152..8425aed31 100644 --- a/src/client/src/pages/settings/data/lithologyFieldEditorData.js +++ b/src/client/src/pages/settings/data/lithologyFieldEditorData.js @@ -6,8 +6,8 @@ export const lithologyFieldEditorData = [ }, { id: 1, - label: "qt_description", - value: "qt_description", + label: "description_quality", + value: "description_quality", }, { id: 2, diff --git a/src/client/src/pages/settings/data/lithologyFilterEditorData.js b/src/client/src/pages/settings/data/lithologyFilterEditorData.js index 04fea2f4c..1c6898f35 100644 --- a/src/client/src/pages/settings/data/lithologyFilterEditorData.js +++ b/src/client/src/pages/settings/data/lithologyFilterEditorData.js @@ -11,8 +11,8 @@ export const lithologyFilterEditorData = [ }, { id: 2, - label: "qt_description", - value: "layer.qt_description", + label: "description_quality", + value: "layer.description_quality", }, { id: 3, diff --git a/src/client/src/pages/settings/data/locationEditorData.js b/src/client/src/pages/settings/data/locationEditorData.js index 53bb8c644..d49102d04 100644 --- a/src/client/src/pages/settings/data/locationEditorData.js +++ b/src/client/src/pages/settings/data/locationEditorData.js @@ -51,13 +51,13 @@ export const locationEditorData = [ }, { id: 10, - label: "qt_location", - value: "qt_location", + label: "location_precision", + value: "location_precision", }, { id: 11, - label: "qt_elevation", - value: "qt_elevation", + label: "elevation_precision", + value: "elevation_precision", }, { id: 12, diff --git a/tests/Controllers/BackfillControllerTest.cs b/tests/Controllers/BackfillControllerTest.cs index ac5500a34..74421e42f 100644 --- a/tests/Controllers/BackfillControllerTest.cs +++ b/tests/Controllers/BackfillControllerTest.cs @@ -68,7 +68,7 @@ public async Task CreateAsync() { CompletionId = completionId, MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id, - KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id, + KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id, Notes = "ARGONSHIP", FromDepth = 0, ToDepth = 100, @@ -84,7 +84,7 @@ public async Task CreateAsync() Assert.AreEqual(0, backfill.FromDepth); Assert.AreEqual(100, backfill.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id, backfill.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id, backfill.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id, backfill.KindId); } [TestMethod] @@ -94,7 +94,7 @@ public async Task EditAsync() var completionId = backfill.CompletionId; backfill.MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id; - backfill.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id; + backfill.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id; backfill.Notes = "COLLAR"; backfill.FromDepth = 50; backfill.ToDepth = 200; @@ -109,7 +109,7 @@ public async Task EditAsync() Assert.AreEqual(50, backfill.FromDepth); Assert.AreEqual(200, backfill.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id, backfill.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id, backfill.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id, backfill.KindId); } [TestMethod] diff --git a/tests/Controllers/CasingControllerTest.cs b/tests/Controllers/CasingControllerTest.cs index c3889c4cf..da97b3dea 100644 --- a/tests/Controllers/CasingControllerTest.cs +++ b/tests/Controllers/CasingControllerTest.cs @@ -72,7 +72,7 @@ public async Task CreateAsync() FromDepth = 0, ToDepth = 100, MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id, - KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id, + KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id, DateStart = new DateOnly(2021, 1, 1), DateFinish = new DateOnly(2021, 1, 2), InnerDiameter = 3, @@ -90,7 +90,7 @@ public async Task CreateAsync() Assert.AreEqual(0, casing.FromDepth); Assert.AreEqual(100, casing.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id, casing.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id, casing.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id, casing.KindId); Assert.AreEqual(3, casing.InnerDiameter); Assert.AreEqual(4, casing.OuterDiameter); Assert.AreEqual(new DateOnly(2021, 1, 1), casing.DateStart); @@ -104,7 +104,7 @@ public async Task EditAsync() var completionId = casing.CompletionId; casing.MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id; - casing.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id; + casing.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id; casing.Notes = "COLLAR"; casing.FromDepth = 50; casing.ToDepth = 200; @@ -119,7 +119,7 @@ public async Task EditAsync() Assert.AreEqual(50, casing.FromDepth); Assert.AreEqual(200, casing.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id, casing.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id, casing.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id, casing.KindId); } [TestMethod] diff --git a/tests/Controllers/CodeListControllerTest.cs b/tests/Controllers/CodeListControllerTest.cs index 42d7e88a0..4cf7c6d43 100644 --- a/tests/Controllers/CodeListControllerTest.cs +++ b/tests/Controllers/CodeListControllerTest.cs @@ -33,7 +33,7 @@ public void TestInitialize() public async Task GetAllEntriesAsync() { var codeLists = await controller.GetAsync(); - Assert.AreEqual(2431, codeLists.Count()); + Assert.AreEqual(2416, codeLists.Count()); } [TestMethod] @@ -94,7 +94,7 @@ public async Task EditCodelistWithMinimalCodelist() { Id = id, Geolcode = id, - Schema = "mcla107", + Schema = "debris", De = "Tuff", Code = "Tuf", En = "tufa", @@ -158,7 +158,7 @@ public async Task EditCodelistWithCompleteCodelist() DescriptionRo = null, Geolcode = 9004, Order = 5, - Schema = "qt_description", + Schema = "description_quality", De = "sehr gut", En = "very good", Fr = "très bonne", @@ -196,7 +196,7 @@ public async Task EditCodelistWithCompleteCodelist() Assert.AreEqual(null, codeListToEdit.DescriptionRo); Assert.AreEqual(9004, codeListToEdit.Geolcode); Assert.AreEqual(5, codeListToEdit.Order); - Assert.AreEqual("qt_description", codeListToEdit.Schema); + Assert.AreEqual("description_quality", codeListToEdit.Schema); Assert.AreEqual("sehr gut", codeListToEdit.De); Assert.AreEqual("very good", codeListToEdit.En); Assert.AreEqual("très bonne", codeListToEdit.Fr); @@ -267,6 +267,6 @@ public async Task GetCsvExport() var expectedHeader = "id_cli,schema_cli,code_cli,text_cli_en,description_cli_en,text_cli_de,description_cli_de,text_cli_fr,description_cli_fr,text_cli_it,description_cli_it,text_cli_ro,description_cli_ro"; Assert.AreEqual(expectedHeader, response.Content.Split('\n')[0]); - Assert.AreEqual(2433, response.Content.Split('\n').Length); + Assert.AreEqual(2418, response.Content.Split('\n').Length); } } diff --git a/tests/Controllers/FaciesDescriptionControllerTest.cs b/tests/Controllers/FaciesDescriptionControllerTest.cs index 495dc17c2..702e48c1b 100644 --- a/tests/Controllers/FaciesDescriptionControllerTest.cs +++ b/tests/Controllers/FaciesDescriptionControllerTest.cs @@ -67,7 +67,7 @@ public async Task GetFaciesDescriptionById() Assert.AreEqual(40, faciesDescription.FromDepth); Assert.AreEqual(50, faciesDescription.ToDepth); Assert.AreEqual("radical Technician Personal Loan Account", faciesDescription.Description); - Assert.AreEqual(9003, faciesDescription.QtDescriptionId); + Assert.AreEqual(9003, faciesDescription.DescriptionQualityId); Assert.AreEqual(6_000_001, faciesDescription.StratigraphyId); } @@ -85,8 +85,8 @@ public async Task EditFaciesDescriptionWithCompleteFaciesDescription() ToDepth = 100, Id = 10_000_039, IsLast = true, - QtDescription = null, - QtDescriptionId = 9003, + DescriptionQuality = null, + DescriptionQualityId = 9003, Updated = new DateTime(2021, 11, 14, 8, 3, 19).ToUniversalTime(), UpdatedBy = null, UpdatedById = 2, @@ -101,7 +101,7 @@ public async Task EditFaciesDescriptionWithCompleteFaciesDescription() Created = new DateTime(2021, 3, 31, 16, 55, 02).ToUniversalTime(), StratigraphyId = 6_000_010, Description = "solid state web-enabled Maryland", - QtDescriptionId = 9001, + DescriptionQualityId = 9001, }; var faciesDescriptionToEdit = context.FaciesDescriptions.Single(c => c.Id == id); @@ -121,7 +121,7 @@ public async Task EditFaciesDescriptionWithCompleteFaciesDescription() Assert.AreEqual(1, updatedFaciesDescription.UpdatedById); Assert.AreEqual(6_000_010, updatedFaciesDescription.StratigraphyId); Assert.AreEqual("solid state web-enabled Maryland", updatedFaciesDescription.Description); - Assert.AreEqual(9001, updatedFaciesDescription.QtDescriptionId); + Assert.AreEqual(9001, updatedFaciesDescription.DescriptionQualityId); } [TestMethod] @@ -155,7 +155,7 @@ public async Task CreateAndDeleteAsync() Created = new DateTime(2022, 10, 4, 13, 19, 34).ToUniversalTime(), StratigraphyId = 6_000_010, Description = "SILDOV", - QtDescriptionId = 9003, + DescriptionQualityId = 9003, }; var response = await controller.CreateAsync(faciesDescription); diff --git a/tests/Controllers/InstrumentationControllerTest.cs b/tests/Controllers/InstrumentationControllerTest.cs index 204e22b0b..1660ec148 100644 --- a/tests/Controllers/InstrumentationControllerTest.cs +++ b/tests/Controllers/InstrumentationControllerTest.cs @@ -69,7 +69,7 @@ public async Task CreateAsync() Name = "REDWALK", CompletionId = completionId, StatusId = context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationStatusSchema).Id, - KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationKindSchema).Id, + KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationTypeSchema).Id, Notes = "ARGONSHIP", FromDepth = 0, ToDepth = 100, @@ -86,7 +86,7 @@ public async Task CreateAsync() Assert.AreEqual(0, instrumentation.FromDepth); Assert.AreEqual(100, instrumentation.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationStatusSchema).Id, instrumentation.StatusId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationKindSchema).Id, instrumentation.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationTypeSchema).Id, instrumentation.KindId); } [TestMethod] @@ -97,7 +97,7 @@ public async Task EditAsync() instrumentation.Name = "OCTAVEBOOK"; instrumentation.StatusId = context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationStatusSchema).Id; - instrumentation.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationKindSchema).Id; + instrumentation.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationTypeSchema).Id; instrumentation.Notes = "COLLAR"; instrumentation.FromDepth = 50; instrumentation.ToDepth = 200; @@ -113,7 +113,7 @@ public async Task EditAsync() Assert.AreEqual(50, instrumentation.FromDepth); Assert.AreEqual(200, instrumentation.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationStatusSchema).Id, instrumentation.StatusId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationKindSchema).Id, instrumentation.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationTypeSchema).Id, instrumentation.KindId); } [TestMethod] diff --git a/tests/Controllers/LayerControllerTest.cs b/tests/Controllers/LayerControllerTest.cs index ec508b83e..51d840f68 100644 --- a/tests/Controllers/LayerControllerTest.cs +++ b/tests/Controllers/LayerControllerTest.cs @@ -232,8 +232,8 @@ public async Task CreateWithCompleteLayer() OriginalUscs = "Bedfordshire", Plasticity = null, PlasticityId = 21101005, - QtDescription = null, - QtDescriptionId = null, + DescriptionQuality = null, + DescriptionQualityId = null, Stratigraphy = null, StratigraphyId = 6_000_008, ToDepth = 100, @@ -271,7 +271,7 @@ public async Task CreateWithCompleteLayer() Assert.AreEqual(layerToAdd.Notes, addedLayer.Notes); Assert.AreEqual(layerToAdd.OriginalUscs, addedLayer.OriginalUscs); Assert.AreEqual(layerToAdd.PlasticityId, addedLayer.PlasticityId); - Assert.AreEqual(layerToAdd.QtDescriptionId, addedLayer.QtDescriptionId); + Assert.AreEqual(layerToAdd.DescriptionQualityId, addedLayer.DescriptionQualityId); Assert.AreEqual(layerToAdd.StratigraphyId, addedLayer.StratigraphyId); Assert.AreEqual(layerToAdd.ToDepth, addedLayer.ToDepth); Assert.AreEqual(layerToAdd.Uscs1Id, addedLayer.Uscs1Id); diff --git a/tests/Controllers/LithologicalDescriptionControllerTest.cs b/tests/Controllers/LithologicalDescriptionControllerTest.cs index a50924da0..540f67c81 100644 --- a/tests/Controllers/LithologicalDescriptionControllerTest.cs +++ b/tests/Controllers/LithologicalDescriptionControllerTest.cs @@ -67,7 +67,7 @@ public async Task GetLithologicalDescriptionById() Assert.AreEqual(50, lithologicalDescription.FromDepth); Assert.AreEqual(60, lithologicalDescription.ToDepth); Assert.AreEqual("Metrics Mountains Practical", lithologicalDescription.Description); - Assert.AreEqual(9000, lithologicalDescription.QtDescriptionId); + Assert.AreEqual(9000, lithologicalDescription.DescriptionQualityId); Assert.AreEqual(6_000_001, lithologicalDescription.StratigraphyId); } @@ -85,8 +85,8 @@ public async Task EditLithologicalDescriptionWithCompleteLithologicalDescription ToDepth = 100, Id = 9_000_069, IsLast = true, - QtDescription = null, - QtDescriptionId = 9001, + DescriptionQuality = null, + DescriptionQualityId = 9001, Updated = new DateTime(2021, 3, 31, 16, 55, 02).ToUniversalTime(), UpdatedBy = null, UpdatedById = 5, @@ -101,7 +101,7 @@ public async Task EditLithologicalDescriptionWithCompleteLithologicalDescription Created = new DateTime(2021, 2, 14, 8, 55, 34).ToUniversalTime(), StratigraphyId = 6_000_010, Description = "Freddy ate more cucumber than Maria.", - QtDescriptionId = 9003, + DescriptionQualityId = 9003, }; var lithologicalDescriptionToEdit = context.LithologicalDescriptions.Single(c => c.Id == id); @@ -121,7 +121,7 @@ public async Task EditLithologicalDescriptionWithCompleteLithologicalDescription Assert.AreEqual(1, updatedLithologicalDescription.UpdatedById); Assert.AreEqual(6_000_010, updatedLithologicalDescription.StratigraphyId); Assert.AreEqual("Freddy ate more cucumber than Maria.", updatedLithologicalDescription.Description); - Assert.AreEqual(9003, updatedLithologicalDescription.QtDescriptionId); + Assert.AreEqual(9003, updatedLithologicalDescription.DescriptionQualityId); } [TestMethod] @@ -155,7 +155,7 @@ public async Task CreateAndDeleteAsync() Created = new DateTime(2022, 11, 3, 14, 20, 09).ToUniversalTime(), StratigraphyId = 6_000_010, Description = "SPOLYP", - QtDescriptionId = 9003, + DescriptionQualityId = 9003, }; var response = await controller.CreateAsync(lithologicalDescription); diff --git a/tests/Controllers/UploadControllerTest.cs b/tests/Controllers/UploadControllerTest.cs index 551317f22..6b78a1fa4 100644 --- a/tests/Controllers/UploadControllerTest.cs +++ b/tests/Controllers/UploadControllerTest.cs @@ -110,7 +110,7 @@ public async Task UploadLithologyShouldSaveData() var lithology = stratigraphy.Layers.First(l => l.FromDepth == 0.125); Assert.AreEqual(100, lithology.ToDepth); Assert.AreEqual(false, lithology.IsLast); - Assert.AreEqual(9001, lithology.QtDescriptionId); + Assert.AreEqual(9001, lithology.DescriptionQualityId); Assert.AreEqual(15104448, lithology.LithologyId); Assert.AreEqual(15302034, lithology.LithostratigraphyId); Assert.AreEqual("Granite", lithology.OriginalUscs); diff --git a/tests/TestData/data_sets/import_litho/litho.csv b/tests/TestData/data_sets/import_litho/litho.csv index 7f88faa6b..4b9d84ff3 100644 --- a/tests/TestData/data_sets/import_litho/litho.csv +++ b/tests/TestData/data_sets/import_litho/litho.csv @@ -1,4 +1,4 @@ -import_id;strati_import_id;strati_date;strati_name;from_depth;to_depth;is_last;qt_description_id;lithology_id;lithostratigraphy_id;chronostratigraphy_id;original_uscs;uscs_determination_id;uscs_1_id;grain_size_1_id;uscs_2_id;grain_size_2_id;is_striae;consistance_id;plasticity_id;compactness_id;cohesion_id;humidity_id;alteration_id;notes;original_lithology;uscs_3_ids;grain_shape_ids;grain_granularity_ids;organic_component_ids;debris_ids;color_ids;gradation_id;lithology_top_bedrock_id; +import_id;strati_import_id;strati_date;strati_name;from_depth;to_depth;is_last;description_quality_id;lithology_id;lithostratigraphy_id;chronostratigraphy_id;original_uscs;uscs_determination_id;uscs_1_id;grain_size_1_id;uscs_2_id;grain_size_2_id;is_striae;consistance_id;plasticity_id;compactness_id;cohesion_id;humidity_id;alteration_id;notes;original_lithology;uscs_3_ids;grain_shape_ids;grain_granularity_ids;organic_component_ids;debris_ids;color_ids;gradation_id;lithology_top_bedrock_id; 1;1001;2021-08-06 00:36:21.991827+00;Bennett;0.125;100;false;9001;15104448;15302034;15001069;Granite;23107001;23101005;21101001;23101008;21103008;false;21103003;21101001;21102007;21116005;21105002;21106004;instruction set Dynamic backing up Lock;trace back Peso;23101001,23101004,23101005;21110002,21110005;21115001,21115004;21108002,21108004,21108005;9100,9102;21112001,21112004;30000018;15101001; 1;1001;2021-08-06 00:36:21.991827+00;Bennett;11;12;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1;2001;;;55;55.23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;