SUBD_PIbd-23_ZakharovRA/CarShowroom/CarShowroomDataModels/Dtos/SaleDto.cs

31 lines
885 B
C#
Raw Normal View History

2024-05-03 10:59:33 +04:00
using CarShowroomContracts.AbstractModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarShowroomDataModels.Dtos
{
2024-05-05 22:02:53 +04:00
public class SaleDto : ISale
2024-05-03 10:59:33 +04:00
{
public int Id { get; set; }
public DateTime SaleTime { get; set; }
public int Cost { get; set; }
2024-05-05 19:18:53 +04:00
public int? ClientId { get; set; }
public int? EmployeeId { get; set; }
2024-05-03 10:59:33 +04:00
public List<int> CarIds { get; set; } = new();
2024-05-03 11:28:27 +04:00
public List<int> ServiceIds { get; set; } = new();
2024-05-03 10:59:33 +04:00
public SaleDto(ISale model)
{
Id = model.Id;
SaleTime = model.SaleTime;
Cost = model.Cost;
ClientId = model.ClientId;
EmployeeId = model.EmployeeId;
CarIds = model.CarIds;
2024-05-03 11:28:27 +04:00
ServiceIds = model.ServiceIds;
2024-05-03 10:59:33 +04:00
}
}
}