| | | 1 | | using System; |
| | | 2 | | using System.Collections.Generic; |
| | | 3 | | using System.Linq; |
| | | 4 | | using System.Threading.Tasks; |
| | | 5 | | using WinSolutions.Sveta.Server.Data.DataModel.Entities; |
| | | 6 | | using WinSolutions.Sveta.Server.Data.DataModel.Extensions; |
| | | 7 | | |
| | | 8 | | namespace SVETA.Api.Data.DTO.Rest |
| | | 9 | | { |
| | | 10 | | public class RestResponseDTO |
| | | 11 | | { |
| | 0 | 12 | | public RestResponseDTO() { } |
| | 0 | 13 | | public RestResponseDTO(WinSolutions.Sveta.Server.Data.DataModel.Entities.Rest data) |
| | 0 | 14 | | { |
| | 0 | 15 | | Id = data.Id; |
| | 0 | 16 | | GoodId = data.Good.Id; |
| | 0 | 17 | | Name = data.Good.Name; |
| | 0 | 18 | | VendorCode = data.Good.GetActualVendorCode(data.DepartmentId); |
| | 0 | 19 | | Quantity = data.Quantity; |
| | 0 | 20 | | Photo = (PhotoPrevDto) data.Good.Photos.FirstOrDefault(); |
| | 0 | 21 | | UniqueCode = data.Good.UniqueCode; |
| | 0 | 22 | | BarCode = data.Good.GetActualBarCode(); |
| | 0 | 23 | | } |
| | 0 | 24 | | public long Id { get; set; } |
| | 0 | 25 | | public long GoodId { get; set; } |
| | 0 | 26 | | public string Name { get; set; } |
| | 0 | 27 | | public string VendorCode { get; set; } |
| | 0 | 28 | | public decimal Quantity { get; set; } |
| | 0 | 29 | | public PhotoPrevDto Photo { get; set; } |
| | 0 | 30 | | public string UniqueCode { get; set; } |
| | 0 | 31 | | public string BarCode { get; set; } |
| | | 32 | | } |
| | | 33 | | |
| | | 34 | | public class RestSourceGoodsResponseDTO |
| | | 35 | | { |
| | | 36 | | public long Id { get; set; } |
| | | 37 | | public string VendorCode { get; set; } |
| | | 38 | | public string Name { get; set; } |
| | | 39 | | public bool IsInRest { get; set; } |
| | | 40 | | public long? RestId { get; set; } |
| | | 41 | | public PhotoPrevDto Photo { get; set; } |
| | | 42 | | |
| | | 43 | | public string UniqueCode { get; set; } |
| | | 44 | | } |
| | | 45 | | } |