-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #504 from SkillsFundingAgency/CV-134-prevent-dupli…
…cate-reservations CV-134 Prevent duplicate reservations & publish CreatedDraftApprenticeshipEvent
- Loading branch information
Showing
11 changed files
with
84 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/CommitmentsV2/SFA.DAS.CommitmentsV2.Messages/Events/DraftApprenticeshipCreatedEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
|
||
namespace SFA.DAS.CommitmentsV2.Messages.Events | ||
{ | ||
public class DraftApprenticeshipCreatedEvent | ||
{ | ||
public long DraftApprenticeshipId { get; } | ||
public long CohortId { get; } | ||
public string Uln { get; } | ||
public Guid ReservationId { get; } | ||
public DateTime CreatedOn { get; } | ||
|
||
public DraftApprenticeshipCreatedEvent(long draftApprenticeshipId, long cohortId, string uln, Guid reservationId, DateTime createdOn) | ||
{ | ||
DraftApprenticeshipId = draftApprenticeshipId; | ||
CohortId = cohortId; | ||
Uln = uln; | ||
ReservationId = reservationId; | ||
CreatedOn = createdOn; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using SFA.DAS.UnitOfWork; | ||
|
||
namespace SFA.DAS.CommitmentsV2.Models | ||
{ | ||
public abstract class Entity | ||
{ | ||
protected void Publish<T>(Func<T> action) where T : class | ||
{ | ||
UnitOfWorkContext.AddEvent(action); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters