< Summary

Information
Class: OzonDomains.Models.OrderReturn
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/OrderReturn.cs
Line coverage
87%
Covered lines: 49
Uncovered lines: 7
Coverable lines: 56
Total lines: 139
Line coverage: 87.5%
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%210%
get_OzonReturnId()100%11100%
get_OrderId()100%11100%
get_OzonClientId()100%11100%
get_PostingNumber()100%11100%
get_OrderNumber()100%11100%
get_ReturnReasonName()100%11100%
get_ReturnType()100%11100%
get_Schema()100%11100%
get_OzonOrderId()100%210%
get_SourceId()100%210%
get_ClearingId()100%210%
get_ReturnClearingId()100%210%
get_PlaceId()100%11100%
get_PlaceName()100%11100%
get_PlaceAddress()100%11100%
get_TargetPlaceId()100%11100%
get_TargetPlaceName()100%11100%
get_TargetPlaceAddress()100%11100%
get_StorageSumPrice()100%11100%
get_StorageSumCurrency()100%11100%
get_StorageDays()100%11100%
get_StorageTarificationFirstDate()100%11100%
get_StorageTarificationStartDate()100%11100%
get_StorageArrivedMoment()100%11100%
get_UtilizationSumPrice()100%11100%
get_UtilizationSumCurrency()100%11100%
get_UtilizationForecastDate()100%11100%
get_ProductSku()100%11100%
get_ProductOfferId()100%11100%
get_ProductName()100%11100%
get_ProductPrice()100%11100%
get_ProductPriceCurrency()100%11100%
get_ProductCommissionPercent()100%11100%
get_ProductCommission()100%11100%
get_ProductQuantity()100%11100%
get_TechnicalReturnMoment()100%11100%
get_FinalMoment()100%11100%
get_CancelledWithCompensationMoment()100%11100%
get_ReturnDate()100%11100%
get_LogisticBarcode()100%11100%
get_VisualStatusId()100%11100%
get_VisualStatusDisplayName()100%11100%
get_VisualStatusSysName()100%11100%
get_VisualStatusChangeMoment()100%11100%
get_CompensationStatusId()100%11100%
get_CompensationStatusDisplayName()100%11100%
get_CompensationStatusSysName()100%11100%
get_CompensationStatusChangeMoment()100%11100%
get_IsOpened()100%11100%
get_IsSuperEconom()100%11100%
get_RawDataJson()100%11100%
get_CreatedAt()100%11100%
get_UpdatedAt()100%11100%
get_Order()100%210%
get_OzonClient()100%210%

