< Summary

Class:WinSolutions.Sveta.Server.Data.DataModel.Entities.DepartmentCategoryRatio
Assembly:WinSolutions.Sveta.Server
File(s):/opt/dev/sveta_api_build/WinSolutions.Sveta.Server/Data/DataModel/Entities/DepartmentCategoryRatio.cs
Covered lines:4
Uncovered lines:2
Coverable lines:6
Total lines:38
Line coverage:66.6% (4 of 6)
Covered branches:0
Total branches:0

Metrics

MethodLine coverage Branch coverage
get_CategoryId()100%100%
get_Category()100%100%
get_DepartmentId()100%100%
get_Department()0%100%
get_TradeRatio()100%100%
get_RatioForCalculations()0%100%

File(s)

/opt/dev/sveta_api_build/WinSolutions.Sveta.Server/Data/DataModel/Entities/DepartmentCategoryRatio.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3
 4namespace WinSolutions.Sveta.Server.Data.DataModel.Entities
 5{
 6    public class DepartmentCategoryRatio : ExternalRecord, ITrackableRecord
 7    {
 148        public long CategoryId { get; set; }
 9
 10        // <summary>
 11        /// Категория товара
 12        /// </summary>
 13        [Required]
 1714        public Category Category { get; set; }
 15
 1416        public long DepartmentId { get; set; }
 17
 18        // <summary>
 19        /// Подразделение
 20        /// </summary>
 21        [Required]
 022        public Department Department { get; set; }
 23
 24
 25        /// <summary>
 26        /// Торговый коэффициент
 27        /// </summary>
 28        [Required]
 29        [Column(TypeName = "decimal(18,2)")]
 2430        public decimal TradeRatio { get; set; }
 31
 32        /// <summary>
 33        /// Переводит проценты из TradeRation в коэффициент, на который можно умножить. Для упрощения вычислений.
 34        /// </summary>
 35        [NotMapped]
 036        public decimal RatioForCalculations => TradeRatio / 100;
 37    }
 38}