diff --git a/backend/api/Adapters/WellProjectAdapter.cs b/backend/api/Adapters/WellProjectAdapter.cs index 388a569ea..7967b7c86 100644 --- a/backend/api/Adapters/WellProjectAdapter.cs +++ b/backend/api/Adapters/WellProjectAdapter.cs @@ -13,9 +13,6 @@ public static WellProject Convert(WellProjectDto wellProjectDto) ProjectId = wellProjectDto.ProjectId, Name = wellProjectDto.Name, ArtificialLift = wellProjectDto.ArtificialLift, - RigMobDemob = wellProjectDto.RigMobDemob, - AnnualWellInterventionCost = wellProjectDto.AnnualWellInterventionCost, - PluggingAndAbandonment = wellProjectDto.PluggingAndAbandonment, Currency = wellProjectDto.Currency, }; @@ -43,9 +40,6 @@ public static void ConvertExisting(WellProject existing, WellProjectDto wellProj existing.ProjectId = wellProjectDto.ProjectId; existing.Name = wellProjectDto.Name; existing.ArtificialLift = wellProjectDto.ArtificialLift; - existing.RigMobDemob = wellProjectDto.RigMobDemob; - existing.AnnualWellInterventionCost = wellProjectDto.AnnualWellInterventionCost; - existing.PluggingAndAbandonment = wellProjectDto.PluggingAndAbandonment; existing.Currency = wellProjectDto.Currency; if (wellProjectDto.OilProducerCostProfile != null) diff --git a/backend/api/Adapters/WellProjectDtoAdapter.cs b/backend/api/Adapters/WellProjectDtoAdapter.cs index b70fba647..99014d9f8 100644 --- a/backend/api/Adapters/WellProjectDtoAdapter.cs +++ b/backend/api/Adapters/WellProjectDtoAdapter.cs @@ -13,9 +13,6 @@ public static WellProjectDto Convert(WellProject wellProject) ProjectId = wellProject.ProjectId, Name = wellProject.Name, ArtificialLift = wellProject.ArtificialLift, - RigMobDemob = wellProject.RigMobDemob, - AnnualWellInterventionCost = wellProject.AnnualWellInterventionCost, - PluggingAndAbandonment = wellProject.PluggingAndAbandonment, Currency = wellProject.Currency, WellProjectWells = wellProject.WellProjectWells?.Select(wc => WellProjectWellDtoAdapter.Convert(wc)).ToList() }; diff --git a/backend/api/Dtos/WellProjectDto.cs b/backend/api/Dtos/WellProjectDto.cs index 310a5a933..475146145 100644 --- a/backend/api/Dtos/WellProjectDto.cs +++ b/backend/api/Dtos/WellProjectDto.cs @@ -12,9 +12,6 @@ public class WellProjectDto public WaterInjectorCostProfileDto? WaterInjectorCostProfile { get; set; } public GasInjectorCostProfileDto? GasInjectorCostProfile { get; set; } public ArtificialLift ArtificialLift { get; set; } - public double RigMobDemob { get; set; } - public double AnnualWellInterventionCost { get; set; } - public double PluggingAndAbandonment { get; set; } public Currency Currency { get; set; } public List? WellProjectWells { get; set; } } diff --git a/backend/api/Migrations/20221117090633_RemoveWellProjectProperties.Designer.cs b/backend/api/Migrations/20221117090633_RemoveWellProjectProperties.Designer.cs new file mode 100644 index 000000000..6f522d51e --- /dev/null +++ b/backend/api/Migrations/20221117090633_RemoveWellProjectProperties.Designer.cs @@ -0,0 +1,2120 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using api.Context; + +#nullable disable + +namespace api.Migrations +{ + [DbContext(typeof(DcdDbContext))] + [Migration("20221117090633_RemoveWellProjectProperties")] + partial class RemoveWellProjectProperties + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + + modelBuilder.Entity("api.Models.AppraisalWellCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Exploration.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Override") + .HasColumnType("bit"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Exploration.Id") + .IsUnique(); + + b.ToTable("AppraisalWellCostProfile"); + }); + + modelBuilder.Entity("api.Models.Case", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("APXDate") + .HasColumnType("datetimeoffset"); + + b.Property("APZDate") + .HasColumnType("datetimeoffset"); + + b.Property("ArtificialLift") + .HasColumnType("int"); + + b.Property("BreakEven") + .HasColumnType("float"); + + b.Property("CapexFactorFEEDStudies") + .HasColumnType("float"); + + b.Property("CapexFactorFeasibilityStudies") + .HasColumnType("float"); + + b.Property("CreateTime") + .HasColumnType("datetimeoffset"); + + b.Property("DG0Date") + .HasColumnType("datetimeoffset"); + + b.Property("DG1Date") + .HasColumnType("datetimeoffset"); + + b.Property("DG2Date") + .HasColumnType("datetimeoffset"); + + b.Property("DG3Date") + .HasColumnType("datetimeoffset"); + + b.Property("DG4Date") + .HasColumnType("datetimeoffset"); + + b.Property("DGADate") + .HasColumnType("datetimeoffset"); + + b.Property("DGBDate") + .HasColumnType("datetimeoffset"); + + b.Property("DGCDate") + .HasColumnType("datetimeoffset"); + + b.Property("Description") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("DrainageStrategyLink") + .HasColumnType("uniqueidentifier"); + + b.Property("ExplorationLink") + .HasColumnType("uniqueidentifier"); + + b.Property("FacilitiesAvailability") + .HasColumnType("float"); + + b.Property("GasInjectorCount") + .HasColumnType("int"); + + b.Property("Host") + .HasColumnType("nvarchar(max)"); + + b.Property("ModifyTime") + .HasColumnType("datetimeoffset"); + + b.Property("NPV") + .HasColumnType("float"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ProducerCount") + .HasColumnType("int"); + + b.Property("ProductionStrategyOverview") + .HasColumnType("int"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReferenceCase") + .HasColumnType("bit"); + + b.Property("SharepointFileId") + .HasColumnType("nvarchar(max)"); + + b.Property("SharepointFileName") + .HasColumnType("nvarchar(max)"); + + b.Property("SharepointFileUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("SubstructureLink") + .HasColumnType("uniqueidentifier"); + + b.Property("SurfLink") + .HasColumnType("uniqueidentifier"); + + b.Property("TopsideLink") + .HasColumnType("uniqueidentifier"); + + b.Property("TransportLink") + .HasColumnType("uniqueidentifier"); + + b.Property("WaterInjectorCount") + .HasColumnType("int"); + + b.Property("WellProjectLink") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.ToTable("Cases"); + }); + + modelBuilder.Entity("api.Models.Co2Emissions", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DrainageStrategy.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DrainageStrategy.Id") + .IsUnique(); + + b.ToTable("Co2Emissions"); + }); + + modelBuilder.Entity("api.Models.CountryOfficeCost", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Exploration.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Exploration.Id") + .IsUnique(); + + b.ToTable("CountryOfficeCost"); + }); + + modelBuilder.Entity("api.Models.DevelopmentOperationalWellCosts", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AnnualWellInterventionCostPerWell") + .HasColumnType("float"); + + b.Property("PluggingAndAbandonment") + .HasColumnType("float"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("RigMobDemob") + .HasColumnType("float"); + + b.Property("RigUpgrading") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId") + .IsUnique(); + + b.ToTable("DevelopmentOperationalWellCosts"); + }); + + modelBuilder.Entity("api.Models.DrainageStrategy", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ArtificialLift") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GasInjectorCount") + .HasColumnType("int"); + + b.Property("GasSolution") + .HasColumnType("int"); + + b.Property("NGLYield") + .HasColumnType("float"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ProducerCount") + .HasColumnType("int"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("WaterInjectorCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.ToTable("DrainageStrategies"); + }); + + modelBuilder.Entity("api.Models.DrillingSchedule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("DrillingSchedule"); + }); + + modelBuilder.Entity("api.Models.Exploration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("RigMobDemob") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.ToTable("Explorations"); + }); + + modelBuilder.Entity("api.Models.ExplorationOperationalWellCosts", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AppraisalProjectDrillingCosts") + .HasColumnType("float"); + + b.Property("AppraisalRigMobDemob") + .HasColumnType("float"); + + b.Property("ExplorationProjectDrillingCosts") + .HasColumnType("float"); + + b.Property("ExplorationRigMobDemob") + .HasColumnType("float"); + + b.Property("ExplorationRigUpgrading") + .HasColumnType("float"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId") + .IsUnique(); + + b.ToTable("ExplorationOperationalWellCosts"); + }); + + modelBuilder.Entity("api.Models.ExplorationWell", b => + { + b.Property("ExplorationId") + .HasColumnType("uniqueidentifier"); + + b.Property("WellId") + .HasColumnType("uniqueidentifier"); + + b.Property("DrillingScheduleId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("ExplorationId", "WellId"); + + b.HasIndex("DrillingScheduleId"); + + b.HasIndex("WellId"); + + b.ToTable("ExplorationWell"); + }); + + modelBuilder.Entity("api.Models.ExplorationWellCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Exploration.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Override") + .HasColumnType("bit"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Exploration.Id") + .IsUnique(); + + b.ToTable("ExplorationWellCostProfile"); + }); + + modelBuilder.Entity("api.Models.FuelFlaringAndLosses", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DrainageStrategy.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DrainageStrategy.Id") + .IsUnique(); + + b.ToTable("FuelFlaringAndLosses"); + }); + + modelBuilder.Entity("api.Models.GAndGAdminCost", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Exploration.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Exploration.Id") + .IsUnique(); + + b.ToTable("GAndGAdminCost"); + }); + + modelBuilder.Entity("api.Models.GasInjectorCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.Property("WellProject.Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("WellProject.Id") + .IsUnique(); + + b.ToTable("GasInjectorCostProfile"); + }); + + modelBuilder.Entity("api.Models.GasProducerCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.Property("WellProject.Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("WellProject.Id") + .IsUnique(); + + b.ToTable("GasProducerCostProfile"); + }); + + modelBuilder.Entity("api.Models.ImportedElectricity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DrainageStrategy.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DrainageStrategy.Id") + .IsUnique(); + + b.ToTable("ImportedElectricity"); + }); + + modelBuilder.Entity("api.Models.NetSalesGas", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DrainageStrategy.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DrainageStrategy.Id") + .IsUnique(); + + b.ToTable("NetSalesGas"); + }); + + modelBuilder.Entity("api.Models.OilProducerCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.Property("WellProject.Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("WellProject.Id") + .IsUnique(); + + b.ToTable("OilProducerCostProfile"); + }); + + modelBuilder.Entity("api.Models.ProductionProfileGas", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DrainageStrategy.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DrainageStrategy.Id") + .IsUnique(); + + b.ToTable("ProductionProfileGas"); + }); + + modelBuilder.Entity("api.Models.ProductionProfileNGL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DrainageStrategy.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DrainageStrategy.Id") + .IsUnique(); + + b.ToTable("ProductionProfileNGL"); + }); + + modelBuilder.Entity("api.Models.ProductionProfileOil", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DrainageStrategy.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DrainageStrategy.Id") + .IsUnique(); + + b.ToTable("ProductionProfileOil"); + }); + + modelBuilder.Entity("api.Models.ProductionProfileWater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DrainageStrategy.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DrainageStrategy.Id") + .IsUnique(); + + b.ToTable("ProductionProfileWater"); + }); + + modelBuilder.Entity("api.Models.ProductionProfileWaterInjection", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DrainageStrategy.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DrainageStrategy.Id") + .IsUnique(); + + b.ToTable("ProductionProfileWaterInjection"); + }); + + modelBuilder.Entity("api.Models.Project", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AverageDevelopmentDrillingDays") + .HasColumnType("float"); + + b.Property("CO2EmissionFromFuelGas") + .HasColumnType("float"); + + b.Property("CO2EmissionsFromFlaredGas") + .HasColumnType("float"); + + b.Property("CO2RemovedFromGas") + .HasColumnType("float"); + + b.Property("CO2Vented") + .HasColumnType("float"); + + b.Property("CommonLibraryId") + .HasColumnType("uniqueidentifier"); + + b.Property("CommonLibraryName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Country") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateDate") + .HasColumnType("datetimeoffset"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("DailyEmissionFromDrillingRig") + .HasColumnType("float"); + + b.Property("Description") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FlaredGasPerProducedVolume") + .HasColumnType("float"); + + b.Property("FusionProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PhysicalUnit") + .HasColumnType("int"); + + b.Property("ProjectCategory") + .HasColumnType("int"); + + b.Property("ProjectPhase") + .HasColumnType("int"); + + b.Property("SharepointSiteUrl") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Projects"); + }); + + modelBuilder.Entity("api.Models.SeismicAcquisitionAndProcessing", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Exploration.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Exploration.Id") + .IsUnique(); + + b.ToTable("SeismicAcquisitionAndProcessing"); + }); + + modelBuilder.Entity("api.Models.SidetrackCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Exploration.Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Override") + .HasColumnType("bit"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Exploration.Id") + .IsUnique(); + + b.ToTable("SidetrackCostProfile"); + }); + + modelBuilder.Entity("api.Models.Substructure", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApprovedBy") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Concept") + .HasColumnType("int"); + + b.Property("CostYear") + .HasColumnType("int"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("DG3Date") + .HasColumnType("datetimeoffset"); + + b.Property("DG4Date") + .HasColumnType("datetimeoffset"); + + b.Property("DryWeight") + .HasColumnType("float"); + + b.Property("LastChangedDate") + .HasColumnType("datetimeoffset"); + + b.Property("Maturity") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProspVersion") + .HasColumnType("datetimeoffset"); + + b.Property("Source") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.ToTable("Substructures"); + }); + + modelBuilder.Entity("api.Models.SubstructureCessationCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.Property("Substructure.Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Substructure.Id") + .IsUnique(); + + b.ToTable("SubstructureCessationCostProfiles"); + }); + + modelBuilder.Entity("api.Models.SubstructureCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.Property("Substructure.Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Substructure.Id") + .IsUnique(); + + b.ToTable("SubstructureCostProfiles"); + }); + + modelBuilder.Entity("api.Models.Surf", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApprovedBy") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ArtificialLift") + .HasColumnType("int"); + + b.Property("CessationCost") + .HasColumnType("float"); + + b.Property("CostYear") + .HasColumnType("int"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("DG3Date") + .HasColumnType("datetimeoffset"); + + b.Property("DG4Date") + .HasColumnType("datetimeoffset"); + + b.Property("GasInjectorCount") + .HasColumnType("int"); + + b.Property("InfieldPipelineSystemLength") + .HasColumnType("float"); + + b.Property("LastChangedDate") + .HasColumnType("datetimeoffset"); + + b.Property("Maturity") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ProducerCount") + .HasColumnType("int"); + + b.Property("ProductionFlowline") + .HasColumnType("int"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProspVersion") + .HasColumnType("datetimeoffset"); + + b.Property("RiserCount") + .HasColumnType("int"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("TemplateCount") + .HasColumnType("int"); + + b.Property("UmbilicalSystemLength") + .HasColumnType("float"); + + b.Property("WaterInjectorCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.ToTable("Surfs"); + }); + + modelBuilder.Entity("api.Models.SurfCessationCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.Property("Surf.Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Surf.Id") + .IsUnique(); + + b.ToTable("SurfCessationCostProfiles"); + }); + + modelBuilder.Entity("api.Models.SurfCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.Property("Surf.Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Surf.Id") + .IsUnique(); + + b.ToTable("SurfCostProfile"); + }); + + modelBuilder.Entity("api.Models.Topside", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApprovedBy") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ArtificialLift") + .HasColumnType("int"); + + b.Property("CO2OnMaxGasProfile") + .HasColumnType("float"); + + b.Property("CO2OnMaxOilProfile") + .HasColumnType("float"); + + b.Property("CO2OnMaxWaterInjectionProfile") + .HasColumnType("float"); + + b.Property("CO2ShareGasProfile") + .HasColumnType("float"); + + b.Property("CO2ShareOilProfile") + .HasColumnType("float"); + + b.Property("CO2ShareWaterInjectionProfile") + .HasColumnType("float"); + + b.Property("CostYear") + .HasColumnType("int"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("DG3Date") + .HasColumnType("datetimeoffset"); + + b.Property("DG4Date") + .HasColumnType("datetimeoffset"); + + b.Property("DryWeight") + .HasColumnType("float"); + + b.Property("FacilityOpex") + .HasColumnType("float"); + + b.Property("FlaredGas") + .HasColumnType("float"); + + b.Property("FuelConsumption") + .HasColumnType("float"); + + b.Property("GasCapacity") + .HasColumnType("float"); + + b.Property("GasInjectorCount") + .HasColumnType("int"); + + b.Property("LastChangedDate") + .HasColumnType("datetimeoffset"); + + b.Property("Maturity") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OilCapacity") + .HasColumnType("float"); + + b.Property("PeakElectricityImported") + .HasColumnType("float"); + + b.Property("ProducerCount") + .HasColumnType("int"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProspVersion") + .HasColumnType("datetimeoffset"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("WaterInjectionCapacity") + .HasColumnType("float"); + + b.Property("WaterInjectorCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.ToTable("Topsides"); + }); + + modelBuilder.Entity("api.Models.TopsideCessationCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.Property("Topside.Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Topside.Id") + .IsUnique(); + + b.ToTable("TopsideCessationCostProfiles"); + }); + + modelBuilder.Entity("api.Models.TopsideCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.Property("Topside.Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Topside.Id") + .IsUnique(); + + b.ToTable("TopsideCostProfiles"); + }); + + modelBuilder.Entity("api.Models.Transport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CostYear") + .HasColumnType("int"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("DG3Date") + .HasColumnType("datetimeoffset"); + + b.Property("DG4Date") + .HasColumnType("datetimeoffset"); + + b.Property("GasExportPipelineLength") + .HasColumnType("float"); + + b.Property("LastChangedDate") + .HasColumnType("datetimeoffset"); + + b.Property("Maturity") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OilExportPipelineLength") + .HasColumnType("float"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProspVersion") + .HasColumnType("datetimeoffset"); + + b.Property("Source") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.ToTable("Transports"); + }); + + modelBuilder.Entity("api.Models.TransportCessationCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.Property("Transport.Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Transport.Id") + .IsUnique(); + + b.ToTable("TransportCessationCostProfiles"); + }); + + modelBuilder.Entity("api.Models.TransportCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.Property("Transport.Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Transport.Id") + .IsUnique(); + + b.ToTable("TransportCostProfile"); + }); + + modelBuilder.Entity("api.Models.WaterInjectorCostProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EPAVersion") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("InternalData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.Property("WellProject.Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("WellProject.Id") + .IsUnique(); + + b.ToTable("WaterInjectorCostProfile"); + }); + + modelBuilder.Entity("api.Models.Well", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DrillingDays") + .HasColumnType("float"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("PlugingAndAbandonmentCost") + .HasColumnType("float"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("WellCategory") + .HasColumnType("int"); + + b.Property("WellCost") + .HasColumnType("float"); + + b.Property("WellInterventionCost") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.ToTable("Wells"); + }); + + modelBuilder.Entity("api.Models.WellProject", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ArtificialLift") + .HasColumnType("int"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.ToTable("WellProjects"); + }); + + modelBuilder.Entity("api.Models.WellProjectWell", b => + { + b.Property("WellProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("WellId") + .HasColumnType("uniqueidentifier"); + + b.Property("DrillingScheduleId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("WellProjectId", "WellId"); + + b.HasIndex("DrillingScheduleId"); + + b.HasIndex("WellId"); + + b.ToTable("WellProjectWell"); + }); + + modelBuilder.Entity("api.Models.AppraisalWellCostProfile", b => + { + b.HasOne("api.Models.Exploration", "Exploration") + .WithOne("AppraisalWellCostProfile") + .HasForeignKey("api.Models.AppraisalWellCostProfile", "Exploration.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Exploration"); + }); + + modelBuilder.Entity("api.Models.Case", b => + { + b.HasOne("api.Models.Project", "Project") + .WithMany("Cases") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Project"); + }); + + modelBuilder.Entity("api.Models.Co2Emissions", b => + { + b.HasOne("api.Models.DrainageStrategy", "DrainageStrategy") + .WithOne("Co2Emissions") + .HasForeignKey("api.Models.Co2Emissions", "DrainageStrategy.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DrainageStrategy"); + }); + + modelBuilder.Entity("api.Models.CountryOfficeCost", b => + { + b.HasOne("api.Models.Exploration", "Exploration") + .WithOne("CountryOfficeCost") + .HasForeignKey("api.Models.CountryOfficeCost", "Exploration.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Exploration"); + }); + + modelBuilder.Entity("api.Models.DevelopmentOperationalWellCosts", b => + { + b.HasOne("api.Models.Project", "Project") + .WithOne("DevelopmentOperationalWellCosts") + .HasForeignKey("api.Models.DevelopmentOperationalWellCosts", "ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Project"); + }); + + modelBuilder.Entity("api.Models.DrainageStrategy", b => + { + b.HasOne("api.Models.Project", "Project") + .WithMany("DrainageStrategies") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Project"); + }); + + modelBuilder.Entity("api.Models.Exploration", b => + { + b.HasOne("api.Models.Project", "Project") + .WithMany("Explorations") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Project"); + }); + + modelBuilder.Entity("api.Models.ExplorationOperationalWellCosts", b => + { + b.HasOne("api.Models.Project", "Project") + .WithOne("ExplorationOperationalWellCosts") + .HasForeignKey("api.Models.ExplorationOperationalWellCosts", "ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Project"); + }); + + modelBuilder.Entity("api.Models.ExplorationWell", b => + { + b.HasOne("api.Models.DrillingSchedule", "DrillingSchedule") + .WithMany() + .HasForeignKey("DrillingScheduleId"); + + b.HasOne("api.Models.Exploration", "Exploration") + .WithMany("ExplorationWells") + .HasForeignKey("ExplorationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("api.Models.Well", "Well") + .WithMany("ExplorationWells") + .HasForeignKey("WellId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("DrillingSchedule"); + + b.Navigation("Exploration"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("api.Models.ExplorationWellCostProfile", b => + { + b.HasOne("api.Models.Exploration", "Exploration") + .WithOne("ExplorationWellCostProfile") + .HasForeignKey("api.Models.ExplorationWellCostProfile", "Exploration.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Exploration"); + }); + + modelBuilder.Entity("api.Models.FuelFlaringAndLosses", b => + { + b.HasOne("api.Models.DrainageStrategy", "DrainageStrategy") + .WithOne("FuelFlaringAndLosses") + .HasForeignKey("api.Models.FuelFlaringAndLosses", "DrainageStrategy.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DrainageStrategy"); + }); + + modelBuilder.Entity("api.Models.GAndGAdminCost", b => + { + b.HasOne("api.Models.Exploration", "Exploration") + .WithOne("GAndGAdminCost") + .HasForeignKey("api.Models.GAndGAdminCost", "Exploration.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Exploration"); + }); + + modelBuilder.Entity("api.Models.GasInjectorCostProfile", b => + { + b.HasOne("api.Models.WellProject", "WellProject") + .WithOne("GasInjectorCostProfile") + .HasForeignKey("api.Models.GasInjectorCostProfile", "WellProject.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WellProject"); + }); + + modelBuilder.Entity("api.Models.GasProducerCostProfile", b => + { + b.HasOne("api.Models.WellProject", "WellProject") + .WithOne("GasProducerCostProfile") + .HasForeignKey("api.Models.GasProducerCostProfile", "WellProject.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WellProject"); + }); + + modelBuilder.Entity("api.Models.ImportedElectricity", b => + { + b.HasOne("api.Models.DrainageStrategy", "DrainageStrategy") + .WithOne("ImportedElectricity") + .HasForeignKey("api.Models.ImportedElectricity", "DrainageStrategy.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DrainageStrategy"); + }); + + modelBuilder.Entity("api.Models.NetSalesGas", b => + { + b.HasOne("api.Models.DrainageStrategy", "DrainageStrategy") + .WithOne("NetSalesGas") + .HasForeignKey("api.Models.NetSalesGas", "DrainageStrategy.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DrainageStrategy"); + }); + + modelBuilder.Entity("api.Models.OilProducerCostProfile", b => + { + b.HasOne("api.Models.WellProject", "WellProject") + .WithOne("OilProducerCostProfile") + .HasForeignKey("api.Models.OilProducerCostProfile", "WellProject.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WellProject"); + }); + + modelBuilder.Entity("api.Models.ProductionProfileGas", b => + { + b.HasOne("api.Models.DrainageStrategy", "DrainageStrategy") + .WithOne("ProductionProfileGas") + .HasForeignKey("api.Models.ProductionProfileGas", "DrainageStrategy.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DrainageStrategy"); + }); + + modelBuilder.Entity("api.Models.ProductionProfileNGL", b => + { + b.HasOne("api.Models.DrainageStrategy", "DrainageStrategy") + .WithOne("ProductionProfileNGL") + .HasForeignKey("api.Models.ProductionProfileNGL", "DrainageStrategy.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DrainageStrategy"); + }); + + modelBuilder.Entity("api.Models.ProductionProfileOil", b => + { + b.HasOne("api.Models.DrainageStrategy", "DrainageStrategy") + .WithOne("ProductionProfileOil") + .HasForeignKey("api.Models.ProductionProfileOil", "DrainageStrategy.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DrainageStrategy"); + }); + + modelBuilder.Entity("api.Models.ProductionProfileWater", b => + { + b.HasOne("api.Models.DrainageStrategy", "DrainageStrategy") + .WithOne("ProductionProfileWater") + .HasForeignKey("api.Models.ProductionProfileWater", "DrainageStrategy.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DrainageStrategy"); + }); + + modelBuilder.Entity("api.Models.ProductionProfileWaterInjection", b => + { + b.HasOne("api.Models.DrainageStrategy", "DrainageStrategy") + .WithOne("ProductionProfileWaterInjection") + .HasForeignKey("api.Models.ProductionProfileWaterInjection", "DrainageStrategy.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DrainageStrategy"); + }); + + modelBuilder.Entity("api.Models.SeismicAcquisitionAndProcessing", b => + { + b.HasOne("api.Models.Exploration", "Exploration") + .WithOne("SeismicAcquisitionAndProcessing") + .HasForeignKey("api.Models.SeismicAcquisitionAndProcessing", "Exploration.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Exploration"); + }); + + modelBuilder.Entity("api.Models.SidetrackCostProfile", b => + { + b.HasOne("api.Models.Exploration", "Exploration") + .WithOne("SidetrackCostProfile") + .HasForeignKey("api.Models.SidetrackCostProfile", "Exploration.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Exploration"); + }); + + modelBuilder.Entity("api.Models.Substructure", b => + { + b.HasOne("api.Models.Project", "Project") + .WithMany("Substructures") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Project"); + }); + + modelBuilder.Entity("api.Models.SubstructureCessationCostProfile", b => + { + b.HasOne("api.Models.Substructure", "Substructure") + .WithOne("CessationCostProfile") + .HasForeignKey("api.Models.SubstructureCessationCostProfile", "Substructure.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Substructure"); + }); + + modelBuilder.Entity("api.Models.SubstructureCostProfile", b => + { + b.HasOne("api.Models.Substructure", "Substructure") + .WithOne("CostProfile") + .HasForeignKey("api.Models.SubstructureCostProfile", "Substructure.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Substructure"); + }); + + modelBuilder.Entity("api.Models.Surf", b => + { + b.HasOne("api.Models.Project", "Project") + .WithMany("Surfs") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Project"); + }); + + modelBuilder.Entity("api.Models.SurfCessationCostProfile", b => + { + b.HasOne("api.Models.Surf", "Surf") + .WithOne("CessationCostProfile") + .HasForeignKey("api.Models.SurfCessationCostProfile", "Surf.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Surf"); + }); + + modelBuilder.Entity("api.Models.SurfCostProfile", b => + { + b.HasOne("api.Models.Surf", "Surf") + .WithOne("CostProfile") + .HasForeignKey("api.Models.SurfCostProfile", "Surf.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Surf"); + }); + + modelBuilder.Entity("api.Models.Topside", b => + { + b.HasOne("api.Models.Project", "Project") + .WithMany("Topsides") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Project"); + }); + + modelBuilder.Entity("api.Models.TopsideCessationCostProfile", b => + { + b.HasOne("api.Models.Topside", "Topside") + .WithOne("CessationCostProfile") + .HasForeignKey("api.Models.TopsideCessationCostProfile", "Topside.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Topside"); + }); + + modelBuilder.Entity("api.Models.TopsideCostProfile", b => + { + b.HasOne("api.Models.Topside", "Topside") + .WithOne("CostProfile") + .HasForeignKey("api.Models.TopsideCostProfile", "Topside.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Topside"); + }); + + modelBuilder.Entity("api.Models.Transport", b => + { + b.HasOne("api.Models.Project", "Project") + .WithMany("Transports") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Project"); + }); + + modelBuilder.Entity("api.Models.TransportCessationCostProfile", b => + { + b.HasOne("api.Models.Transport", "Transport") + .WithOne("CessationCostProfile") + .HasForeignKey("api.Models.TransportCessationCostProfile", "Transport.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Transport"); + }); + + modelBuilder.Entity("api.Models.TransportCostProfile", b => + { + b.HasOne("api.Models.Transport", "Transport") + .WithOne("CostProfile") + .HasForeignKey("api.Models.TransportCostProfile", "Transport.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Transport"); + }); + + modelBuilder.Entity("api.Models.WaterInjectorCostProfile", b => + { + b.HasOne("api.Models.WellProject", "WellProject") + .WithOne("WaterInjectorCostProfile") + .HasForeignKey("api.Models.WaterInjectorCostProfile", "WellProject.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WellProject"); + }); + + modelBuilder.Entity("api.Models.Well", b => + { + b.HasOne("api.Models.Project", "Project") + .WithMany("Wells") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Project"); + }); + + modelBuilder.Entity("api.Models.WellProject", b => + { + b.HasOne("api.Models.Project", "Project") + .WithMany("WellProjects") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Project"); + }); + + modelBuilder.Entity("api.Models.WellProjectWell", b => + { + b.HasOne("api.Models.DrillingSchedule", "DrillingSchedule") + .WithMany() + .HasForeignKey("DrillingScheduleId"); + + b.HasOne("api.Models.Well", "Well") + .WithMany("WellProjectWells") + .HasForeignKey("WellId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.HasOne("api.Models.WellProject", "WellProject") + .WithMany("WellProjectWells") + .HasForeignKey("WellProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DrillingSchedule"); + + b.Navigation("Well"); + + b.Navigation("WellProject"); + }); + + modelBuilder.Entity("api.Models.DrainageStrategy", b => + { + b.Navigation("Co2Emissions"); + + b.Navigation("FuelFlaringAndLosses"); + + b.Navigation("ImportedElectricity"); + + b.Navigation("NetSalesGas"); + + b.Navigation("ProductionProfileGas"); + + b.Navigation("ProductionProfileNGL"); + + b.Navigation("ProductionProfileOil"); + + b.Navigation("ProductionProfileWater"); + + b.Navigation("ProductionProfileWaterInjection"); + }); + + modelBuilder.Entity("api.Models.Exploration", b => + { + b.Navigation("AppraisalWellCostProfile"); + + b.Navigation("CountryOfficeCost"); + + b.Navigation("ExplorationWellCostProfile"); + + b.Navigation("ExplorationWells"); + + b.Navigation("GAndGAdminCost"); + + b.Navigation("SeismicAcquisitionAndProcessing"); + + b.Navigation("SidetrackCostProfile"); + }); + + modelBuilder.Entity("api.Models.Project", b => + { + b.Navigation("Cases"); + + b.Navigation("DevelopmentOperationalWellCosts"); + + b.Navigation("DrainageStrategies"); + + b.Navigation("ExplorationOperationalWellCosts"); + + b.Navigation("Explorations"); + + b.Navigation("Substructures"); + + b.Navigation("Surfs"); + + b.Navigation("Topsides"); + + b.Navigation("Transports"); + + b.Navigation("WellProjects"); + + b.Navigation("Wells"); + }); + + modelBuilder.Entity("api.Models.Substructure", b => + { + b.Navigation("CessationCostProfile"); + + b.Navigation("CostProfile"); + }); + + modelBuilder.Entity("api.Models.Surf", b => + { + b.Navigation("CessationCostProfile"); + + b.Navigation("CostProfile"); + }); + + modelBuilder.Entity("api.Models.Topside", b => + { + b.Navigation("CessationCostProfile"); + + b.Navigation("CostProfile"); + }); + + modelBuilder.Entity("api.Models.Transport", b => + { + b.Navigation("CessationCostProfile"); + + b.Navigation("CostProfile"); + }); + + modelBuilder.Entity("api.Models.Well", b => + { + b.Navigation("ExplorationWells"); + + b.Navigation("WellProjectWells"); + }); + + modelBuilder.Entity("api.Models.WellProject", b => + { + b.Navigation("GasInjectorCostProfile"); + + b.Navigation("GasProducerCostProfile"); + + b.Navigation("OilProducerCostProfile"); + + b.Navigation("WaterInjectorCostProfile"); + + b.Navigation("WellProjectWells"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/backend/api/Migrations/20221117090633_RemoveWellProjectProperties.cs b/backend/api/Migrations/20221117090633_RemoveWellProjectProperties.cs new file mode 100644 index 000000000..5ddb4d98e --- /dev/null +++ b/backend/api/Migrations/20221117090633_RemoveWellProjectProperties.cs @@ -0,0 +1,48 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace api.Migrations +{ + public partial class RemoveWellProjectProperties : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "AnnualWellInterventionCost", + table: "WellProjects"); + + migrationBuilder.DropColumn( + name: "PluggingAndAbandonment", + table: "WellProjects"); + + migrationBuilder.DropColumn( + name: "RigMobDemob", + table: "WellProjects"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "AnnualWellInterventionCost", + table: "WellProjects", + type: "float", + nullable: false, + defaultValue: 0.0); + + migrationBuilder.AddColumn( + name: "PluggingAndAbandonment", + table: "WellProjects", + type: "float", + nullable: false, + defaultValue: 0.0); + + migrationBuilder.AddColumn( + name: "RigMobDemob", + table: "WellProjects", + type: "float", + nullable: false, + defaultValue: 0.0); + } + } +} diff --git a/backend/api/Migrations/DcdDbContextModelSnapshot.cs b/backend/api/Migrations/DcdDbContextModelSnapshot.cs index 94ccfd120..6d6335f00 100644 --- a/backend/api/Migrations/DcdDbContextModelSnapshot.cs +++ b/backend/api/Migrations/DcdDbContextModelSnapshot.cs @@ -1494,9 +1494,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("AnnualWellInterventionCost") - .HasColumnType("float"); - b.Property("ArtificialLift") .HasColumnType("int"); @@ -1507,15 +1504,9 @@ protected override void BuildModel(ModelBuilder modelBuilder) .IsRequired() .HasColumnType("nvarchar(max)"); - b.Property("PluggingAndAbandonment") - .HasColumnType("float"); - b.Property("ProjectId") .HasColumnType("uniqueidentifier"); - b.Property("RigMobDemob") - .HasColumnType("float"); - b.HasKey("Id"); b.HasIndex("ProjectId"); diff --git a/backend/api/Models/WellProject.cs b/backend/api/Models/WellProject.cs index ef87c236d..0abd3e771 100644 --- a/backend/api/Models/WellProject.cs +++ b/backend/api/Models/WellProject.cs @@ -13,14 +13,10 @@ public class WellProject public WaterInjectorCostProfile? WaterInjectorCostProfile { get; set; } public GasInjectorCostProfile? GasInjectorCostProfile { get; set; } public ArtificialLift ArtificialLift { get; set; } - public double RigMobDemob { get; set; } - public double AnnualWellInterventionCost { get; set; } - public double PluggingAndAbandonment { get; set; } public Currency Currency { get; set; } public ICollection? WellProjectWells { get; set; } } - public class OilProducerCostProfile : TimeSeriesCost { [ForeignKey("WellProject.Id")] diff --git a/backend/api/SampleData/Generators/SampleAssetGenerator.cs b/backend/api/SampleData/Generators/SampleAssetGenerator.cs index 4e1ce044a..8ec63e8b0 100644 --- a/backend/api/SampleData/Generators/SampleAssetGenerator.cs +++ b/backend/api/SampleData/Generators/SampleAssetGenerator.cs @@ -164,9 +164,6 @@ public static ProjectsBuilder initializeAssets() ) .WithWellProject(new WellProjectBuilder { - RigMobDemob = 100.0, - AnnualWellInterventionCost = 200.0, - PluggingAndAbandonment = 300.0, ArtificialLift = ArtificialLift.GasLift } ) @@ -390,7 +387,6 @@ public static WellProjectBuilder case2WellProject() return new WellProjectBuilder { Name = "SkarvenWellCase2", - AnnualWellInterventionCost = 85e6 } ; } diff --git a/backend/api/Services/GenerateCostProfiles/GenerateCessationCostProfile.cs b/backend/api/Services/GenerateCostProfiles/GenerateCessationCostProfile.cs index 84807a844..5bef95525 100644 --- a/backend/api/Services/GenerateCostProfiles/GenerateCessationCostProfile.cs +++ b/backend/api/Services/GenerateCostProfiles/GenerateCessationCostProfile.cs @@ -11,6 +11,7 @@ public class GenerateCessationCostProfile private readonly DrainageStrategyService _drainageStrategyService; private readonly WellProjectService _wellProjectService; private readonly SurfService _surfService; + private readonly ProjectService _projectService; public GenerateCessationCostProfile(ILoggerFactory loggerFactory, IServiceProvider serviceProvider) { @@ -19,11 +20,13 @@ public GenerateCessationCostProfile(ILoggerFactory loggerFactory, IServiceProvid _drainageStrategyService = serviceProvider.GetRequiredService(); _wellProjectService = serviceProvider.GetRequiredService(); _surfService = serviceProvider.GetRequiredService(); + _projectService = serviceProvider.GetRequiredService(); } public CessationCostDto Generate(Guid caseId) { var caseItem = _caseService.GetCase(caseId); + var project = _projectService.GetProjectWithoutAssets(caseItem.ProjectId); var cessationWells = new TimeSeries(); var cessationOffshoreFacilities = new TimeSeries(); @@ -38,7 +41,7 @@ public CessationCostDto Generate(Guid caseId) var linkedWells = wellProject.WellProjectWells?.Where(ew => Well.IsWellProjectWell(ew.Well.WellCategory)).ToList(); if (linkedWells != null) { - var pluggingAndAbandonment = wellProject.PluggingAndAbandonment; + var pluggingAndAbandonment = project.DevelopmentOperationalWellCosts?.PluggingAndAbandonment ?? 0; var sumDrilledWells = 0; foreach (var well in linkedWells) diff --git a/backend/api/Services/GenerateCostProfiles/GenerateOpexCostProfile.cs b/backend/api/Services/GenerateCostProfiles/GenerateOpexCostProfile.cs index 12f851f16..23ef0b540 100644 --- a/backend/api/Services/GenerateCostProfiles/GenerateOpexCostProfile.cs +++ b/backend/api/Services/GenerateCostProfiles/GenerateOpexCostProfile.cs @@ -10,6 +10,7 @@ public class GenerateOpexCostProfile private readonly ILogger _logger; private readonly DrainageStrategyService _drainageStrategyService; private readonly WellProjectService _wellProjectService; + private readonly ProjectService _projectService; private readonly TopsideService _topsideService; public GenerateOpexCostProfile(ILoggerFactory loggerFactory, IServiceProvider serviceProvider) @@ -19,13 +20,28 @@ public GenerateOpexCostProfile(ILoggerFactory loggerFactory, IServiceProvider se _caseService = serviceProvider.GetRequiredService(); _wellProjectService = serviceProvider.GetRequiredService(); _topsideService = serviceProvider.GetRequiredService(); + _projectService = serviceProvider.GetRequiredService(); } public OpexCostProfileDto Generate(Guid caseId) { - var wellInterventionCost = CalculateWellInterventionCostProfile(caseId); + var caseItem = _caseService.GetCase(caseId); + var project = _projectService.GetProjectWithoutAssets(caseItem.ProjectId); + + var drainageStrategy = _drainageStrategyService.GetDrainageStrategy(caseItem.DrainageStrategyLink); + TimeSeries wellInterventionCost; + TimeSeries offshoreFacilitiesOperationsCost; - var offshoreFacilitiesOperationsCost = CalculateOffshoreFacilitiesOperationsCostProfile(caseId); + if (drainageStrategy != null) + { + wellInterventionCost = CalculateWellInterventionCostProfile(caseItem, project, drainageStrategy); + offshoreFacilitiesOperationsCost = CalculateOffshoreFacilitiesOperationsCostProfile(caseItem, drainageStrategy); + } + else + { + wellInterventionCost = CalculateWellInterventionCostProfile(caseItem, project, new DrainageStrategy()); + offshoreFacilitiesOperationsCost = new TimeSeries(); + } var OPEX = TimeSeriesCost.MergeCostProfiles(wellInterventionCost, offshoreFacilitiesOperationsCost); if (OPEX == null) { return new OpexCostProfileDto(); } @@ -38,19 +54,8 @@ public OpexCostProfileDto Generate(Guid caseId) return opexDto ?? new OpexCostProfileDto(); } - public TimeSeries CalculateWellInterventionCostProfile(Guid caseId) + public TimeSeries CalculateWellInterventionCostProfile(Case caseItem, Project project, DrainageStrategy drainageStrategy) { - var caseItem = _caseService.GetCase(caseId); - - var drainageStrategy = new DrainageStrategy(); - try - { - drainageStrategy = _drainageStrategyService.GetDrainageStrategy(caseItem.DrainageStrategyLink); - } - catch (ArgumentException) - { - _logger.LogInformation("DrainageStrategy {0} not found.", caseItem.DrainageStrategyLink); - } var lastYear = drainageStrategy?.ProductionProfileOil == null ? 0 : drainageStrategy.ProductionProfileOil.StartYear + drainageStrategy.ProductionProfileOil.Values.Length; WellProject wellProject; @@ -87,7 +92,7 @@ public TimeSeries CalculateWellInterventionCostProfile(Guid caseId) var cumulativeDrillingSchedule = GetCumulativeDrillingSchedule(tempSeries); cumulativeDrillingSchedule.StartYear = tempSeries.StartYear; - var interventionCost = wellProject.AnnualWellInterventionCost; + var interventionCost = project.DevelopmentOperationalWellCosts?.AnnualWellInterventionCostPerWell ?? 0; var wellInterventionCostValues = cumulativeDrillingSchedule.Values.Select(v => v * interventionCost).ToArray(); @@ -114,21 +119,9 @@ public TimeSeries CalculateWellInterventionCostProfile(Guid caseId) return wellInterventionCostsFromDrillingSchedule; } - public TimeSeries CalculateOffshoreFacilitiesOperationsCostProfile(Guid caseId) + public TimeSeries CalculateOffshoreFacilitiesOperationsCostProfile(Case caseItem, DrainageStrategy drainageStrategy) { - var caseItem = _caseService.GetCase(caseId); - - DrainageStrategy drainageStrategy; - try - { - drainageStrategy = _drainageStrategyService.GetDrainageStrategy(caseItem.DrainageStrategyLink); - } - catch (ArgumentException) - { - _logger.LogInformation("DrainageStrategy {0} not found.", caseItem.DrainageStrategyLink); - return new TimeSeries(); - } - if (drainageStrategy?.ProductionProfileOil == null) { return new TimeSeries(); } + if (drainageStrategy.ProductionProfileOil == null) { return new TimeSeries(); } var firstYear = drainageStrategy.ProductionProfileOil.StartYear; var lastYear = drainageStrategy.ProductionProfileOil.StartYear + drainageStrategy.ProductionProfileOil.Values.Length; diff --git a/backend/api/Services/GenerateCostProfiles/GenerateStudyCostProfile.cs b/backend/api/Services/GenerateCostProfiles/GenerateStudyCostProfile.cs index 2985c70d3..a88b079de 100644 --- a/backend/api/Services/GenerateCostProfiles/GenerateStudyCostProfile.cs +++ b/backend/api/Services/GenerateCostProfiles/GenerateStudyCostProfile.cs @@ -29,8 +29,13 @@ public GenerateStudyCostProfile(ILoggerFactory loggerFactory, IServiceProvider s public StudyCostProfileDto Generate(Guid caseId) { - var feasibility = CalculateTotalFeasibilityAndConceptStudies(caseId); - var feed = CalculateTotalFEEDStudies(caseId); + var caseItem = _caseService.GetCase(caseId); + + var sumFacilityCost = SumAllCostFacility(caseItem); + var sumWellCost = SumWellCost(caseItem); + + var feasibility = CalculateTotalFeasibilityAndConceptStudies(caseItem, sumFacilityCost, sumWellCost); + var feed = CalculateTotalFEEDStudies(caseItem, sumFacilityCost, sumWellCost); if (feasibility.Values.Length == 0 && feed.Values.Length == 0) { @@ -47,13 +52,8 @@ public StudyCostProfileDto Generate(Guid caseId) return dto; } - public TimeSeries CalculateTotalFeasibilityAndConceptStudies(Guid caseId) + public TimeSeries CalculateTotalFeasibilityAndConceptStudies(Case caseItem, double sumFacilityCost, double sumWellCost) { - var caseItem = _caseService.GetCase(caseId); - - var sumFacilityCost = SumAllCostFacility(caseId); - var sumWellCost = SumWellCost(caseId); - var totalFeasibilityAndConceptStudies = (sumFacilityCost + sumWellCost) * caseItem.CapexFactorFeasibilityStudies; var dg0 = caseItem.DG0Date; @@ -91,13 +91,8 @@ public TimeSeries CalculateTotalFeasibilityAndConceptStudies(Guid caseId return feasibilityAndConceptStudiesCost; } - public TimeSeries CalculateTotalFEEDStudies(Guid caseId) + public TimeSeries CalculateTotalFEEDStudies(Case caseItem, double sumFacilityCost, double sumWellCost) { - var caseItem = _caseService.GetCase(caseId); - - var sumFacilityCost = SumAllCostFacility(caseId); - var sumWellCost = SumWellCost(caseId); - var totalFeasibilityAndConceptStudies = (sumFacilityCost + sumWellCost) * caseItem.CapexFactorFEEDStudies; var dg2 = caseItem.DG2Date; @@ -137,10 +132,8 @@ public TimeSeries CalculateTotalFEEDStudies(Guid caseId) return feasibilityAndConceptStudiesCost; } - public double SumAllCostFacility(Guid caseId) + public double SumAllCostFacility(Case caseItem) { - var caseItem = _caseService.GetCase(caseId); - var sumFacilityCost = 0.0; Substructure substructure; @@ -202,10 +195,8 @@ public double SumAllCostFacility(Guid caseId) return sumFacilityCost; } - public double SumWellCost(Guid caseId) + public double SumWellCost(Case caseItem) { - var caseItem = _caseService.GetCase(caseId); - var sumWellCost = 0.0; WellProject wellProject; @@ -215,19 +206,19 @@ public double SumWellCost(Guid caseId) if (wellProject?.OilProducerCostProfile != null) { - sumWellCost = wellProject.OilProducerCostProfile.Values.Sum(); + sumWellCost += wellProject.OilProducerCostProfile.Values.Sum(); } if (wellProject?.GasProducerCostProfile != null) { - sumWellCost = wellProject.GasProducerCostProfile.Values.Sum(); + sumWellCost += wellProject.GasProducerCostProfile.Values.Sum(); } if (wellProject?.WaterInjectorCostProfile != null) { - sumWellCost = wellProject.WaterInjectorCostProfile.Values.Sum(); + sumWellCost += wellProject.WaterInjectorCostProfile.Values.Sum(); } if (wellProject?.GasInjectorCostProfile != null) { - sumWellCost = wellProject.GasInjectorCostProfile.Values.Sum(); + sumWellCost += wellProject.GasInjectorCostProfile.Values.Sum(); } } catch (ArgumentException) diff --git a/backend/tests/Services/WellProjectServiceShould.cs b/backend/tests/Services/WellProjectServiceShould.cs index 4d7a9dc43..6e4dc5386 100644 --- a/backend/tests/Services/WellProjectServiceShould.cs +++ b/backend/tests/Services/WellProjectServiceShould.cs @@ -196,9 +196,6 @@ private static WellProject CreateTestWellProject(Project project) { Name = "DrainStrat Test", ArtificialLift = ArtificialLift.ElectricalSubmergedPumps, - RigMobDemob = 2.2, - AnnualWellInterventionCost = 3.3, - PluggingAndAbandonment = 4.4, Project = project, ProjectId = project.Id, }; @@ -210,9 +207,6 @@ private static WellProjectDto CreateUpdatedWellProject(Project project) { Name = "updated name", ArtificialLift = ArtificialLift.GasLift, - RigMobDemob = 3.3, - AnnualWellInterventionCost = 4.4, - PluggingAndAbandonment = 5.5, Project = project, ProjectId = project.Id, } diff --git a/backend/tests/TestDataGenerator.cs b/backend/tests/TestDataGenerator.cs index 12174c807..c5d1f6797 100644 --- a/backend/tests/TestDataGenerator.cs +++ b/backend/tests/TestDataGenerator.cs @@ -109,7 +109,6 @@ public static WellProjectDto Case2WellProject() return new WellProjectDto { Name = "SkarvenWellCase2", - AnnualWellInterventionCost = 85e6, }; } public static ExplorationDto Case2Exploration() diff --git a/backend/tests/TestHelper.cs b/backend/tests/TestHelper.cs index a55e98e40..68a0822c8 100644 --- a/backend/tests/TestHelper.cs +++ b/backend/tests/TestHelper.cs @@ -470,11 +470,6 @@ public static void CompareWellProjects(WellProject expected, WellProject actual) } Assert.Equal(expected.Name, actual.Name); - Assert.Equal(expected.RigMobDemob, actual.RigMobDemob); - Assert.Equal(expected.AnnualWellInterventionCost, - actual.AnnualWellInterventionCost); - Assert.Equal(expected.PluggingAndAbandonment, - actual.PluggingAndAbandonment); Assert.Equal(expected.ArtificialLift, actual.ArtificialLift); } @@ -488,11 +483,6 @@ public static void CompareWellProjects(WellProject expected, WellProjectDto actu } Assert.Equal(expected.Name, actual.Name); - Assert.Equal(expected.RigMobDemob, actual.RigMobDemob); - Assert.Equal(expected.AnnualWellInterventionCost, - actual.AnnualWellInterventionCost); - Assert.Equal(expected.PluggingAndAbandonment, - actual.PluggingAndAbandonment); Assert.Equal(expected.ArtificialLift, actual.ArtificialLift); } @@ -511,11 +501,6 @@ public static void CompareWellProjects(WellProjectDto expected, WellProjectDto a } Assert.Equal(expected.Name, actual.Name); - Assert.Equal(expected.RigMobDemob, actual.RigMobDemob); - Assert.Equal(expected.AnnualWellInterventionCost, - actual.AnnualWellInterventionCost); - Assert.Equal(expected.PluggingAndAbandonment, - actual.PluggingAndAbandonment); Assert.Equal(expected.ArtificialLift, actual.ArtificialLift); } diff --git a/frontend/src/Views/WellProjectView.tsx b/frontend/src/Views/WellProjectView.tsx index 18e638130..ebbfcaf7b 100644 --- a/frontend/src/Views/WellProjectView.tsx +++ b/frontend/src/Views/WellProjectView.tsx @@ -78,10 +78,6 @@ function WellProjectView() { setWellProject(newWellProject) } setWellProjectName(newWellProject?.name!) - - setAnnualWellInterventionCost(newWellProject.annualWellInterventionCost) - setPluggingAndAbandonment(newWellProject.pluggingAndAbandonment) - setRigMobDemob(newWellProject.rigMobDemob) setCurrency(newWellProject.currency ?? 1) setArtificialLift(newWellProject.artificialLift) @@ -91,9 +87,6 @@ function WellProjectView() { useEffect(() => { const newWellProject: WellProject = { ...wellProject } - newWellProject.annualWellInterventionCost = annualWellInterventionCost - newWellProject.pluggingAndAbandonment = pluggingAndAbandonment - newWellProject.rigMobDemob = rigMobDemob newWellProject.currency = currency newWellProject.artificialLift = artificialLift setWellProject(newWellProject) diff --git a/frontend/src/models/assets/wellproject/WellProject.ts b/frontend/src/models/assets/wellproject/WellProject.ts index 198c4c4e0..c9c090ef8 100644 --- a/frontend/src/models/assets/wellproject/WellProject.ts +++ b/frontend/src/models/assets/wellproject/WellProject.ts @@ -15,9 +15,6 @@ export class WellProject implements Components.Schemas.WellProjectDto, IAsset { waterInjectorCostProfile?: WaterInjectorCostProfile gasInjectorCostProfile?: GasInjectorCostProfile artificialLift?: Components.Schemas.ArtificialLift | undefined - rigMobDemob?: number | undefined - annualWellInterventionCost?: number | undefined - pluggingAndAbandonment?: number | undefined currency?: Components.Schemas.Currency wellProjectWells?: WellProjectWell[] | null @@ -31,9 +28,6 @@ export class WellProject implements Components.Schemas.WellProjectDto, IAsset { this.waterInjectorCostProfile = WaterInjectorCostProfile.fromJSON(data.waterInjectorCostProfile) this.gasInjectorCostProfile = GasInjectorCostProfile.fromJSON(data.gasInjectorCostProfile) this.artificialLift = data.artificialLift ?? 0 - this.rigMobDemob = data.rigMobDemob ?? 0 - this.annualWellInterventionCost = data.annualWellInterventionCost ?? 0 - this.pluggingAndAbandonment = data.pluggingAndAbandonment ?? 0 this.currency = data.currency ?? 1 this.wellProjectWells = data.wellProjectWells?.map((wc) => new WellProjectWell(wc)) } else { diff --git a/frontend/src/types.d.ts b/frontend/src/types.d.ts index 2e946f649..5971e7bdf 100644 --- a/frontend/src/types.d.ts +++ b/frontend/src/types.d.ts @@ -624,9 +624,6 @@ declare namespace Components { waterInjectorCostProfile?: WaterInjectorCostProfileDto; gasInjectorCostProfile?: GasInjectorCostProfileDto; artificialLift?: ArtificialLift /* int32 */; - rigMobDemob?: number; // double - annualWellInterventionCost?: number; // double - pluggingAndAbandonment?: number; // double currency?: Currency /* int32 */; wellProjectWells?: WellProjectWellDto[] | null; }