diff --git a/src/api/Migrations/20240220140209_RenameCodesInJoinTables.Designer.cs b/src/api/Migrations/20240220140209_RenameCodesInJoinTables.Designer.cs
new file mode 100644
index 000000000..4d33d0cd1
--- /dev/null
+++ b/src/api/Migrations/20240220140209_RenameCodesInJoinTables.Designer.cs
@@ -0,0 +1,2792 @@
+//
+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("20240220140209_RenameCodesInJoinTables")]
+ partial class RenameCodesInJoinTables
+ {
+ ///
+ 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("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("TypeId")
+ .HasColumnType("integer")
+ .HasColumnName("kind_id_cli");
+
+ 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("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("TypeId");
+
+ 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