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