Skip to content

Commit

Permalink
Simplify technical input service
Browse files Browse the repository at this point in the history
  • Loading branch information
kvam committed Dec 22, 2024
1 parent b0d9498 commit 75389ba
Show file tree
Hide file tree
Showing 17 changed files with 387 additions and 492 deletions.
4 changes: 2 additions & 2 deletions backend/api/AppInfrastructure/DcdIocConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public static void AddDcdIocConfiguration(this IServiceCollection services)
services.AddScoped<UpdateRevisionService>();

services.AddScoped<TechnicalInputService>();
services.AddScoped<UpdateCostProfilesForExplorationWellsService>();
services.AddScoped<UpdateCostProfilesForWellProjectsService>();

/* Project members */
services.AddScoped<GetProjectMemberService>();
Expand Down Expand Up @@ -181,8 +183,6 @@ public static void AddDcdIocConfiguration(this IServiceCollection services)
services.AddScoped<ITransportService, TransportService>();
services.AddScoped<IOnshorePowerSupplyService, OnshorePowerSupplyService>();

services.AddScoped<ICostProfileFromDrillingScheduleHelper, CostProfileFromDrillingScheduleHelper>();

services.AddScoped<ICaseTimeSeriesService, CaseTimeSeriesService>();
services.AddScoped<IDrainageStrategyTimeSeriesService, DrainageStrategyTimeSeriesService>();
services.AddScoped<IWellProjectTimeSeriesService, WellProjectTimeSeriesService>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using api.Features.CaseProfiles.Dtos.TimeSeries.Update;

namespace api.Features.TechnicalInput.Dtos;
namespace api.Features.Assets.CaseAssets.Explorations.Dtos;

public class UpdateGAndGAdminCostOverrideDto : UpdateTimeSeriesCostDto
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using api.Features.CaseProfiles.Dtos.TimeSeries;
using api.Features.CaseProfiles.Dtos.TimeSeries.Update;

namespace api.Features.TechnicalInput.Dtos;
namespace api.Features.Assets.CaseAssets.WellProjects.Dtos;

public class UpdateOilProducerCostProfileOverrideDto : UpdateTimeSeriesCostDto, ITimeSeriesOverrideDto
{
Expand Down
9 changes: 0 additions & 9 deletions backend/api/Features/CaseProfiles/Dtos/Well/DeleteWellDto.cs

This file was deleted.

6 changes: 0 additions & 6 deletions backend/api/Features/CaseProfiles/Services/CaseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,4 @@ public async Task<Case> GetCaseWithIncludes(Guid caseId, params Expression<Func<
return await repository.GetCaseWithIncludes(caseId, includes)
?? throw new NotFoundInDbException($"Case with id {caseId} not found.");
}

// TODO: Delete this method
public async Task<IEnumerable<Case>> GetAll()
{
return await context.Cases.ToListAsync();
}
}

This file was deleted.

1 change: 0 additions & 1 deletion backend/api/Features/CaseProfiles/Services/ICaseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ public interface ICaseService
Task<Project> GetProject(Guid id);
Task<Case> GetCase(Guid caseId);
Task<Case> GetCaseWithIncludes(Guid caseId, params Expression<Func<Case, object>>[] includes);
Task<IEnumerable<Case>> GetAll();
}

This file was deleted.

8 changes: 8 additions & 0 deletions backend/api/Features/TechnicalInput/Dtos/DeleteWellDto.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using System.ComponentModel.DataAnnotations;

namespace api.Features.TechnicalInput.Dtos;

public class DeleteWellDto
{
[Required] public Guid Id { get; set; }
}
Loading

0 comments on commit 75389ba

Please sign in to comment.