< Summary

Class:WinSolutions.Sveta.Server.Data.DataModel.Entities.SupplyContract
Assembly:WinSolutions.Sveta.Server
File(s):/opt/dev/sveta_api_build/WinSolutions.Sveta.Server/Data/DataModel/Entities/SupplyContract.cs
Covered lines:8
Uncovered lines:3
Coverable lines:11
Total lines:78
Line coverage:72.7% (8 of 11)
Covered branches:0
Total branches:0

Metrics

MethodLine coverage Branch coverage
get_DocumentNumber()100%100%
get_SellerId()0%100%
get_Seller()100%100%
get_BuyerId()0%100%
get_Buyer()100%100%
get_BeginDate()100%100%
get_EndDate()100%100%
get_SignOffDate()0%100%
get_PrepaimentPercent()100%100%
get_TradeRatio()100%100%
get_RatioForCalculations()100%100%

File(s)

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

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.ComponentModel.DataAnnotations;
 4using System.ComponentModel.DataAnnotations.Schema;
 5using System.Text;
 6
 7namespace WinSolutions.Sveta.Server.Data.DataModel.Entities
 8{
 9    public class SupplyContract : ExternalRecord, ITrackableRecord
 10    {
 11        /// <summary>
 12        /// Номер договора
 13        /// </summary>
 14        [Required]
 148515        public string DocumentNumber { get; set; }
 16
 17        /// <summary>
 18        /// Ключ продавца
 19        /// </summary>
 020        public long SellerId { get; set; }
 21
 22        /// <summary>
 23        /// Продавец
 24        /// </summary>
 25        [Required]
 195226        public Contragent Seller { get; set; }
 27
 28        /// <summary>
 29        /// ключ покупателя
 30        /// </summary>
 031        public long BuyerId { get; set; }
 32
 33        /// <summary>
 34        /// Покупатель
 35        /// </summary>
 36        [Required]
 167137        public Contragent Buyer { get; set; }
 38
 39
 40        /// <summary>
 41        /// Дата начала действия договора
 42        /// </summary>
 43        [Required]
 78544        public DateTime BeginDate { get; set; }
 45
 46        /// <summary>
 47        /// Дата прекращения действия договора
 48        /// </summary>
 49        [Required]
 78550        public DateTime EndDate { get; set; }
 51
 52        /// <summary>
 53        /// Дата заключения договора
 54        /// </summary>
 55        [Required]
 056        public DateTime SignOffDate { get; set; }
 57
 58        /// <summary>
 59        /// Размер предоплаты %
 60        /// </summary>
 61        [Required]
 62        [Column(TypeName = "decimal(18,2)")]
 66463        public decimal PrepaimentPercent { get; set; }
 64
 65        /// <summary>
 66        /// Торговый коэффициент
 67        /// </summary>
 68        [Required]
 69        [Column(TypeName = "decimal(18,2)")]
 71370        public decimal TradeRatio { get; set; }
 71
 72        /// <summary>
 73        /// Переводит проценты из TradeRation в коэффициент, на который можно умножить. Для упрощения вычислений.
 74        /// </summary>
 75        [NotMapped]
 15576        public decimal RatioForCalculations => TradeRatio / 100;
 77    }
 78}