| | | 1 | | using System; |
| | | 2 | | using System.ComponentModel.DataAnnotations; |
| | | 3 | | using System.Collections.Generic; |
| | | 4 | | using System.Linq; |
| | | 5 | | using System.Threading.Tasks; |
| | | 6 | | using WinSolutions.Sveta.Server.Data.DataModel.Entities; |
| | | 7 | | using WinSolutions.Sveta.Server.Data.DataModel.Kinds; |
| | | 8 | | |
| | | 9 | | namespace SVETA.Api.Data.DTO |
| | | 10 | | { |
| | | 11 | | public class DeliveryTypeResponseDto : IdNameDTO |
| | | 12 | | { |
| | 375 | 13 | | public DeliveryTypeResponseDto() { } |
| | | 14 | | |
| | 0 | 15 | | public DeliveryTypeResponseDto(DeliveryType data) |
| | 0 | 16 | | { |
| | 0 | 17 | | Id = data.Id; |
| | 0 | 18 | | Name = data.Name; |
| | 0 | 19 | | DeliveryCostType = new List<IdNameDTO>(); |
| | 0 | 20 | | if (data.DeliveryCostTypes?.Count > 0) |
| | 0 | 21 | | DeliveryCostType.AddRange(data.DeliveryCostTypes.Where(x => !x.IsDeleted && x.RecStateId == (long)Record |
| | 0 | 22 | | } |
| | 0 | 23 | | public List<IdNameDTO> DeliveryCostType { get; set; } |
| | | 24 | | } |
| | | 25 | | |
| | | 26 | | public class DeliveryTypeOrderRequestDTO |
| | | 27 | | { |
| | | 28 | | public long DeliveryTypeId { get; set; } |
| | | 29 | | } |
| | | 30 | | } |