< Summary

Information
Class: OzonDomains.Models.ShateMCartItemStatus
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/ShateMCartItem.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 41
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/ShateMCartItem.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3
 4namespace OzonDomains.Models;
 5
 6[Table("ShateMCartItems")]
 7public sealed class ShateMCartItem
 8{
 9    public long Id { get; set; }
 10    public int StudioOrderId { get; set; }
 11    public int? ActiveStudioOrderId { get; set; }
 12    public Order? StudioOrder { get; set; }
 13    [Required, MaxLength(512)] public string PriceId { get; set; } = string.Empty;
 14    [MaxLength(120)] public string Article { get; set; } = string.Empty;
 15    [MaxLength(256)] public string Brand { get; set; } = string.Empty;
 16    [MaxLength(200)] public string? ProductName { get; set; }
 17    [MaxLength(80)] public string? LocationCode { get; set; }
 18    [MaxLength(120)] public string? Direction { get; set; }
 19    [MaxLength(80)] public string? AgreementCode { get; set; }
 20    [MaxLength(80)] public string? DeliveryAddressCode { get; set; }
 21    [MaxLength(40)] public string? DeliveryType { get; set; }
 22    public DateTime? DeliveryAtUtc { get; set; }
 23    [MaxLength(120)] public string? ExternalBasketItemId { get; set; }
 24    public decimal Quantity { get; set; }
 25    public decimal? SourcePrice { get; set; }
 26    [Required, MaxLength(8)] public string CurrencyCode { get; set; } = "BYN";
 27    [Required, MaxLength(30)] public string Status { get; set; } = ShateMCartItemStatus.Pending;
 28    [MaxLength(1000)] public string? LastError { get; set; }
 29    [MaxLength(450)] public string? CreatedBy { get; set; }
 30    public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
 31    public DateTime UpdatedAtUtc { get; set; } = DateTime.UtcNow;
 32}
 33
 34public static class ShateMCartItemStatus
 35{
 36    public const string Pending = "Pending";
 37    public const string Ordered = "Ordered";
 38    public const string Failed = "Failed";
 39    public const string Removed = "Removed";
 140    public static readonly string[] Active = [Pending, Failed];
 41}

Methods/Properties

.cctor()