< Summary

Information
Class: OzonDomains.Models.ProfitLigaOrderItem
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/ProfitLigaOrder.cs
Line coverage
86%
Covered lines: 13
Uncovered lines: 2
Coverable lines: 15
Total lines: 58
Line coverage: 86.6%
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_ProfitLigaOrderId()100%11100%
get_ProfitLigaOrder()100%11100%
get_ProfitLigaCartItemId()100%11100%
get_ProfitLigaCartItem()100%210%
get_StudioOrderId()100%11100%
get_Article()100%11100%
get_Brand()100%11100%
get_ArticleId()100%11100%
get_ProductCode()100%11100%
get_Quantity()100%11100%
get_Price()100%11100%
get_CurrencyCode()100%11100%
get_ExternalLineId()100%11100%
get_Error()100%210%

File(s)

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

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3
 4namespace OzonDomains.Models;
 5
 6/// <summary>Заказ, созданный в Профит-Лиге. Один вызов POST /cart/order может создать несколько
 7/// заказов — поставщик разбивает корзину по складам, и на каждый номер заводится своя строка.</summary>
 8[Table("ProfitLigaOrders")]
 9public sealed class ProfitLigaOrder
 10{
 11    public long Id { get; set; }
 12
 13    [Required, MaxLength(50)] public string OrderNumber { get; set; } = string.Empty;
 14
 15    [MaxLength(120)] public string? PointCode { get; set; }
 16    [MaxLength(300)] public string? PointName { get; set; }
 17    [MaxLength(20)] public string? DeliveryMethodId { get; set; }
 18    [MaxLength(100)] public string? DeliveryMethodName { get; set; }
 19    [MaxLength(20)] public string? PaymentId { get; set; }
 20    [MaxLength(100)] public string? PaymentName { get; set; }
 21
 22    [Required, MaxLength(50)] public string Status { get; set; } = "Создан";
 23
 24    [MaxLength(450)] public string? CreatedBy { get; set; }
 25    public string? RequestJson { get; set; }
 26    public string? ResponseJson { get; set; }
 27    public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
 28
 29    public ICollection<ProfitLigaOrderItem> Items { get; set; } = new List<ProfitLigaOrderItem>();
 30}
 31
 32[Table("ProfitLigaOrderItems")]
 33public sealed class ProfitLigaOrderItem
 34{
 535    public long Id { get; set; }
 36
 537    public long ProfitLigaOrderId { get; set; }
 538    public ProfitLigaOrder ProfitLigaOrder { get; set; } = null!;
 39
 840    public long? ProfitLigaCartItemId { get; set; }
 041    public ProfitLigaCartItem? ProfitLigaCartItem { get; set; }
 42
 1943    public int StudioOrderId { get; set; }
 44
 3745    [Required, MaxLength(60)] public string Article { get; set; } = string.Empty;
 3446    [Required, MaxLength(100)] public string Brand { get; set; } = string.Empty;
 747    [MaxLength(40)] public string? ArticleId { get; set; }
 748    [MaxLength(120)] public string? ProductCode { get; set; }
 49
 1550    public decimal Quantity { get; set; }
 751    public decimal? Price { get; set; }
 752    [MaxLength(8)] public string? CurrencyCode { get; set; }
 53
 54    /// <summary>id позиции в заказе поставщика — приходит из GET /orders/list.</summary>
 1255    [MaxLength(50)] public string? ExternalLineId { get; set; }
 56
 057    [MaxLength(1000)] public string? Error { get; set; }
 58}