< Summary

Information
Class: OzonDomains.Models.NikeiCartItemStatus
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/NikeiCartItem.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
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
.cctor()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{
 10    public long Id { get; set; }
 11    public int StudioOrderId { get; set; }
 12    public int? ActiveStudioOrderId { get; set; }
 13    public Order? StudioOrder { get; set; }
 14
 15    /// <summary>Токен из проценки, допустимый только для POST /account/cart/add.</summary>
 16    [Required] public string ToCart { get; set; } = string.Empty;
 17    /// <summary>Токен позиции внешней корзины, используемый в /account/order/create.</summary>
 18    [MaxLength(128)] public string? ToOrder { get; set; }
 19    [MaxLength(128)] public string? ProductKey { get; set; }
 20    [Required, MaxLength(60)] public string Article { get; set; } = string.Empty;
 21    [Required, MaxLength(120)] public string Brand { get; set; } = string.Empty;
 22    [MaxLength(250)] public string? ProductName { get; set; }
 23    [MaxLength(250)] public string? WarehouseName { get; set; }
 24    public int Quantity { get; set; }
 25    public int Multiplicity { get; set; } = 1;
 26    public int? Stock { get; set; }
 27    public decimal? SourcePrice { get; set; }
 28    public int? DeliveryDaysMin { get; set; }
 29    public int? DeliveryDaysMax { get; set; }
 30    [MaxLength(1000)] public string? Comment { get; set; }
 31    [Required, MaxLength(30)] public string Status { get; set; } = NikeiCartItemStatus.Pending;
 32    [MaxLength(80)] public string? ExternalOrderNumber { get; set; }
 33    [MaxLength(1000)] public string? LastError { get; set; }
 34    [MaxLength(450)] public string? CreatedBy { get; set; }
 35    public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
 36    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";
 145    public static readonly string[] Active = [Pending, Failed];
 46}

Methods/Properties

.cctor()