2024-12-11 09:33:12 +04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ProjectAirline.Entities;
|
|
|
|
|
|
|
|
|
|
public class Ticket
|
2024-11-27 00:03:35 +04:00
|
|
|
|
{
|
2024-12-11 09:33:12 +04:00
|
|
|
|
public int Id { get; private set; }
|
|
|
|
|
public int FlightID { get; private set; }
|
|
|
|
|
public int PassengerID { get; private set; }
|
2024-11-27 00:03:35 +04:00
|
|
|
|
|
2024-12-11 09:33:12 +04:00
|
|
|
|
public int TicketPrice { get; private set; }
|
|
|
|
|
public DateTime DateBuy { get; private set; }
|
|
|
|
|
public static Ticket CreateTicket(int id, int flightID, int passengerID, int ticketPrice)
|
|
|
|
|
{
|
|
|
|
|
return new Ticket
|
2024-11-27 00:03:35 +04:00
|
|
|
|
{
|
2024-12-11 09:33:12 +04:00
|
|
|
|
Id = id,
|
|
|
|
|
FlightID = flightID,
|
|
|
|
|
PassengerID = passengerID,
|
|
|
|
|
TicketPrice = ticketPrice,
|
|
|
|
|
DateBuy = DateTime.Now
|
|
|
|
|
};
|
2024-11-27 00:03:35 +04:00
|
|
|
|
}
|
2024-12-11 09:33:12 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|