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; } public DateTime DateTimeArrival { get; private set; } public string ArrivalLocation { get; private set; } = string.Empty; public int TicketPrice { get; private set; } public static Flight CreateFlight(int id, DateTime dateTimeDeparture, DateTime dateTimeArrival, string arrivalLocation, int ticketPrice) { return new Flight { Id = id, DatetimeDeparture = dateTimeDeparture, DateTimeArrival = dateTimeArrival, ArrivalLocation = arrivalLocation, TicketPrice = ticketPrice }; } }