< Summary

Information
Class: Services.BitrixStockServices.BitrixStockArticleHistoryRowDto
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/BitrixStockServices/BitrixStockSyncArticleHistoryModels.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 60
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_Line()100%11100%
get_Price()100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/BitrixStockServices/BitrixStockSyncArticleHistoryModels.cs

#LineLine coverage
 1namespace Services.BitrixStockServices;
 2
 3public class BitrixStockArticleHistoryPageDto
 4{
 5    public const int DefaultExportReportLimit = 100;
 6
 7    public string? Article { get; set; } = string.Empty;
 8    public int Page { get; set; }
 9    public int PageSize { get; set; }
 10    public int TotalReportCount { get; set; }
 11    public bool HasMore => Page * PageSize < TotalReportCount;
 12    public List<BitrixStockArticleHistoryReportBlockDto> Reports { get; set; } = new();
 13
 14    /// <summary>Глобально по артикулу (все отчёты) — для единой шапки таблицы при пагинации.</summary>
 15    public bool HasPrices { get; set; }
 16    public bool HasPushes { get; set; }
 17    public bool IsMultiClient { get; set; }
 18    public int TotalDataRowCount => Reports.Sum(r => r.Rows.Count);
 19
 20    /// <summary>true — в выборку попали не все отчёты (лимит экспорта).</summary>
 21    public bool ExportTruncated { get; set; }
 22    public int? ExportReportLimit { get; set; }
 23
 24    public int TableColumnCount
 25    {
 26        get
 27        {
 28            var cols = 14;
 29            if (HasPrices) cols += 3;
 30            if (HasPushes) cols += 7;
 31            return cols;
 32        }
 33    }
 34}
 35
 36public class BitrixStockArticleHistoryReportBlockDto
 37{
 38    public string? ReportId { get; set; } = string.Empty;
 39    public DateTime GeneratedAtUtc { get; set; }
 40    public string? OzonClientName { get; set; } = string.Empty;
 41    public List<int> MultiClientIds { get; set; } = new();
 42    public Dictionary<int, string> MultiClientNames { get; set; } = new();
 43    public bool IsMultiClient => MultiClientIds.Count > 1;
 44    public bool HasPrices { get; set; }
 45    public bool HasPushes { get; set; }
 46    public List<BitrixStockArticleHistoryRowDto> Rows { get; set; } = new();
 47}
 48
 49public class BitrixStockArticleHistoryRowDto
 50{
 82151    public BitrixStockSyncReportWarehouseLineDto Line { get; set; } = new();
 45952    public OzonPriceInfoDto? Price { get; set; }
 53}
 54
 55public class BitrixStockArticleHistoryViewModel
 56{
 57    public BitrixStockArticleHistoryPageDto Page { get; set; } = new();
 58    /// <summary>true — только блоки отчётов (для append page 2+).</summary>
 59    public bool AppendOnly { get; set; }
 60}

Methods/Properties

get_Line()
get_Price()