2024-11-08 20:17:39 +04:00
|
|
|
|
using ProjectTourAgency.Enities.Enums;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ProjectTourAgency.Enities;
|
|
|
|
|
|
|
|
|
|
public class Tour
|
|
|
|
|
{
|
|
|
|
|
public int Id { get; private set; }
|
2024-11-11 15:05:13 +04:00
|
|
|
|
public int EmployeeId { get; private set; }
|
|
|
|
|
public int RouteId { get; private set; }
|
2024-11-08 20:17:39 +04:00
|
|
|
|
public DateTime DepartureDate { get; private set; }
|
2024-11-11 15:05:13 +04:00
|
|
|
|
public IEnumerable<ClientTour> ClientTours { get; private set; } = [];
|
|
|
|
|
public static Tour CreateEntity(int id, int employeeId, int routeId,
|
|
|
|
|
DateTime date,IEnumerable<ClientTour> clientTours)
|
2024-11-08 20:17:39 +04:00
|
|
|
|
{
|
|
|
|
|
return new Tour
|
|
|
|
|
{
|
|
|
|
|
Id = id,
|
2024-11-11 15:05:13 +04:00
|
|
|
|
EmployeeId = employeeId,
|
|
|
|
|
RouteId = routeId,
|
2024-11-08 20:17:39 +04:00
|
|
|
|
DepartureDate = date,
|
2024-11-11 15:05:13 +04:00
|
|
|
|
ClientTours = clientTours
|
2024-11-08 20:17:39 +04:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|