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; }
|
|
|
|
|
public string Destination { get; private set; } = string.Empty;
|
|
|
|
|
public string Departure { get; private set; } = string.Empty;
|
|
|
|
|
public DateTime DepartureDate { get; private set; }
|
2024-11-09 00:22:49 +04:00
|
|
|
|
public int Duration { get; private set; }
|
2024-11-08 20:17:39 +04:00
|
|
|
|
public int Cost { get; private set; }
|
|
|
|
|
public static Tour CreateEntity(int id, string destination,
|
2024-11-09 00:22:49 +04:00
|
|
|
|
DateTime date, string departure, int cost, int duration)
|
2024-11-08 20:17:39 +04:00
|
|
|
|
{
|
|
|
|
|
return new Tour
|
|
|
|
|
{
|
|
|
|
|
Id = id,
|
|
|
|
|
Destination = destination,
|
|
|
|
|
Departure = departure,
|
|
|
|
|
DepartureDate = date,
|
2024-11-09 00:22:49 +04:00
|
|
|
|
Cost = cost,
|
|
|
|
|
Duration = duration
|
2024-11-08 20:17:39 +04:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|