2024-10-30 11:13:10 +04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ProjectAirline.Entities;
|
|
|
|
|
|
|
|
|
|
public class Flight
|
|
|
|
|
{
|
|
|
|
|
public int Id { get; private set; }
|
|
|
|
|
|
|
|
|
|
public DateTime DatetimeDeparture { get; private set; }
|
|
|
|
|
|
2024-11-13 00:12:08 +04:00
|
|
|
|
public DateTime DateTimeArrival { get; private set; }
|
2024-10-30 11:13:10 +04:00
|
|
|
|
|
|
|
|
|
public string ArrivalLocation { get; private set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public int TicketPrice { get; private set; }
|
|
|
|
|
|
2024-11-13 00:12:08 +04:00
|
|
|
|
public static Flight CreateFlight(int id, DateTime dateTimeDeparture, DateTime dateTimeArrival, string arrivalLocation, int ticketPrice)
|
2024-10-30 11:13:10 +04:00
|
|
|
|
{
|
|
|
|
|
return new Flight
|
|
|
|
|
{
|
|
|
|
|
Id = id,
|
|
|
|
|
DatetimeDeparture = dateTimeDeparture,
|
2024-11-13 00:12:08 +04:00
|
|
|
|
DateTimeArrival = dateTimeArrival,
|
2024-10-30 11:13:10 +04:00
|
|
|
|
ArrivalLocation = arrivalLocation,
|
|
|
|
|
TicketPrice = ticketPrice
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|