diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api.Types/Responses/GetPendingLearnerChangeCountsForEmployerQueryResponse.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api.Types/Responses/GetPendingLearnerChangeCountsForEmployerQueryResponse.cs new file mode 100644 index 000000000..d1d349582 --- /dev/null +++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api.Types/Responses/GetPendingLearnerChangeCountsForEmployerQueryResponse.cs @@ -0,0 +1,7 @@ +namespace SFA.DAS.CommitmentsV2.Api.Types.Responses; + +public class GetPendingLearnerChangeCountsForEmployerQueryResponse +{ + public int ManualPendingChangeCount { get; set; } + public int IlrPendingChangeCount { get; set; } +} \ No newline at end of file diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api.UnitTests/Controllers/AccountControllerTests.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api.UnitTests/Controllers/AccountControllerTests.cs index 64bd35fbc..b626ca094 100644 --- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api.UnitTests/Controllers/AccountControllerTests.cs +++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api.UnitTests/Controllers/AccountControllerTests.cs @@ -1,10 +1,12 @@ using Microsoft.AspNetCore.Mvc; +using Moq; using SFA.DAS.CommitmentsV2.Api.Controllers; using SFA.DAS.CommitmentsV2.Api.Types.Responses; using SFA.DAS.CommitmentsV2.Application.Queries.GetAccountStatus; using SFA.DAS.CommitmentsV2.Application.Queries.GetAccountSummary; using SFA.DAS.CommitmentsV2.Application.Queries.GetAccountTransferStatus; using SFA.DAS.CommitmentsV2.Application.Queries.GetApprovedProviders; +using SFA.DAS.CommitmentsV2.Application.Queries.GetPendingLearnerChangeCount; using SFA.DAS.CommitmentsV2.Application.Queries.GetProviderPaymentsPriority; using SFA.DAS.CommitmentsV2.Shared.Interfaces; @@ -56,6 +58,13 @@ public async Task GetProviderPaymentPriorities_Should_Return_Valid_Result() _fixture.VerifyGetProviderPaymentsPriorityResponse(); } + [Test] + public async Task GetPendingLearnerChangeCount_Should_Return_Valid_Result() + { + await _fixture.GetPendingLearnerChangeCount(); + _fixture.VerifyGetPendingLearnerChangeCountResponse(); + } + private class AccountControllerTestsFixture { private AccountController Controller { get; } @@ -72,6 +81,7 @@ private class AccountControllerTestsFixture private GetProviderPaymentsPriorityQueryResult ProviderPaymentsPriorityQueryResult { get; } private GetProviderPaymentsPriorityResponse GetProviderPaymentsPriorityResponse { get; } + private GetPendingLearnerChangeCountsForEmployerQueryResult GetPendingLearnerChangeCountsForEmployerQueryResult { get; } private IActionResult Result { get; set; } @@ -96,6 +106,10 @@ public AccountControllerTestsFixture() Mediator.Setup(x => x.Send(It.IsAny(), It.IsAny())) .ReturnsAsync(ApprovedProviderQueryResult); + GetPendingLearnerChangeCountsForEmployerQueryResult = autoFixture.Create(); + Mediator.Setup(x => x.Send(It.IsAny(), It.IsAny())) + .ReturnsAsync(GetPendingLearnerChangeCountsForEmployerQueryResult); + ModelMapper = new Mock(); ProviderPaymentsPriorityQueryResult = new GetProviderPaymentsPriorityQueryResult @@ -152,6 +166,12 @@ public async Task GetProviderPaymentsPriority() Result = await Controller.GetProviderPaymentsPriority(AccountId); } + public async Task GetPendingLearnerChangeCount() + { + Result = await Controller.GetPendingLearnerChangeCount(AccountId); + } + + public void VerifyAccountRepsonse() { Assert.Multiple(() => @@ -242,5 +262,15 @@ public void VerifyGetProviderPaymentsPriorityResponse() } }); } + + public void VerifyGetPendingLearnerChangeCountResponse() + { + Result.Should().BeOfType(); + var objectResult = (OkObjectResult)Result; + objectResult.Value.Should().BeOfType(); + var response = (GetPendingLearnerChangeCountsForEmployerQueryResponse)objectResult.Value; + response.ManualPendingChangeCount.Should().Be(GetPendingLearnerChangeCountsForEmployerQueryResult.ManualPendingChangeCount); + response.IlrPendingChangeCount.Should().Be(GetPendingLearnerChangeCountsForEmployerQueryResult.IlrPendingChangeCount); + } } } \ No newline at end of file diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api/Controllers/AccountController.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api/Controllers/AccountController.cs index 441c462d3..7e3501ce6 100644 --- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api/Controllers/AccountController.cs +++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api/Controllers/AccountController.cs @@ -8,6 +8,7 @@ using SFA.DAS.CommitmentsV2.Application.Queries.GetApprenticeshipStatusSummary; using SFA.DAS.CommitmentsV2.Application.Queries.GetApprovedProviders; using SFA.DAS.CommitmentsV2.Application.Queries.GetPendingApprenticeChanges; +using SFA.DAS.CommitmentsV2.Application.Queries.GetPendingLearnerChangeCount; using SFA.DAS.CommitmentsV2.Application.Queries.GetProviderPaymentsPriority; using SFA.DAS.CommitmentsV2.Shared.Interfaces; @@ -116,6 +117,22 @@ public async Task GetPendingApprenticeChanges(long accountId) return Ok(response); } + [HttpGet] + [Route("pending-learner-change-counts")] + public async Task GetPendingLearnerChangeCount(long accountId) + { + var query = new GetPendingLearnerChangeCountsForEmployerQuery(accountId); + var result = await mediator.Send(query); + + if (result == null) { return NotFound(); } + + return Ok(new GetPendingLearnerChangeCountsForEmployerQueryResponse + { + ManualPendingChangeCount = result.ManualPendingChangeCount, + IlrPendingChangeCount = result.IlrPendingChangeCount + }); + } + [HttpPost] [Route("update-provider-payments-priority")] public async Task UpdateProviderPaymentsPriority(long accountId, [FromBody] UpdateProviderPaymentsPriorityRequest request) diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/BulkUploadAddDraftApprenticeshipCommandHandlerTests.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/BulkUploadAddDraftApprenticeshipCommandHandlerTests.cs index ef984da93..d07472333 100644 --- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/BulkUploadAddDraftApprenticeshipCommandHandlerTests.cs +++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/BulkUploadAddDraftApprenticeshipCommandHandlerTests.cs @@ -186,6 +186,7 @@ private Apprenticeship GenerateApprenticeshipDetails(Cohort cohort) .Without(s => s.EmailAddressConfirmed) .Without(s => s.ApprenticeshipConfirmationStatus) .Without(s => s.EmployerVerificationRequest) + .Without(s => s.ApprovalRequests) .Create(); return apprenticeshipDetails1; } diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQueryHandlerTests.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQueryHandlerTests.cs new file mode 100644 index 000000000..2dad7a1a9 --- /dev/null +++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQueryHandlerTests.cs @@ -0,0 +1,198 @@ +using SFA.DAS.CommitmentsV2.Application.Queries.GetPendingLearnerChangeCount; +using SFA.DAS.CommitmentsV2.Data; +using SFA.DAS.CommitmentsV2.Models; +using SFA.DAS.CommitmentsV2.Types; +using SFA.DAS.Testing.Builders; + +namespace SFA.DAS.CommitmentsV2.UnitTests.Application.Queries.GetPendingLearnerChangeCount +{ + [TestFixture] + public class GetPendingLearnerChangeCountsForEmployerQueryHandlerTests + { + private GetPendingLearnerChangeCountsForEmployerQueryHandlerTestsFixture _fixture; + + [SetUp] + public void Arrange() + { + _fixture = new GetPendingLearnerChangeCountsForEmployerQueryHandlerTestsFixture(); + } + + [TearDown] + public void TearDown() + { + _fixture?.Dispose(); + } + + [Test] + public async Task Handle_ThenShouldFindNoPendingRequests() + { + var result = await _fixture.Handle(222); + + result.ManualPendingChangeCount.Should().Be(0); + result.IlrPendingChangeCount.Should().Be(0); + } + + [Test] + public async Task Handle_ThenShouldFindPendingManualRequests() + { + var result = await _fixture.AddApprenticeshipUpdates().Handle(222); + + result.ManualPendingChangeCount.Should().Be(2); + result.IlrPendingChangeCount.Should().Be(0); + } + + [Test] + public async Task Handle_ThenShouldFindPendingIlrRequests() + { + var result = await _fixture.AddIlrUpdates().Handle(222); + + result.ManualPendingChangeCount.Should().Be(0); + result.IlrPendingChangeCount.Should().Be(2); + } + + [Test] + public async Task Handle_ThenShouldFindPendingIlrAndManualRequests() + { + var result = await _fixture.AddApprenticeshipUpdates().AddIlrUpdates().Handle(222); + + result.ManualPendingChangeCount.Should().Be(2); + result.IlrPendingChangeCount.Should().Be(2); + } + + [Test] + public async Task Handle_ThenShouldNotFindPendingIlrAndManualRequestsWhenLookingForAnotherEmployer() + { + var result = await _fixture.AddApprenticeshipUpdates().AddIlrUpdates().Handle(123); + + result.ManualPendingChangeCount.Should().Be(0); + result.IlrPendingChangeCount.Should().Be(0); + } + + [TestCase(CocApprovalResultStatus.Complete)] + [TestCase(CocApprovalResultStatus.Superseded)] + [TestCase(CocApprovalResultStatus.Cancelled)] + public async Task Handle_ThenShouldNotFindPendingIlrRequestsWhenStatusIs(CocApprovalResultStatus status) + { + var result = await _fixture.AddIlrUpdates(status).Handle(222); + + result.IlrPendingChangeCount.Should().Be(0); + } + + [TestCase(ApprenticeshipUpdateStatus.Approved)] + [TestCase(ApprenticeshipUpdateStatus.Rejected)] + [TestCase(ApprenticeshipUpdateStatus.Deleted)] + [TestCase(ApprenticeshipUpdateStatus.Superceded)] + [TestCase(ApprenticeshipUpdateStatus.Expired)] + public async Task Handle_ThenShouldNotFindPendingManualRequestsWhenStatusIs(ApprenticeshipUpdateStatus status) + { + var result = await _fixture.AddApprenticeshipUpdates(status).Handle(222); + + result.ManualPendingChangeCount.Should().Be(0); + } + + public class GetPendingLearnerChangeCountsForEmployerQueryHandlerTestsFixture : IDisposable + { + private readonly GetPendingLearnerChangeCountsForEmployerQueryHandler _handler; + private readonly ProviderCommitmentsDbContext _db; + private GetPendingLearnerChangeCountsForEmployerQueryResult _result; + private readonly Fixture _autoFixture; + + public GetPendingLearnerChangeCountsForEmployerQueryHandlerTestsFixture() + { + _autoFixture = new Fixture(); + _autoFixture.Behaviors.Add(new OmitOnRecursionBehavior()); + + _db = new ProviderCommitmentsDbContext(new DbContextOptionsBuilder().UseInMemoryDatabase(Guid.NewGuid().ToString(), b => b.EnableNullChecks(false)).Options); + + SeedData(); + + _handler = new GetPendingLearnerChangeCountsForEmployerQueryHandler(new Lazy(() => _db)); + } + + public async Task Handle(long employerAccountId) + { + _result = await _handler.Handle(new GetPendingLearnerChangeCountsForEmployerQuery(employerAccountId), new CancellationToken()); + return _result; + } + + + public void SeedData() + { + var cohort = new Cohort() + .Set(c => c.Id, 111) + .Set(c => c.EmployerAccountId, 222) + .Set(c => c.ProviderId, 333) + .Set(c => c.AccountLegalEntity, new AccountLegalEntity()); + + for (var i = 1001; i < 1005; i++) + { + var apprenticeship = _autoFixture.Build() + .With(s => s.Cohort, cohort) + .With(s => s.PaymentStatus, PaymentStatus.Active) + .With(s => s.EndDate, DateTime.UtcNow.AddYears(1)) + .With(s => s.StartDate, DateTime.UtcNow.AddDays(-10)) + .Without(s => s.DataLockStatus) + .Without(s => s.EpaOrg) + .Without(s => s.ApprenticeshipUpdate) + .Without(s => s.ApprovalRequests) + .Without(s => s.Continuation) + .Without(s => s.PreviousApprenticeship) + .Without(s => s.CompletionDate) + .Without(s => s.EmailAddressConfirmed) + .Without(s => s.ApprenticeshipConfirmationStatus) + .Create(); + cohort.Apprenticeships.Add(apprenticeship); + _db.Apprenticeships.Add(apprenticeship); + } + + _db.Cohorts.Add(cohort); + _db.SaveChanges(); + } + + public GetPendingLearnerChangeCountsForEmployerQueryHandlerTestsFixture AddApprenticeshipUpdates( + ApprenticeshipUpdateStatus withStatus = ApprenticeshipUpdateStatus.Pending) + { + + var apprenticeship1 = _db.Apprenticeships.First(); + _db.ApprenticeshipUpdates.Add(CreateManualUpdate(apprenticeship1)); + var apprenticeship2 = _db.Apprenticeships.Last(); + _db.ApprenticeshipUpdates.Add(CreateManualUpdate(apprenticeship2)); + + _db.SaveChanges(); + return this; + + ApprenticeshipUpdate CreateManualUpdate(Apprenticeship apprenticeship) => _autoFixture.Build() + .With(s => s.ApprenticeshipId, apprenticeship.Id) + .With(s => s.Originator, Originator.Provider) + .With(s => s.Status, withStatus) + .With(s => s.Apprenticeship, apprenticeship) + .Without(s => s.DataLockStatus) + .Create(); + } + + public GetPendingLearnerChangeCountsForEmployerQueryHandlerTestsFixture AddIlrUpdates( + CocApprovalResultStatus withStatus = CocApprovalResultStatus.Pending) + { + var apprenticeship1 = _db.Apprenticeships.First(); + _db.ApprovalRequests.Add(CreateIlrUpdate(apprenticeship1)); + var apprenticeship2 = _db.Apprenticeships.Last(); + _db.ApprovalRequests.Add(CreateIlrUpdate(apprenticeship2)); + + _db.SaveChanges(); + return this; + + ApprovalRequest CreateIlrUpdate(Apprenticeship apprenticeship) => _autoFixture.Build() + .With(s => s.ApprenticeshipId, apprenticeship.Id) + .With(s => s.Status, withStatus) + .With(s => s.Apprenticeship, apprenticeship) + .Create(); + } + + public void Dispose() + { + _db?.Dispose(); + GC.SuppressFinalize(this); + } + } + } +} \ No newline at end of file diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Services/ResolveOverlappingTrainingDateRequestServiceTests.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Services/ResolveOverlappingTrainingDateRequestServiceTests.cs index e6a87b7a1..b21c1e9a4 100644 --- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Services/ResolveOverlappingTrainingDateRequestServiceTests.cs +++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Services/ResolveOverlappingTrainingDateRequestServiceTests.cs @@ -335,6 +335,7 @@ private void SeedData() .Without(s => s.ApprenticeshipConfirmationStatus) .Without(s => s.OverlappingTrainingDateRequests) .Without(s => s.EmployerVerificationRequest) + .Without(s => s.ApprovalRequests) .Create(); Db.Apprenticeships.Add(ApprenticeshipDetails); diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQuery.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQuery.cs new file mode 100644 index 000000000..3c89bde15 --- /dev/null +++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQuery.cs @@ -0,0 +1,11 @@ +namespace SFA.DAS.CommitmentsV2.Application.Queries.GetPendingLearnerChangeCount; + +public class GetPendingLearnerChangeCountsForEmployerQuery : IRequest +{ + public long EmployerAccountId { get; } + + public GetPendingLearnerChangeCountsForEmployerQuery(long employerAccountId) + { + EmployerAccountId = employerAccountId; + } +} \ No newline at end of file diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQueryHandler.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQueryHandler.cs new file mode 100644 index 000000000..ac31b8ba0 --- /dev/null +++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQueryHandler.cs @@ -0,0 +1,28 @@ +using SFA.DAS.CommitmentsV2.Data; +using SFA.DAS.CommitmentsV2.Models; +using SFA.DAS.CommitmentsV2.Types; + +namespace SFA.DAS.CommitmentsV2.Application.Queries.GetPendingLearnerChangeCount; + +public class GetPendingLearnerChangeCountsForEmployerQueryHandler(Lazy db) : IRequestHandler +{ + public async Task Handle(GetPendingLearnerChangeCountsForEmployerQuery request, CancellationToken cancellationToken) + { + var apprenticeshipUpdates = db.Value.ApprenticeshipUpdates + .Where(u => u.Apprenticeship.Cohort.EmployerAccountId == request.EmployerAccountId) + .Where(u => u.Status == ApprenticeshipUpdateStatus.Pending + && u.Originator == Originator.Provider + ); + + var pendingCocRequests = db.Value.ApprovalRequests + .Where(r => r.Apprenticeship.Cohort.EmployerAccountId == request.EmployerAccountId) + .Where(r => r.Status == CocApprovalResultStatus.Pending); + + return new GetPendingLearnerChangeCountsForEmployerQueryResult + { + ManualPendingChangeCount = await apprenticeshipUpdates.CountAsync(cancellationToken), + IlrPendingChangeCount = await pendingCocRequests.CountAsync(cancellationToken) + }; + } +} + diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQueryResult.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQueryResult.cs new file mode 100644 index 000000000..56735f834 --- /dev/null +++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQueryResult.cs @@ -0,0 +1,7 @@ +namespace SFA.DAS.CommitmentsV2.Application.Queries.GetPendingLearnerChangeCount; + +public class GetPendingLearnerChangeCountsForEmployerQueryResult +{ + public int ManualPendingChangeCount { get; set; } + public int IlrPendingChangeCount { get; set; } +} \ No newline at end of file diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQueryValidator.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQueryValidator.cs new file mode 100644 index 000000000..2c1169a33 --- /dev/null +++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Queries/GetPendingLearnerChangeCount/GetPendingLearnerChangeCountsForEmployerQueryValidator.cs @@ -0,0 +1,11 @@ +using FluentValidation; + +namespace SFA.DAS.CommitmentsV2.Application.Queries.GetPendingLearnerChangeCount; + +public class GetPendingLearnerChangeCountsForEmployerQueryValidator : AbstractValidator +{ + public GetPendingLearnerChangeCountsForEmployerQueryValidator() + { + RuleFor(x => x.EmployerAccountId).GreaterThan(0); + } +} \ No newline at end of file diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Data/Configuration/ApprovalRequestConfiguration.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Data/Configuration/ApprovalRequestConfiguration.cs index 9b8fb4f8a..70f288527 100644 --- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Data/Configuration/ApprovalRequestConfiguration.cs +++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Data/Configuration/ApprovalRequestConfiguration.cs @@ -15,5 +15,10 @@ public void Configure(EntityTypeBuilder builder) .WithOne(x => x.ApprovalRequest) .HasForeignKey(x => x.ApprovalRequestId) .OnDelete(DeleteBehavior.Cascade); + + builder.HasOne(ar => ar.Apprenticeship) + .WithMany(a => a.ApprovalRequests) + .HasForeignKey(ar => ar.ApprenticeshipId) + .HasPrincipalKey(a => a.Id); } } \ No newline at end of file diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/Apprenticeship.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/Apprenticeship.cs index 27db2ed17..dffa977ec 100644 --- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/Apprenticeship.cs +++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/Apprenticeship.cs @@ -17,6 +17,7 @@ public class Apprenticeship : ApprenticeshipBase, ITrackableEntity public virtual ICollection DataLockStatus { get; set; } public virtual ICollection PriceHistory { get; set; } public virtual ICollection ChangeOfPartyRequests { get; set; } + public virtual ICollection ApprovalRequests { get; set; } public virtual ApprenticeshipBase Continuation { get; set; } public virtual EmployerVerificationRequest EmployerVerificationRequest { get; set; } diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/ApprovalRequest.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/ApprovalRequest.cs index 4ddfeb2db..7bcca3e5e 100644 --- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/ApprovalRequest.cs +++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/ApprovalRequest.cs @@ -17,4 +17,5 @@ public ApprovalRequest() public string ULN { get; set; } public CocApprovalResultStatus? Status { get; set; } public virtual ICollection Items { get; set; } + public virtual Apprenticeship Apprenticeship { get; set; } } \ No newline at end of file