-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for creating alerts against a person in the TRS database …
…to use in tests (#1501)
- Loading branch information
Showing
15 changed files
with
240 additions
and
27 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
...dSystem/src/TeachingRecordSystem.Core/DataStore/Postgres/Models/MandatoryQualification.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
9 changes: 9 additions & 0 deletions
9
TeachingRecordSystem/src/TeachingRecordSystem.Core/Events/AlertCreatedEvent.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,9 @@ | ||
using TeachingRecordSystem.Core.Events.Models; | ||
|
||
namespace TeachingRecordSystem.Core.Events; | ||
|
||
public record class AlertCreatedEvent : EventBase, IEventWithPersonId, IEventWithAlert | ||
{ | ||
public required Guid PersonId { get; init; } | ||
public required Alert Alert { get; init; } | ||
} |
8 changes: 8 additions & 0 deletions
8
TeachingRecordSystem/src/TeachingRecordSystem.Core/Events/IEventWithAlert.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,8 @@ | ||
using TeachingRecordSystem.Core.Events.Models; | ||
|
||
namespace TeachingRecordSystem.Core.Events; | ||
|
||
public interface IEventWithAlert | ||
{ | ||
Alert Alert { get; } | ||
} |
21 changes: 21 additions & 0 deletions
21
TeachingRecordSystem/src/TeachingRecordSystem.Core/Events/Models/Alert.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,21 @@ | ||
namespace TeachingRecordSystem.Core.Events.Models; | ||
|
||
public record Alert | ||
{ | ||
public required Guid AlertId { get; init; } | ||
public required Guid AlertTypeId { get; init; } | ||
public required string? Details { get; init; } | ||
public required string? ExternalLink { get; init; } | ||
public required DateOnly? StartDate { get; init; } | ||
public required DateOnly? EndDate { get; init; } | ||
|
||
public static Alert FromModel(DataStore.Postgres.Models.Alert model) => new() | ||
{ | ||
AlertId = model.AlertId, | ||
AlertTypeId = model.AlertTypeId, | ||
Details = model.Details, | ||
ExternalLink = model.ExternalLink, | ||
StartDate = model.StartDate, | ||
EndDate = model.EndDate | ||
}; | ||
} |
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
1 change: 0 additions & 1 deletion
1
...achingRecordSystem.Core.Tests/Services/Establishments/Gias/EstablishmentRefresherTests.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
1 change: 0 additions & 1 deletion
1
...hingRecordSystem.Core.Tests/Services/Establishments/Tps/TpsEstablishmentRefresherTests.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
1 change: 0 additions & 1 deletion
1
...sts/TeachingRecordSystem.Core.Tests/Services/PersonMatching/PersonMatchingServiceTests.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
1 change: 0 additions & 1 deletion
1
...stem/tests/TeachingRecordSystem.Core.Tests/Services/TrsDataSync/TrsDataSyncHelperTests.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
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
1 change: 0 additions & 1 deletion
1
...sts/TeachingRecordSystem.Core.Tests/Services/WorkforceData/TpsCsvExtractProcessorTests.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
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
Oops, something went wrong.