ISEbd-21_Sharonov_I_A_Proje.../ProjectAirline/Entities/Flight.cs

33 lines
853 B
C#
Raw Normal View History

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; }
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
};
}
}