File(s)

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

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3
 4namespace OzonDomains.Models;
 5
 6/// <summary>
 7/// Возврат из Ozon (FBO/FBS). Данные из API /v1/returns/list.
 8/// Связан с заказом в системе по OrderId (при совпадении PostingNumber).
 9/// </summary>
 10[Table("OrderReturns")]
 11public class OrderReturn
 12{
 13    [Key]
 14    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
 015    public long Id { get; set; }
 16
 17    /// <summary>Идентификатор возврата в системе Ozon (уникальный).</summary>
 15618    public long OzonReturnId { get; set; }
 19
 20    /// <summary>Идентификатор заказа в нашей системе (связь по PostingNumber).</summary>
 5721    public int? OrderId { get; set; }
 22
 23    /// <summary>Идентификатор клиента Ozon (продавца).</summary>
 6324    public int OzonClientId { get; set; }
 25
 26    /// <summary>Номер отправления Ozon.</summary>
 27    [MaxLength(50)]
 8828    public string? PostingNumber { get; set; }
 29
 30    /// <summary>Номер заказа Ozon.</summary>
 31    [MaxLength(50)]
 4832    public string? OrderNumber { get; set; }
 33
 34    /// <summary>Причина возврата или отмены.</summary>
 35    [MaxLength(500)]
 1836    public string? ReturnReasonName { get; set; }
 37
 38    /// <summary>Тип возврата: Cancellation, FullReturn, PartialReturn, ClientReturn, Unknown.</summary>
 39    [MaxLength(50)]
 1840    public string? ReturnType { get; set; }
 41
 42    /// <summary>Схема возврата: FBS или FBO.</summary>
 43    [MaxLength(20)]
 1844    public string? Schema { get; set; }
 45
 46    /// <summary>Идентификатор заказа в системе Ozon.</summary>
 047    public long OzonOrderId { get; set; }
 48
 49    /// <summary>Предыдущий идентификатор возврата.</summary>
 050    public long? SourceId { get; set; }
 51
 52    /// <summary>Штрихкод изначального отправления.</summary>
 053    public long? ClearingId { get; set; }
 54
 55    /// <summary>Возвратный штрихкод изначального отправления.</summary>
 056    public long? ReturnClearingId { get; set; }
 57
 58    // Place (склад, где находится возврат)
 1859    public long? PlaceId { get; set; }
 60    [MaxLength(255)]
 1861    public string? PlaceName { get; set; }
 62    [Column(TypeName = "text")]
 1863    public string? PlaceAddress { get; set; }
 64
 65    // Target place (склад, куда едет возврат)
 1866    public long? TargetPlaceId { get; set; }
 67    [MaxLength(255)]
 1868    public string? TargetPlaceName { get; set; }
 69    [Column(TypeName = "text")]
 1870    public string? TargetPlaceAddress { get; set; }
 71
 72    // Storage
 1873    public decimal? StorageSumPrice { get; set; }
 74    [MaxLength(10)]
 1875    public string? StorageSumCurrency { get; set; }
 2176    public long StorageDays { get; set; }
 1877    public DateTime? StorageTarificationFirstDate { get; set; }
 1878    public DateTime? StorageTarificationStartDate { get; set; }
 1879    public DateTime? StorageArrivedMoment { get; set; }
 1880    public decimal? UtilizationSumPrice { get; set; }
 81    [MaxLength(10)]
 1882    public string? UtilizationSumCurrency { get; set; }
 1883    public DateTime? UtilizationForecastDate { get; set; }
 84
 85    // Product
 1886    public long ProductSku { get; set; }
 87    [MaxLength(100)]
 1888    public string? ProductOfferId { get; set; }
 89    [MaxLength(500)]
 1890    public string? ProductName { get; set; }
 1891    public decimal? ProductPrice { get; set; }
 92    [MaxLength(10)]
 1893    public string? ProductPriceCurrency { get; set; }
 1894    public double ProductCommissionPercent { get; set; }
 1895    public decimal? ProductCommission { get; set; }
 1896    public int ProductQuantity { get; set; }
 97
 98    // Logistic
 1899    public DateTime? TechnicalReturnMoment { get; set; }
 18100    public DateTime? FinalMoment { get; set; }
 18101    public DateTime? CancelledWithCompensationMoment { get; set; }
 18102    public DateTime? ReturnDate { get; set; }
 103    [MaxLength(100)]
 18104    public string? LogisticBarcode { get; set; }
 105
 106    // Visual status
 18107    public int? VisualStatusId { get; set; }
 108    [MaxLength(200)]
 18109    public string? VisualStatusDisplayName { get; set; }
 110    [MaxLength(100)]
 68111    public string? VisualStatusSysName { get; set; }
 63112    public DateTime? VisualStatusChangeMoment { get; set; }
 113
 114    // Compensation status
 18115    public int? CompensationStatusId { get; set; }
 116    [MaxLength(200)]
 18117    public string? CompensationStatusDisplayName { get; set; }
 118    [MaxLength(100)]
 60119    public string? CompensationStatusSysName { get; set; }
 58120    public DateTime? CompensationStatusChangeMoment { get; set; }
 121
 122    // Additional info
 18123    public bool IsOpened { get; set; }
 18124    public bool IsSuperEconom { get; set; }
 125
 126    /// <summary>Полный ответ API в JSON для сохранения всех данных.</summary>
 127    [Column(TypeName = "longtext")]
 18128    public string? RawDataJson { get; set; }
 129
 43130    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
 60131    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
 132
 133    // Navigation
 134    [ForeignKey(nameof(OrderId))]
 0135    public virtual Order? Order { get; set; }
 136
 137    [ForeignKey(nameof(OzonClientId))]
 0138    public virtual OzonClient? OzonClient { get; set; }
 139}