< Summary

Information
Class: Services.BitrixStockServices.BitrixSyncGridLineDto
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/BitrixStockServices/BitrixStockSyncReportGridModels.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 48
Coverable lines: 48
Total lines: 117
Line coverage: 0%
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

File(s)

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

#LineLine coverage
 1namespace Services.BitrixStockServices;
 2
 3/// <summary>
 4/// Запрос блока строк отчёта синхронизации для AG Grid (Infinite Row Model): диапазон строк, сортировки и
 5/// условия по колонкам уже нормализованы веб-слоем; SQL строится только по whitelist-каталогу
 6/// <see cref="BitrixStockSyncReportGridSql"/>.
 7/// </summary>
 8public sealed class BitrixSyncGridLinesQuery
 9{
 10    public int StartRow { get; set; }
 11    public int EndRow { get; set; } = 100;
 12    /// <summary>Быстрый поиск: артикул, offer_id, склады, примечание.</summary>
 13    public string? Search { get; set; }
 14    public List<BitrixSyncGridSort> Sorts { get; set; } = new();
 15    public List<BitrixSyncGridCondition> Conditions { get; set; } = new();
 16    /// <summary>Показывать строки 1С = 0 и Ozon = 0 (по умолчанию скрыты как шум).</summary>
 17    public bool ShowZero { get; set; }
 18    /// <summary>Только строки, где был накат цены (этап 4) — успешный или с ошибкой.</summary>
 19    public bool OnlyPriceChanged { get; set; }
 20    /// <summary>Отключённые пользователем связи складов: «clientId|склад 1С|склад Ozon».</summary>
 21    public List<string> ExcludedMappings { get; set; } = new();
 22}
 23
 24public sealed class BitrixSyncGridSort
 25{
 26    public string ColId { get; set; } = string.Empty;
 27    public bool Descending { get; set; }
 28}
 29
 30public enum BitrixSyncGridConditionKind
 31{
 32    Text,
 33    Number,
 34    Set
 35}
 36
 37/// <summary>
 38/// Условие фильтра по колонке. Операторы — как у AG Grid: contains, notContains, equals, notEqual, startsWith,
 39/// endsWith, blank, notBlank, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, inRange.
 40/// </summary>
 41public sealed class BitrixSyncGridCondition
 42{
 43    public string ColId { get; set; } = string.Empty;
 44    public BitrixSyncGridConditionKind Kind { get; set; }
 45    public string Operator { get; set; } = "contains";
 46    public string? Text { get; set; }
 47    public decimal? Number { get; set; }
 48    public decimal? NumberTo { get; set; }
 49    public List<string> Values { get; set; } = new();
 50}
 51
 52/// <summary>Строка отчёта для грида: поля строки + цены Ozon из снимка отчёта и вычисляемые признаки.</summary>
 53public sealed class BitrixSyncGridLineDto
 54{
 055    public long LineId { get; set; }
 056    public int ProductId { get; set; }
 057    public string Article { get; set; } = string.Empty;
 058    public string? OfferId { get; set; }
 059    public string? ManufacturerName { get; set; }
 060    public string OneCStore { get; set; } = string.Empty;
 061    public string OzonWarehouseName { get; set; } = string.Empty;
 062    public long OzonWarehouseId { get; set; }
 063    public string MappingDescription { get; set; } = string.Empty;
 064    public int OneCQty { get; set; }
 065    public int OzonQty { get; set; }
 066    public int Delta { get; set; }
 067    public int ReservedQty { get; set; }
 068    public int? TargetQty { get; set; }
 069    public int? OzonQtyAfter { get; set; }
 070    public string Action { get; set; } = string.Empty;
 071    public string ActionLabel { get; set; } = string.Empty;
 072    public string ActionIcon { get; set; } = string.Empty;
 073    public string RowClass { get; set; } = string.Empty;
 074    public string? Note { get; set; }
 075    public long? OzonProductId { get; set; }
 076    public string? OzonApplyStatus { get; set; }
 077    public DateTime? OzonAppliedUtc { get; set; }
 078    public string? OzonApplyError { get; set; }
 079    public string? OzonCleanupStatus { get; set; }
 080    public DateTime? OzonCleanupAtUtc { get; set; }
 081    public string? OzonCleanupError { get; set; }
 082    public int OzonClientId { get; set; }
 083    public string OzonClientName { get; set; } = string.Empty;
 084    public decimal? OneCPrice { get; set; }
 085    public decimal? PrevOneCPrice { get; set; }
 86    /// <summary>equal / similar / up / down / none — как фильтр «Δ C0» старой страницы.</summary>
 087    public string DeltaC0 { get; set; } = "none";
 088    public bool IsArchived { get; set; }
 089    public bool IsAutoArchived { get; set; }
 090    public bool InPromo { get; set; }
 091    public string? PromoName { get; set; }
 092    public bool IsOzonOrphan { get; set; }
 093    public string? OzonOrphanStatus { get; set; }
 094    public int BatchMultiplier { get; set; } = 1;
 095    public string? BatchBaseArticle { get; set; }
 096    public decimal? BatchPushedPrice { get; set; }
 097    public decimal? TruePrice { get; set; }
 098    public decimal? SellingPrice { get; set; }
 99    /// <summary>Индекс цены, сведённый к корзинам SUPER / GREEN / YELLOW / RED / NONE.</summary>
 0100    public string ColorIndex { get; set; } = "NONE";
 0101    public decimal? PricePushedOld { get; set; }
 0102    public decimal? PricePushedNew { get; set; }
 0103    public string? PricePushStatus { get; set; }
 0104    public string? PricePushError { get; set; }
 105}
 106
 107public sealed class BitrixSyncGridLinesResult
 108{
 109    public List<BitrixSyncGridLineDto> Rows { get; set; } = new();
 110    public int TotalCount { get; set; }
 111}
 112
 113public sealed class BitrixSyncGridFacetValue
 114{
 115    public string Value { get; set; } = string.Empty;
 116    public int Count { get; set; }
 117}