diff --git a/backend/api/Adapters/TopsideAdapter.cs b/backend/api/Adapters/TopsideAdapter.cs index 8bf440fa8..eedc3d8ab 100644 --- a/backend/api/Adapters/TopsideAdapter.cs +++ b/backend/api/Adapters/TopsideAdapter.cs @@ -15,6 +15,7 @@ public static Topside Convert(TopsideDto topsideDto) DryWeight = topsideDto.DryWeight, OilCapacity = topsideDto.OilCapacity, GasCapacity = topsideDto.GasCapacity, + WaterInjectionCapacity = topsideDto.WaterInjectionCapacity, ArtificialLift = topsideDto.ArtificialLift, Maturity = topsideDto.Maturity, Currency = topsideDto.Currency, @@ -36,7 +37,7 @@ public static Topside Convert(TopsideDto topsideDto) ApprovedBy = topsideDto.ApprovedBy, DG3Date = topsideDto.DG3Date, DG4Date = topsideDto.DG4Date, - FacilityOpex = topsideDto.FacilityOpex + FacilityOpex = topsideDto.FacilityOpex, }; if (topsideDto.CostProfile != null) @@ -60,6 +61,7 @@ public static void ConvertExisting(Topside existing, TopsideDto topsideDto) existing.DryWeight = topsideDto.DryWeight; existing.OilCapacity = topsideDto.OilCapacity; existing.GasCapacity = topsideDto.GasCapacity; + existing.WaterInjectionCapacity = topsideDto.WaterInjectionCapacity; existing.ArtificialLift = topsideDto.ArtificialLift; existing.Maturity = topsideDto.Maturity; existing.Currency = topsideDto.Currency; @@ -85,12 +87,14 @@ public static void ConvertExisting(Topside existing, TopsideDto topsideDto) existing.DG4Date = topsideDto.DG4Date; existing.FacilityOpex = topsideDto.FacilityOpex; } + private static TopsideCostProfile? Convert(TopsideCostProfileDto? costprofile, Topside topside) { if (costprofile == null) { return null; } + var topsideCostProfile = new TopsideCostProfile { Id = costprofile.Id, @@ -98,26 +102,28 @@ public static void ConvertExisting(Topside existing, TopsideDto topsideDto) EPAVersion = costprofile.EPAVersion, Topside = topside, StartYear = costprofile.StartYear, - Values = costprofile.Values + Values = costprofile.Values, }; return topsideCostProfile; } - private static TopsideCessationCostProfile? Convert(TopsideCessationCostProfileDto? topsideCessationCostProfileDto, Topside topside) + private static TopsideCessationCostProfile? Convert(TopsideCessationCostProfileDto? topsideCessationCostProfileDto, + Topside topside) { if (topsideCessationCostProfileDto == null) { return null; } - TopsideCessationCostProfile topsideCessationCostProfile = new TopsideCessationCostProfile + + var topsideCessationCostProfile = new TopsideCessationCostProfile { Id = topsideCessationCostProfileDto.Id, Currency = topsideCessationCostProfileDto.Currency, EPAVersion = topsideCessationCostProfileDto.EPAVersion, Topside = topside, StartYear = topsideCessationCostProfileDto.StartYear, - Values = topsideCessationCostProfileDto.Values + Values = topsideCessationCostProfileDto.Values, }; return topsideCessationCostProfile; diff --git a/backend/api/Adapters/TopsideDtoAdapter.cs b/backend/api/Adapters/TopsideDtoAdapter.cs index 677c265cb..ae02bfefe 100644 --- a/backend/api/Adapters/TopsideDtoAdapter.cs +++ b/backend/api/Adapters/TopsideDtoAdapter.cs @@ -15,6 +15,7 @@ public static TopsideDto Convert(Topside topside) DryWeight = topside.DryWeight, OilCapacity = topside.OilCapacity, GasCapacity = topside.GasCapacity, + WaterInjectionCapacity = topside.WaterInjectionCapacity, ArtificialLift = topside.ArtificialLift, Maturity = topside.Maturity, Currency = topside.Currency, @@ -38,7 +39,7 @@ public static TopsideDto Convert(Topside topside) ApprovedBy = topside.ApprovedBy, DG3Date = topside.DG3Date, DG4Date = topside.DG4Date, - FacilityOpex = topside.FacilityOpex + FacilityOpex = topside.FacilityOpex, }; return topsideDto; } @@ -56,7 +57,7 @@ public static TopsideDto Convert(Topside topside) Currency = costProfile.Currency, EPAVersion = costProfile.EPAVersion, Values = costProfile.Values, - StartYear = costProfile.StartYear + StartYear = costProfile.StartYear, }; return topsideCostProfile; } @@ -68,13 +69,13 @@ public static TopsideDto Convert(Topside topside) return null; } - TopsideCessationCostProfileDto topsideCostProfile = new TopsideCessationCostProfileDto + var topsideCostProfile = new TopsideCessationCostProfileDto { Id = topsideCessationCostProfile.Id, Currency = topsideCessationCostProfile.Currency, EPAVersion = topsideCessationCostProfile.EPAVersion, Values = topsideCessationCostProfile.Values, - StartYear = topsideCessationCostProfile.StartYear + StartYear = topsideCessationCostProfile.StartYear, }; return topsideCostProfile; } diff --git a/backend/api/Dtos/TopsideDto.cs b/backend/api/Dtos/TopsideDto.cs index f98b9257e..195bbdf32 100644 --- a/backend/api/Dtos/TopsideDto.cs +++ b/backend/api/Dtos/TopsideDto.cs @@ -4,7 +4,6 @@ namespace api.Dtos; public class TopsideDto { - public Guid Id { get; set; } public string Name { get; set; } = string.Empty!; public Guid ProjectId { get; set; } @@ -13,6 +12,7 @@ public class TopsideDto public double DryWeight { get; set; } public double OilCapacity { get; set; } public double GasCapacity { get; set; } + public double WaterInjectionCapacity { get; set; } public ArtificialLift ArtificialLift { get; set; } public Maturity Maturity { get; set; } public Currency Currency { get; set; } @@ -39,10 +39,8 @@ public class TopsideDto public class TopsideCostProfileDto : TimeSeriesCostDto { - } public class TopsideCessationCostProfileDto : TimeSeriesCostDto { - } diff --git a/backend/api/Helpers/EmissionCalculationHelper.cs b/backend/api/Helpers/EmissionCalculationHelper.cs index 2360eb666..b8bf47011 100644 --- a/backend/api/Helpers/EmissionCalculationHelper.cs +++ b/backend/api/Helpers/EmissionCalculationHelper.cs @@ -13,7 +13,7 @@ public static class EmissionCalculationHelper private const int DailyEmissionFromDrillingRig = 100; private const int DaysInLeapYear = 366; private const int DaysInYear = 365; - private const int ConversionFactor = 1000; + private const int ConversionFactorFromMtoG = 1000; public static TimeSeries CalculateTotalFuelConsumptions(Case caseItem, Topside topside, DrainageStrategy drainageStrategy) @@ -28,7 +28,7 @@ public static TimeSeries CalculateTotalFuelConsumptions(Case caseItem, T var year = caseItem.DG4Date.Year + i; var calendarDays = DateTime.IsLeapYear(year) ? DaysInLeapYear : DaysInYear; - var fuelGasConsumption = productionEfficiency * fuelGasConsumptionMax * calendarDays / ConversionFactor; + var fuelGasConsumption = productionEfficiency * fuelGasConsumptionMax * calendarDays / ConversionFactorFromMtoG; valuesList.Add(fuelGasConsumption); } @@ -136,7 +136,7 @@ private static TimeSeriesVolume CalculatedOilRatesInFlaring(DrainageStrategy dra } var oilRates = drainageStrategy.ProductionProfileOil.Values; - oilValues.AddRange(oilRates.Select(oilValue => oilValue * FlaredGasPerProducedVolume / ConversionFactor)); + oilValues.AddRange(oilRates.Select(oilValue => oilValue * FlaredGasPerProducedVolume / ConversionFactorFromMtoG)); return new TimeSeriesVolume { @@ -154,7 +154,7 @@ private static TimeSeriesVolume CalculatedGasRatesInFlaring(DrainageStrategy dra } var gasRates = drainageStrategy.ProductionProfileGas.Values; - gasValues.AddRange(gasRates.Select(gasValue => gasValue * FlaredGasPerProducedVolume / ConversionFactor)); + gasValues.AddRange(gasRates.Select(gasValue => gasValue * FlaredGasPerProducedVolume / ConversionFactorFromMtoG)); return new TimeSeriesVolume { diff --git a/backend/api/Helpers/ProspImportSettings.cs b/backend/api/Helpers/ProspImportSettings.cs index 7a0132247..07affd0de 100644 --- a/backend/api/Helpers/ProspImportSettings.cs +++ b/backend/api/Helpers/ProspImportSettings.cs @@ -2,18 +2,18 @@ namespace api.Helpers; public class Prosp { + public SubStructure SubStructure; + public Surf Surf; + public TopSide TopSide; + public Transport Transport; + public Prosp() { Surf = new Surf(); TopSide = new TopSide(); SubStructure = new SubStructure(); Transport = new Transport(); - } - public Surf Surf; - public TopSide TopSide; - public SubStructure SubStructure; - public Transport Transport; } public class Surf @@ -47,6 +47,7 @@ public class TopSide public string flaredGas { get; set; } = null!; public string oilCapacity { get; set; } = null!; public string gasCapacity { get; set; } = null!; + public string waterInjectionCapacity { get; set; } = null!; public string producerCount { get; set; } = null!; public string waterInjectorCount { get; set; } = null!; public string gasInjectorCount { get; set; } = null!; diff --git a/backend/api/Migrations/20221027202511_TransportWICapacity.Designer.cs b/backend/api/Migrations/20221027202511_TransportWICapacity.Designer.cs new file mode 100644 index 000000000..456f66fd3 --- /dev/null +++ b/backend/api/Migrations/20221027202511_TransportWICapacity.Designer.cs @@ -0,0 +1,1891 @@ +// +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("20221027202511_TransportWICapacity")] + partial class TransportWICapacity + { + 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.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.ExplorationCostProfile", 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("ExplorationCostProfile"); + }); + + 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("Count") + .HasColumnType("int"); + + b.Property("DrillingScheduleId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("ExplorationId", "WellId"); + + b.HasIndex("DrillingScheduleId"); + + b.HasIndex("WellId"); + + b.ToTable("ExplorationWell"); + }); + + 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.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.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("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("Description") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + 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.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.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("AnnualWellInterventionCost") + .HasColumnType("float"); + + b.Property("ArtificialLift") + .HasColumnType("int"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("Name") + .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"); + + b.ToTable("WellProjects"); + }); + + modelBuilder.Entity("api.Models.WellProjectCostProfile", 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("Override") + .HasColumnType("bit"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.Property("WellProject.Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("WellProject.Id") + .IsUnique(); + + b.ToTable("WellProjectCostProfile"); + }); + + modelBuilder.Entity("api.Models.WellProjectWell", b => + { + b.Property("WellProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("WellId") + .HasColumnType("uniqueidentifier"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("DrillingScheduleId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("WellProjectId", "WellId"); + + b.HasIndex("DrillingScheduleId"); + + b.HasIndex("WellId"); + + b.ToTable("WellProjectWell"); + }); + + 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.ExplorationCostProfile", b => + { + b.HasOne("api.Models.Exploration", "Exploration") + .WithOne("CostProfile") + .HasForeignKey("api.Models.ExplorationCostProfile", "Exploration.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Exploration"); + }); + + 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.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.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.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.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.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.WellProjectCostProfile", b => + { + b.HasOne("api.Models.WellProject", "WellProject") + .WithOne("CostProfile") + .HasForeignKey("api.Models.WellProjectCostProfile", "WellProject.Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WellProject"); + }); + + 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("CostProfile"); + + b.Navigation("CountryOfficeCost"); + + b.Navigation("ExplorationWells"); + + b.Navigation("GAndGAdminCost"); + + b.Navigation("SeismicAcquisitionAndProcessing"); + }); + + 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("CostProfile"); + + b.Navigation("WellProjectWells"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/backend/api/Migrations/20221027202511_TransportWICapacity.cs b/backend/api/Migrations/20221027202511_TransportWICapacity.cs new file mode 100644 index 000000000..84cf30489 --- /dev/null +++ b/backend/api/Migrations/20221027202511_TransportWICapacity.cs @@ -0,0 +1,26 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace api.Migrations +{ + public partial class TransportWICapacity : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "WaterInjectionCapacity", + table: "Topsides", + type: "float", + nullable: false, + defaultValue: 0.0); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "WaterInjectionCapacity", + table: "Topsides"); + } + } +} diff --git a/backend/api/Migrations/DcdDbContextModelSnapshot.cs b/backend/api/Migrations/DcdDbContextModelSnapshot.cs index 28fe147f3..f5bbbb79d 100644 --- a/backend/api/Migrations/DcdDbContextModelSnapshot.cs +++ b/backend/api/Migrations/DcdDbContextModelSnapshot.cs @@ -1057,6 +1057,9 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("Source") .HasColumnType("int"); + b.Property("WaterInjectionCapacity") + .HasColumnType("float"); + b.Property("WaterInjectorCount") .HasColumnType("int"); diff --git a/backend/api/Models/Topside.cs b/backend/api/Models/Topside.cs index 6902b1e95..2b709f973 100644 --- a/backend/api/Models/Topside.cs +++ b/backend/api/Models/Topside.cs @@ -13,6 +13,7 @@ public class Topside public double DryWeight { get; set; } public double OilCapacity { get; set; } public double GasCapacity { get; set; } + public double WaterInjectionCapacity { get; set; } public ArtificialLift ArtificialLift { get; set; } public Maturity Maturity { get; set; } public Currency Currency { get; set; } diff --git a/backend/api/Services/ProspExcelImportService.cs b/backend/api/Services/ProspExcelImportService.cs index 9e38435d0..0620de921 100644 --- a/backend/api/Services/ProspExcelImportService.cs +++ b/backend/api/Services/ProspExcelImportService.cs @@ -103,7 +103,7 @@ private void ImportSurf(List cellData, Guid sourceCaseId, Guid projectId) "M112", "N112", "O112", - "P112" + "P112", }; var costProfileStartYear = ReadIntValue(cellData, _prospConfig.Surf.costProfileStartYear); var dG3Date = ReadDateValue(cellData, _prospConfig.Surf.dG3Date); @@ -125,7 +125,7 @@ private void ImportSurf(List cellData, Guid sourceCaseId, Guid projectId) var costProfile = new SurfCostProfile { Values = ReadDoubleValues(cellData, costProfileCoords), - StartYear = costProfileStartYear - dG4Date.Year + StartYear = costProfileStartYear - dG4Date.Year, }; // Prosp meta data @@ -157,7 +157,7 @@ private void ImportSurf(List cellData, Guid sourceCaseId, Guid projectId) ProducerCount = producerCount, GasInjectorCount = gasInjectorCount, WaterInjectorCount = waterInjectorCount, - CessationCost = cessationCost + CessationCost = cessationCost, }; var dto = SurfDtoAdapter.Convert(newSurf); @@ -182,7 +182,7 @@ private void ImportTopside(List cellData, Guid sourceCaseId, Guid projectI "M104", "N104", "O104", - "P104" + "P104", }; var costProfileStartYear = ReadIntValue(cellData, _prospConfig.TopSide.costProfileStartYear); var dG3Date = ReadDateValue(cellData, _prospConfig.TopSide.dG3Date); @@ -194,6 +194,7 @@ private void ImportTopside(List cellData, Guid sourceCaseId, Guid projectI var flaredGas = ReadDoubleValue(cellData, _prospConfig.TopSide.flaredGas); var oilCapacity = ReadDoubleValue(cellData, _prospConfig.TopSide.oilCapacity); var gasCapacity = ReadDoubleValue(cellData, _prospConfig.TopSide.gasCapacity); + var waterInjectorCapacity = ReadDoubleValue(cellData, _prospConfig.TopSide.waterInjectionCapacity); var producerCount = ReadIntValue(cellData, _prospConfig.TopSide.producerCount); var gasInjectorCount = ReadIntValue(cellData, _prospConfig.TopSide.gasInjectorCount); var waterInjectorCount = ReadIntValue(cellData, _prospConfig.TopSide.waterInjectorCount); @@ -209,7 +210,7 @@ private void ImportTopside(List cellData, Guid sourceCaseId, Guid projectI var costProfile = new TopsideCostProfile { Values = ReadDoubleValues(cellData, costProfileCoords), - StartYear = costProfileStartYear - dG4Date.Year + StartYear = costProfileStartYear - dG4Date.Year, }; var peakElectricityImported = ReadDoubleValue(cellData, _prospConfig.TopSide.peakElectricityImported); // Prosp meta data @@ -230,6 +231,7 @@ private void ImportTopside(List cellData, Guid sourceCaseId, Guid projectI DryWeight = dryWeight, OilCapacity = oilCapacity, GasCapacity = gasCapacity, + WaterInjectionCapacity = waterInjectorCapacity, ArtificialLift = artificialLift, ProducerCount = producerCount, WaterInjectorCount = waterInjectorCount, @@ -248,7 +250,7 @@ private void ImportTopside(List cellData, Guid sourceCaseId, Guid projectI CostYear = costYear, Maturity = Maturity.A, FacilityOpex = facilityOpex, - PeakElectricityImported = peakElectricityImported + PeakElectricityImported = peakElectricityImported, }; var dto = TopsideDtoAdapter.Convert(newTopside); if (topsideLink != Guid.Empty) @@ -271,7 +273,7 @@ private void ImportSubstructure(List cellData, Guid sourceCaseId, Guid pro "M105", "N105", "O105", - "P105" + "P105", }; var costProfileStartYear = ReadIntValue(cellData, _prospConfig.SubStructure.costProfileStartYear); var dG3Date = ReadDateValue(cellData, _prospConfig.SubStructure.dG3Date); @@ -282,7 +284,7 @@ private void ImportSubstructure(List cellData, Guid sourceCaseId, Guid pro var costProfile = new SubstructureCostProfile { Values = ReadDoubleValues(cellData, costProfileCoords), - StartYear = costProfileStartYear - dG4Date.Year + StartYear = costProfileStartYear - dG4Date.Year, }; // Prosp meta data @@ -306,7 +308,7 @@ private void ImportSubstructure(List cellData, Guid sourceCaseId, Guid pro ProspVersion = versionDate, Currency = currency, CostYear = costYear, - Maturity = Maturity.A + Maturity = Maturity.A, }; if (substructureLink != Guid.Empty) @@ -330,7 +332,7 @@ private void ImportTransport(List cellData, Guid sourceCaseId, Guid projec "M113", "N113", "O113", - "P113" + "P113", }; var costProfileStartYear = ReadIntValue(cellData, _prospConfig.Transport.costProfileStartYear); var dG3Date = ReadDateValue(cellData, _prospConfig.Transport.dG3Date); @@ -338,7 +340,7 @@ private void ImportTransport(List cellData, Guid sourceCaseId, Guid projec var costProfile = new TransportCostProfile { Values = ReadDoubleValues(cellData, costProfileCoords), - StartYear = costProfileStartYear - dG4Date.Year + StartYear = costProfileStartYear - dG4Date.Year, }; // Prosp meta data @@ -364,7 +366,7 @@ private void ImportTransport(List cellData, Guid sourceCaseId, Guid projec CostYear = costYear, OilExportPipelineLength = oilExportPipelineLength, GasExportPipelineLength = gasExportPipelineLength, - Maturity = Maturity.A + Maturity = Maturity.A, }; var dto = TransportDtoAdapter.Convert(newTransport); if (transportLink != Guid.Empty) @@ -481,7 +483,7 @@ private static Concept MapSubstructureConcept(int importValue) 9 => Concept.TANKER, 10 => Concept.JACK_UP, 11 => Concept.SUBSEA_TO_SHORE, - _ => Concept.NO_CONCEPT + _ => Concept.NO_CONCEPT, }; } @@ -493,7 +495,7 @@ private static ArtificialLift MapArtificialLift(int importValue) 1 => ArtificialLift.GasLift, 2 => ArtificialLift.ElectricalSubmergedPumps, 3 => ArtificialLift.SubseaBoosterPumps, - _ => ArtificialLift.NoArtificialLift + _ => ArtificialLift.NoArtificialLift, }; } @@ -514,7 +516,7 @@ private static ProductionFlowline MapProductionFlowLine(int importValue) 32 => ProductionFlowline.SSClad_PIP, 33 => ProductionFlowline.Cr13_PIP, 41 => ProductionFlowline.HDPELinedCS, - _ => ProductionFlowline.No_production_flowline + _ => ProductionFlowline.No_production_flowline, }; } } diff --git a/backend/tests/TestHelper.cs b/backend/tests/TestHelper.cs index 21dce7e49..3013d1e9b 100644 --- a/backend/tests/TestHelper.cs +++ b/backend/tests/TestHelper.cs @@ -1,5 +1,3 @@ -using System.Linq; - using api.Dtos; using api.Models; @@ -19,6 +17,7 @@ public static void CompareProjectsData(ProjectDto expected, ProjectDto actual) Assert.Equal(expected.ProjectPhase, actual.ProjectPhase); Assert.Equal(expected.ProjectCategory, actual.ProjectCategory); } + public static void CompareProjectsData(Project expected, Project actual) { Assert.Equal(expected.Name, actual.Name); @@ -30,6 +29,7 @@ public static void CompareProjectsData(Project expected, Project actual) Assert.Equal(expected.ProjectPhase, actual.ProjectPhase); Assert.Equal(expected.ProjectCategory, actual.ProjectCategory); } + public static void CompareProjects(Project expected, Project actual) { CompareProjectsData(expected, actual); @@ -46,7 +46,7 @@ public static void CompareProjects(Project expected, Project actual) var casesSourceAndTarget = expected.Cases.OrderBy(c => c.Name).Zip(actual.Cases.OrderBy(c => c.Name)); foreach (var casePair in casesSourceAndTarget) { - TestHelper.CompareCases(casePair.First, casePair.Second); + CompareCases(casePair.First, casePair.Second); } } @@ -63,7 +63,7 @@ public static void CompareProjects(Project expected, Project actual) .Zip(actual.DrainageStrategies.OrderBy(d => d.Name)); foreach (var drainageStrategyPair in drainageStrategiesExpectedAndActual) { - TestHelper.CompareDrainageStrategies(drainageStrategyPair.First, drainageStrategyPair.Second); + CompareDrainageStrategies(drainageStrategyPair.First, drainageStrategyPair.Second); } } @@ -80,7 +80,7 @@ public static void CompareProjects(Project expected, Project actual) .Zip(actual.WellProjects.OrderBy(d => d.Name)); foreach (var wellProjectPair in wellProjectsExpectedAndActual) { - TestHelper.CompareWellProjects(wellProjectPair.First, wellProjectPair.Second); + CompareWellProjects(wellProjectPair.First, wellProjectPair.Second); } } @@ -97,7 +97,7 @@ public static void CompareProjects(Project expected, Project actual) .Zip(actual.Explorations.OrderBy(d => d.Name)); foreach (var explorationPair in explorationsExpectedAndActual) { - TestHelper.CompareExplorations(explorationPair.First, explorationPair.Second); + CompareExplorations(explorationPair.First, explorationPair.Second); } } @@ -114,7 +114,7 @@ public static void CompareProjects(Project expected, Project actual) .Zip(actual.Substructures.OrderBy(d => d.Name)); foreach (var substructurePair in substructuresExpectedAndActual) { - TestHelper.CompareSubstructures(substructurePair.First, substructurePair.Second); + CompareSubstructures(substructurePair.First, substructurePair.Second); } } @@ -131,7 +131,7 @@ public static void CompareProjects(Project expected, Project actual) .Zip(actual.Surfs.OrderBy(d => d.Name)); foreach (var surfPair in surfsExpectedAndActual) { - TestHelper.CompareSurfs(surfPair.First, surfPair.Second); + CompareSurfs(surfPair.First, surfPair.Second); } } @@ -148,7 +148,7 @@ public static void CompareProjects(Project expected, Project actual) .Zip(actual.Topsides.OrderBy(d => d.Name)); foreach (var topsidePair in topsidesExpectedAndActual) { - TestHelper.CompareTopsides(topsidePair.First, topsidePair.Second); + CompareTopsides(topsidePair.First, topsidePair.Second); } } @@ -165,7 +165,7 @@ public static void CompareProjects(Project expected, Project actual) .Zip(actual.Transports.OrderBy(d => d.Name)); foreach (var transportPair in transportsExpectedAndActual) { - TestHelper.CompareTransports(transportPair.First, transportPair.Second); + CompareTransports(transportPair.First, transportPair.Second); } } } @@ -183,7 +183,6 @@ public static void CompareCases(Case expected, Case actual) Assert.Equal(expected.Description, actual.Description); Assert.Equal(expected.ReferenceCase, actual.ReferenceCase); } - } public static void CompareCases(Case expected, CaseDto actual) @@ -199,7 +198,6 @@ public static void CompareCases(Case expected, CaseDto actual) Assert.Equal(expected.Description, actual.Description); Assert.Equal(expected.ReferenceCase, actual.ReferenceCase); } - } public static void CompareCases(CaseDto expected, CaseDto actual) @@ -218,6 +216,7 @@ public static void CompareDrainageStrategies(DrainageStrategy expected, Assert.Null(actual); return; } + Assert.Equal(expected.Name, actual.Name); Assert.Equal(expected.Description, actual.Description); Assert.Equal(expected.NGLYield, actual.NGLYield); @@ -248,6 +247,7 @@ public static void CompareDrainageStrategies(DrainageStrategy expected, Drainage Assert.Null(actual); return; } + Assert.Equal(expected.ProjectId, actual.ProjectId); Assert.Equal(expected.Name, actual.Name); Assert.Equal(expected.Description, actual.Description); @@ -286,6 +286,7 @@ public static void CompareDrainageStrategies(DrainageStrategyDto expected, Drain Assert.Null(actual); return; } + Assert.Equal(expected.ProjectId, actual.ProjectId); Assert.Equal(expected.Name, actual.Name); Assert.Equal(expected.Description, actual.Description); @@ -356,10 +357,10 @@ public static void CompareExplorations(Exploration expected, Exploration actual) { Assert.Equal(expected.Name, actual.Name); - TestHelper.CompareCosts(expected.CostProfile, actual.CostProfile); + CompareCosts(expected.CostProfile, actual.CostProfile); Assert.Equal(expected.CostProfile.Exploration.Name, actual.CostProfile.Exploration.Name); - TestHelper.CompareCosts(expected.GAndGAdminCost, + CompareCosts(expected.GAndGAdminCost, actual.GAndGAdminCost); Assert.Equal(expected.GAndGAdminCost.Exploration.Name, actual.GAndGAdminCost.Exploration.Name); @@ -405,8 +406,8 @@ public static void CompareExplorations(ExplorationDto expected, ExplorationDto a Assert.Equal(expected.ProjectId, actual.ProjectId); Assert.Equal(expected.Name, actual.Name); - TestHelper.CompareCosts(expected.CostProfile, actual.CostProfile); - TestHelper.CompareCosts(expected.GAndGAdminCost, actual.GAndGAdminCost); + CompareCosts(expected.CostProfile, actual.CostProfile); + CompareCosts(expected.GAndGAdminCost, actual.GAndGAdminCost); Assert.Equal(expected.RigMobDemob, actual.RigMobDemob); } @@ -420,6 +421,7 @@ public static void CompareSubstructures(Substructure expected, Substructure actu Assert.Null(actual); return; } + Assert.Equal(expected.Name, actual.Name); Assert.Equal(expected.Maturity, actual.Maturity); CompareCosts(expected.CostProfile, actual.CostProfile); @@ -434,6 +436,7 @@ public static void CompareSubstructures(Substructure expected, SubstructureDto a Assert.Null(actual); return; } + Assert.Equal(expected.Name, actual.Name); Assert.Equal(expected.Maturity, actual.Maturity); CompareCosts(expected.CostProfile, actual.CostProfile); @@ -453,6 +456,7 @@ public static void CompareSubstructures(SubstructureDto expected, SubstructureDt Assert.Null(actual); return; } + Assert.Equal(expected.Name, actual.Name); Assert.Equal(expected.ProjectId, actual.ProjectId); Assert.Equal(expected.Maturity, actual.Maturity); @@ -468,6 +472,7 @@ public static void CompareWellProjects(WellProject expected, WellProject actual) Assert.Null(actual); return; } + Assert.Equal(expected.Name, actual.Name); Assert.Equal(expected.RigMobDemob, actual.RigMobDemob); Assert.Equal(expected.AnnualWellInterventionCost, @@ -475,7 +480,7 @@ public static void CompareWellProjects(WellProject expected, WellProject actual) Assert.Equal(expected.PluggingAndAbandonment, actual.PluggingAndAbandonment); Assert.Equal(expected.ArtificialLift, actual.ArtificialLift); - TestHelper.CompareCosts(expected.CostProfile, + CompareCosts(expected.CostProfile, actual.CostProfile); } @@ -487,6 +492,7 @@ public static void CompareWellProjects(WellProject expected, WellProjectDto actu Assert.Null(actual); return; } + Assert.Equal(expected.Name, actual.Name); Assert.Equal(expected.RigMobDemob, actual.RigMobDemob); Assert.Equal(expected.AnnualWellInterventionCost, @@ -494,7 +500,7 @@ public static void CompareWellProjects(WellProject expected, WellProjectDto actu Assert.Equal(expected.PluggingAndAbandonment, actual.PluggingAndAbandonment); Assert.Equal(expected.ArtificialLift, actual.ArtificialLift); - TestHelper.CompareCosts(expected.CostProfile, + CompareCosts(expected.CostProfile, actual.CostProfile); } @@ -511,6 +517,7 @@ public static void CompareWellProjects(WellProjectDto expected, WellProjectDto a Assert.Null(actual); return; } + Assert.Equal(expected.Name, actual.Name); Assert.Equal(expected.RigMobDemob, actual.RigMobDemob); Assert.Equal(expected.AnnualWellInterventionCost, @@ -518,7 +525,7 @@ public static void CompareWellProjects(WellProjectDto expected, WellProjectDto a Assert.Equal(expected.PluggingAndAbandonment, actual.PluggingAndAbandonment); Assert.Equal(expected.ArtificialLift, actual.ArtificialLift); - TestHelper.CompareCosts(expected.CostProfile, + CompareCosts(expected.CostProfile, actual.CostProfile); } @@ -536,8 +543,9 @@ public static void CompareTopsides(Topside expected, Topside actual) Assert.Equal(expected.DryWeight, actual.DryWeight); Assert.Equal(expected.GasCapacity, actual.GasCapacity); Assert.Equal(expected.OilCapacity, actual.OilCapacity); + Assert.Equal(expected.WaterInjectionCapacity, actual.WaterInjectionCapacity); Assert.Equal(expected.ArtificialLift, actual.ArtificialLift); - TestHelper.CompareCosts(expected.CostProfile, actual.CostProfile); + CompareCosts(expected.CostProfile, actual.CostProfile); } } @@ -555,8 +563,9 @@ public static void CompareTopsides(Topside expected, TopsideDto actual) Assert.Equal(expected.DryWeight, actual.DryWeight); Assert.Equal(expected.GasCapacity, actual.GasCapacity); Assert.Equal(expected.OilCapacity, actual.OilCapacity); + Assert.Equal(expected.WaterInjectionCapacity, actual.WaterInjectionCapacity); Assert.Equal(expected.ArtificialLift, actual.ArtificialLift); - TestHelper.CompareCosts(expected.CostProfile, actual.CostProfile); + CompareCosts(expected.CostProfile, actual.CostProfile); } } @@ -577,7 +586,7 @@ public static void CompareSurfs(Surf expected, Surf actual) Assert.Equal(expected.InfieldPipelineSystemLength, actual.InfieldPipelineSystemLength); Assert.Equal(expected.UmbilicalSystemLength, actual.UmbilicalSystemLength); Assert.Equal(expected.ProductionFlowline, actual.ProductionFlowline); - TestHelper.CompareCosts(expected.CostProfile, actual.CostProfile); + CompareCosts(expected.CostProfile, actual.CostProfile); } } @@ -589,6 +598,7 @@ public static void CompareYearValues(TimeSeries expected, TimeSeries ac Assert.Null(actual); return; } + Assert.Equal(expected.StartYear, actual.StartYear); Assert.Equal(expected.InternalData, actual.InternalData); Assert.Equal(expected.Values.Length, actual.Values.Length); @@ -608,6 +618,7 @@ public static void CompareYearValues(TimeSeries expected, TimeSeriesDto Assert.Null(actual); return; } + Assert.Equal(expected.StartYear, actual.StartYear); Assert.Equal(expected.Values.Length, actual.Values.Length); var valuePairsXY = expected.Values.Zip(actual.Values); @@ -631,6 +642,7 @@ public static void CompareYearValues(TimeSeriesDto expected, TimeSeriesDto Assert.Null(actual); return; } + Assert.Equal(expected.StartYear, actual.StartYear); Assert.Equal(expected.Values.Length, actual.Values.Length); var valuePairsXY = expected.Values.Zip(actual.Values); @@ -689,6 +701,7 @@ public static void CompareCosts(TimeSeriesCost expected, TimeSeriesCost actual) Assert.Null(actual); return; } + CompareYearValues(expected, actual); Assert.Equal(expected.Currency, actual.Currency); Assert.Equal(expected.EPAVersion, actual.EPAVersion); @@ -702,6 +715,7 @@ public static void CompareCosts(TimeSeriesCost expected, TimeSeriesCostDto actua Assert.Null(actual); return; } + CompareYearValues(expected, actual); Assert.Equal(expected.Currency, actual.Currency); Assert.Equal(expected.EPAVersion, actual.EPAVersion); @@ -720,6 +734,7 @@ public static void CompareCosts(TimeSeriesCostDto expected, TimeSeriesCostDto ac Assert.Null(actual); return; } + CompareYearValues(expected, actual); Assert.Equal(expected.Currency, actual.Currency); Assert.Equal(expected.EPAVersion, actual.EPAVersion); diff --git a/frontend/src/models/assets/topside/Topside.ts b/frontend/src/models/assets/topside/Topside.ts index 3a8328e86..9205eeff5 100644 --- a/frontend/src/models/assets/topside/Topside.ts +++ b/frontend/src/models/assets/topside/Topside.ts @@ -11,6 +11,7 @@ export class Topside implements Components.Schemas.TopsideDto, IAsset { cessationCostProfile?: TopsideCessationCostProfile | undefined dryWeight?: number | undefined oilCapacity?: number | undefined + waterInjectionCapacity?: number // double gasCapacity?: number | undefined artificialLift?: Components.Schemas.ArtificialLift maturity?: Components.Schemas.Maturity | undefined @@ -48,6 +49,7 @@ export class Topside implements Components.Schemas.TopsideDto, IAsset { this.maturity = data.maturity this.oilCapacity = data.oilCapacity this.gasCapacity = data.gasCapacity + this.waterInjectionCapacity = data.waterInjectionCapacity this.currency = data.currency ?? 1 this.fuelConsumption = data.fuelConsumption this.flaredGas = data.flaredGas diff --git a/frontend/src/types.d.ts b/frontend/src/types.d.ts index 8e78ffe7f..157688beb 100644 --- a/frontend/src/types.d.ts +++ b/frontend/src/types.d.ts @@ -471,6 +471,7 @@ declare namespace Components { dryWeight?: number; // double oilCapacity?: number; // double gasCapacity?: number; // double + waterInjectionCapacity?: number; // double artificialLift?: ArtificialLift /* int32 */; maturity?: Maturity /* int32 */; currency?: Currency /* int32 */;