Added English voice work updater.
This commit is contained in:
40
JSMR.Infrastructure/Ingestion/VoiceWorkUpsertContext.cs
Normal file
40
JSMR.Infrastructure/Ingestion/VoiceWorkUpsertContext.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using JSMR.Domain.Entities;
|
||||
|
||||
namespace JSMR.Infrastructure.Ingestion;
|
||||
|
||||
public record VoiceWorkUpsertContext(
|
||||
DateTimeOffset CurrentScanAnchor,
|
||||
DateTimeOffset PreviousScanAnchor,
|
||||
Dictionary<string, Circle> Circles,
|
||||
Dictionary<string, VoiceWork> VoiceWorks,
|
||||
Dictionary<string, Tag> Tags,
|
||||
Dictionary<string, Creator> Creators,
|
||||
Dictionary<string, VoiceWorkUpsertResult> Results
|
||||
);
|
||||
|
||||
public class VoiceWorkUpsertResult
|
||||
{
|
||||
public int? VoiceWorkId { get; set; }
|
||||
public ICollection<VoiceWorkUpsertIssue> Issues { get; } = [];
|
||||
public VoiceWorkUpsertStatus Status { get; set; } = VoiceWorkUpsertStatus.Unchanged;
|
||||
}
|
||||
|
||||
public record VoiceWorkUpsertIssue(
|
||||
string Message,
|
||||
VoiceWorkUpsertIssueSeverity Severity
|
||||
);
|
||||
|
||||
public enum VoiceWorkUpsertIssueSeverity
|
||||
{
|
||||
Information,
|
||||
Warning,
|
||||
Error
|
||||
}
|
||||
|
||||
public enum VoiceWorkUpsertStatus
|
||||
{
|
||||
Unchanged,
|
||||
Inserted,
|
||||
Updated,
|
||||
Skipped
|
||||
}
|
||||
Reference in New Issue
Block a user