< Summary

Information
Class: OzonDomains.Models.NikeiCartItem
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/NikeiCartItem.cs
Line coverage
100%
Covered lines: 24
Uncovered lines: 0
Coverable lines: 24
Total lines: 46
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_Id()100%11100%
get_StudioOrderId()100%11100%
get_ActiveStudioOrderId()100%11100%
get_StudioOrder()100%11100%
get_ToCart()100%11100%
get_ToOrder()100%11100%
get_ProductKey()100%11100%
get_Article()100%11100%
get_Brand()100%11100%
get_ProductName()100%11100%
get_WarehouseName()100%11100%
get_Quantity()100%11100%
get_Multiplicity()100%11100%
get_Stock()100%11100%
get_SourcePrice()100%11100%
get_DeliveryDaysMin()100%11100%
get_DeliveryDaysMax()100%11100%
get_Comment()100%11100%
get_Status()100%11100%
get_ExternalOrderNumber()100%11100%
get_LastError()100%11100%
get_CreatedBy()100%11100%
get_CreatedAtUtc()100%11100%
get_UpdatedAtUtc()100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/NikeiCartItem.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3
 4namespace OzonDomains.Models;
 5
 6/// <summary>Зеркало позиции реальной корзины Nikei, добавленной из Studio2.</summary>
 7[Table("NikeiCartItems")]
 8public sealed class NikeiCartItem
 9{
 4510    public long Id { get; set; }
 6911    public int StudioOrderId { get; set; }
 7512    public int? ActiveStudioOrderId { get; set; }
 313    public Order? StudioOrder { get; set; }
 14
 15    /// <summary>Токен из проценки, допустимый только для POST /account/cart/add.</summary>
 10516    [Required] public string ToCart { get; set; } = string.Empty;
 17    /// <summary>Токен позиции внешней корзины, используемый в /account/order/create.</summary>
 6418    [MaxLength(128)] public string? ToOrder { get; set; }
 1319    [MaxLength(128)] public string? ProductKey { get; set; }
 10520    [Required, MaxLength(60)] public string Article { get; set; } = string.Empty;
 10521    [Required, MaxLength(120)] public string Brand { get; set; } = string.Empty;
 1322    [MaxLength(250)] public string? ProductName { get; set; }
 2723    [MaxLength(250)] public string? WarehouseName { get; set; }
 1324    public int Quantity { get; set; }
 6825    public int Multiplicity { get; set; } = 1;
 1326    public int? Stock { get; set; }
 1327    public decimal? SourcePrice { get; set; }
 2328    public int? DeliveryDaysMin { get; set; }
 2329    public int? DeliveryDaysMax { get; set; }
 1330    [MaxLength(1000)] public string? Comment { get; set; }
 12231    [Required, MaxLength(30)] public string Status { get; set; } = NikeiCartItemStatus.Pending;
 1132    [MaxLength(80)] public string? ExternalOrderNumber { get; set; }
 1033    [MaxLength(1000)] public string? LastError { get; set; }
 1334    [MaxLength(450)] public string? CreatedBy { get; set; }
 5835    public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
 7036    public DateTime UpdatedAtUtc { get; set; } = DateTime.UtcNow;
 37}
 38
 39public static class NikeiCartItemStatus
 40{
 41    public const string Pending = "Pending";
 42    public const string Ordered = "Ordered";
 43    public const string Failed = "Failed";
 44    public const string Removed = "Removed";
 45    public static readonly string[] Active = [Pending, Failed];
 46}