< Summary

Information
Class: OzonDomains.Models.BitrixModels.RemainingStockBitrix
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/BitrixModels/RemainingStockBitrix.cs
Line coverage
86%
Covered lines: 19
Uncovered lines: 3
Coverable lines: 22
Total lines: 33
Line coverage: 86.3%
Branch coverage
10%
Covered branches: 1
Total branches: 10
Branch coverage: 10%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_ProductId()100%11100%
get_Article()100%11100%
get_PreviewText()100%11100%
get_Active()100%11100%
get_Available()100%11100%
get_Supplier()100%11100%
get_MarketPrefix()100%11100%
get_TimestampX()100%11100%
get_Quantity()100%11100%
get_Price()100%11100%
get_C0()100%11100%
get_ActiveDisplay()0%620%
get_AvailableDisplay()0%620%
get_ArticleWithKey()16.66%66100%
get_PriceHistory()100%11100%
get_BatchMultiplier()100%11100%
get_BatchBaseOfferId()100%210%
get_Stores()100%11100%
get_OzonStores()100%11100%
get_OzonPriceIndexes()100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/BitrixModels/RemainingStockBitrix.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations.Schema;
 2using OzonOrdersWeb.Areas.Studio2.ViewModels.Bitrix;
 3using OzonRepositories.Data.Bitrix;
 4
 5namespace OzonDomains.Models.BitrixModels;
 6
 7public class RemainingStockBitrix
 8{
 299    public int ProductId { get; set; }
 2410    public string? Article { get; set; }
 611    public string? PreviewText { get; set; }
 6012    public string Active { get; set; } = "Y";
 3013    public string Available { get; set; } = "Y";
 614    public string? Supplier { get; set; }
 2215    [NotMapped] public string? MarketPrefix { get; set; }
 616    public DateTime TimestampX { get; set; }
 217    public double Quantity { get; set; }
 618    public double? Price { get; set; }
 119    public decimal? C0 { get; set; }
 020    public string ActiveDisplay => Active == "Y" ? "Да" : "Нет";
 021    public string AvailableDisplay => Available == "Y" ? "Да" : "Нет";
 522    public string ArticleWithKey => string.IsNullOrWhiteSpace(MarketPrefix)
 523        ? Article?.Trim() ?? string.Empty
 524        : $"{Article}={MarketPrefix}";
 1625    [NotMapped] public PriceHistory? PriceHistory { get; set; }
 26    /// <summary>Размер партии [N] из артикула (напр. 50 для «9018906140=TYT[50]»). 1 = не партийный.</summary>
 2927    [NotMapped] public int BatchMultiplier { get; set; } = 1;
 28    /// <summary>Базовый offer_id партии (напр. «9018906140=TYT»). Null = не партийный.</summary>
 029    [NotMapped] public string? BatchBaseOfferId { get; set; }
 8730    public List<StockByStore> Stores { get; set; } = new();
 8331    public List<StockByStore> OzonStores { get; set; } = new();
 3632    public List<OzonPriceIndexes> OzonPriceIndexes { get; set; } = new List<OzonPriceIndexes>();
 33}