| | | 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 Cluster : ExternalRecord, ITrackableRecord |
| | | 10 | | { |
| | | 11 | | /// <summary> |
| | | 12 | | /// Наименование |
| | | 13 | | /// </summary> |
| | | 14 | | [Required] |
| | 751 | 15 | | public string Name { get; set; } |
| | | 16 | | |
| | | 17 | | /// <summary> |
| | | 18 | | /// Торговый коэффициент |
| | | 19 | | /// </summary> |
| | | 20 | | [Required] |
| | | 21 | | [Column(TypeName = "decimal(18,2)")] |
| | 530 | 22 | | public decimal TradeRatio { get; set; } |
| | | 23 | | |
| | | 24 | | /// <summary> |
| | | 25 | | /// Переводит проценты из TradeRation в коэффициент, на который можно умножить. Для упрощения вычислений. |
| | | 26 | | /// </summary> |
| | | 27 | | [NotMapped] |
| | 10 | 28 | | public decimal RatioForCalculations => TradeRatio / 100; |
| | | 29 | | |
| | | 30 | | /// <summary> |
| | | 31 | | /// Подразделения |
| | | 32 | | /// </summary> |
| | 1196 | 33 | | public List<Department> Departments { get; set; } = new List<Department>(); |
| | | 34 | | |
| | | 35 | | /// <summary> |
| | | 36 | | /// Минимальная сумма заказа |
| | | 37 | | /// </summary> |
| | | 38 | | [Required] |
| | | 39 | | [Column(TypeName = "decimal(18,2)")] |
| | 585 | 40 | | public decimal MinOrderSum { get; set; } |
| | | 41 | | |
| | | 42 | | /// <summary> |
| | | 43 | | /// Id склада-владелеца |
| | | 44 | | /// </summary> |
| | 0 | 45 | | public long WarehouseId { get; set; } |
| | | 46 | | |
| | | 47 | | /// <summary> |
| | | 48 | | /// Склад-владелец |
| | | 49 | | /// </summary> |
| | 1019 | 50 | | public Department Warehouse { get; set; } |
| | | 51 | | |
| | | 52 | | /// <summary> |
| | | 53 | | /// Типы доставки |
| | | 54 | | /// </summary> |
| | 1157 | 55 | | public List<ClusterDeliveryType> ClusterDeliveryTypes { get; set; } = new List<ClusterDeliveryType>(); |
| | | 56 | | } |
| | | 57 | | } |