< Summary

Information
Class: Services.ChannelTaskServices.BitrixSyncReportTaskPayload
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ChannelTaskServices/ChannelTaskModels.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 68
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_ReportId()100%11100%
get_Query()100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ChannelTaskServices/ChannelTaskModels.cs

#LineLine coverage
 1using Services.BitrixStockServices;
 2
 3namespace Services.ChannelTaskServices;
 4
 5public static class ChannelTaskStages
 6{
 7    public const string Queued = "queued";
 8    public const string Loading = "loading";
 9    public const string Building = "building";
 10    public const string Saving = "saving";
 11    public const string Sending = "sending";
 12    public const string Completed = "completed";
 13    public const string Failed = "failed";
 14}
 15
 16public enum ChannelTaskType
 17{
 18    BitrixSyncReportExcel,
 19    BitrixSyncReportEmail,
 20    TransactionExcel
 21}
 22
 23public enum ChannelTaskResultKind
 24{
 25    None,
 26    File,
 27    Email
 28}
 29
 30public sealed class ChannelTaskState
 31{
 32    public string TaskId { get; init; } = string.Empty;
 33    public ChannelTaskType Type { get; init; }
 34    public string? Status { get; set; } = ChannelTaskStages.Queued;
 35    public string? Stage { get; set; } = ChannelTaskStages.Queued;
 36    public string? Message { get; set; } = "Ожидание запуска…";
 37    public int Current { get; set; }
 38    public int Total { get; set; }
 39    public int Percent { get; set; }
 40    public string? FileName { get; set; }
 41    public string? Error { get; set; }
 42    public ChannelTaskResultKind ResultKind { get; set; } = ChannelTaskResultKind.None;
 43    public string? ReportId { get; set; }
 44    public DateTime CreatedAtUtc { get; init; } = DateTime.UtcNow;
 45    public DateTime? StartedAtUtc { get; set; }
 46    public DateTime? CompletedAtUtc { get; set; }
 47}
 48
 49internal sealed class ChannelTaskWorkItem
 50{
 51    public required string TaskId { get; init; }
 52    public required ChannelTaskType Type { get; init; }
 53    public required string PayloadJson { get; init; }
 54}
 55
 56public sealed class BitrixSyncReportTaskPayload
 57{
 52358    public string? ReportId { get; set; } = string.Empty;
 23859    public BitrixStockSyncReportQuery? Query { get; set; }
 60}
 61
 62public sealed class TransactionExcelTaskPayload
 63{
 64    public int? TransactionId { get; set; }
 65    public int[] OrderIds { get; set; } = Array.Empty<int>();
 66    public int[] DeletedOrderIds { get; set; } = Array.Empty<int>();
 67    public bool TableMode { get; set; }
 68}

Methods/Properties

get_ReportId()
get_Query()