33 lines
853 B
C#
33 lines
853 B
C#
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 ArrivalTime { 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 arrivalTime, string arrivalLocation, int ticketPrice)
|
|
{
|
|
return new Flight
|
|
{
|
|
Id = id,
|
|
DatetimeDeparture = dateTimeDeparture,
|
|
ArrivalTime = arrivalTime,
|
|
ArrivalLocation = arrivalLocation,
|
|
TicketPrice = ticketPrice
|
|
};
|
|
}
|
|
}
|