40 lines
926 B
C#
40 lines
926 B
C#
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
|
|
} |