| | | 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 | | |
| | | 7 | | namespace SVETA.Api.Data.DTO.DepartmentDTO |
| | | 8 | | { |
| | | 9 | | public class DepartmentShortDTO |
| | | 10 | | { |
| | | 11 | | public DepartmentShortDTO() |
| | | 12 | | { |
| | | 13 | | |
| | | 14 | | } |
| | | 15 | | public DepartmentShortDTO(Department data) |
| | | 16 | | { |
| | | 17 | | Id = data.Id; |
| | | 18 | | Name = data.Name; |
| | | 19 | | ContragentId = data.Contragent.Id; |
| | | 20 | | } |
| | | 21 | | public long Id { get; set; } |
| | | 22 | | public string Name { get; set; } |
| | | 23 | | public long ContragentId { get; set; } |
| | | 24 | | } |
| | | 25 | | |
| | | 26 | | public class DepartmentShortWithAddressDTO |
| | | 27 | | { |
| | 250 | 28 | | public DepartmentShortWithAddressDTO() |
| | 250 | 29 | | { |
| | | 30 | | |
| | 250 | 31 | | } |
| | 0 | 32 | | public DepartmentShortWithAddressDTO(Department data) |
| | 0 | 33 | | { |
| | 0 | 34 | | Id = data.Id; |
| | 0 | 35 | | Name = data.Name; |
| | 0 | 36 | | Address = data.ActualAddress.FullAddress; |
| | 0 | 37 | | } |
| | 253 | 38 | | public long Id { get; set; } |
| | 0 | 39 | | public string Name { get; set; } |
| | 0 | 40 | | public string Address { get; set; } |
| | | 41 | | } |
| | | 42 | | } |