diff --git a/ProjectAirline/Entities/Flight.cs b/ProjectAirline/Entities/Flight.cs new file mode 100644 index 0000000..a0ce739 --- /dev/null +++ b/ProjectAirline/Entities/Flight.cs @@ -0,0 +1,32 @@ +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 + }; + } +} diff --git a/ProjectAirline/Entities/Passanger.cs b/ProjectAirline/Entities/Passanger.cs new file mode 100644 index 0000000..8eee72d --- /dev/null +++ b/ProjectAirline/Entities/Passanger.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectAirline.Entities; + +public class Passanger +{ + public int Id { get; private set; } + + public string Name { get; private set; } = string.Empty; + + public static Passanger CreatePassanger(int id, string name) + { + return new Passanger + { + Id = id, + Name = name, + }; + } +} diff --git a/ProjectAirline/Entities/Plane.cs b/ProjectAirline/Entities/Plane.cs new file mode 100644 index 0000000..854f992 --- /dev/null +++ b/ProjectAirline/Entities/Plane.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectAirline.Entities; + +public class Plane +{ + public int Id { get; private set; } + + public string Name { get; private set; } = string.Empty; + + public int Capacity { get; private set; } + + public static Plane CreatePlane(int id, string name, int capacity) + { + return new Plane + { + Id = id, + Name = name, + Capacity = capacity + }; + } +} diff --git a/ProjectAirline/Entities/PreparatoryWork.cs b/ProjectAirline/Entities/PreparatoryWork.cs new file mode 100644 index 0000000..1e9b3a3 --- /dev/null +++ b/ProjectAirline/Entities/PreparatoryWork.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectAirline.Entities; + +public class PreparatoryWork +{ + +} diff --git a/ProjectAirline/Entities/Ticket.cs b/ProjectAirline/Entities/Ticket.cs new file mode 100644 index 0000000..9e71050 --- /dev/null +++ b/ProjectAirline/Entities/Ticket.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectAirline.Entities; + +public class Ticket +{ + public int Id { get; private set; } + + public DateTime DateBuy { get; private set; } + +} diff --git a/ProjectAirline/Form1.Designer.cs b/ProjectAirline/FormAirline.Designer.cs similarity index 97% rename from ProjectAirline/Form1.Designer.cs rename to ProjectAirline/FormAirline.Designer.cs index eca5924..7e0c2ec 100644 --- a/ProjectAirline/Form1.Designer.cs +++ b/ProjectAirline/FormAirline.Designer.cs @@ -1,6 +1,6 @@ namespace ProjectAirline { - partial class Form1 + partial class FormAirline { /// /// Required designer variable. diff --git a/ProjectAirline/Form1.cs b/ProjectAirline/FormAirline.cs similarity index 56% rename from ProjectAirline/Form1.cs rename to ProjectAirline/FormAirline.cs index c73297f..9d85215 100644 --- a/ProjectAirline/Form1.cs +++ b/ProjectAirline/FormAirline.cs @@ -1,8 +1,8 @@ namespace ProjectAirline { - public partial class Form1 : Form + public partial class FormAirline : Form { - public Form1() + public FormAirline() { InitializeComponent(); } diff --git a/ProjectAirline/Form1.resx b/ProjectAirline/FormAirline.resx similarity index 100% rename from ProjectAirline/Form1.resx rename to ProjectAirline/FormAirline.resx diff --git a/ProjectAirline/Program.cs b/ProjectAirline/Program.cs index 4cd196a..ae61fc9 100644 --- a/ProjectAirline/Program.cs +++ b/ProjectAirline/Program.cs @@ -11,7 +11,7 @@ namespace ProjectAirline // To customize application configuration such as set high DPI settings or default font, // see https://aka.ms/applicationconfiguration. ApplicationConfiguration.Initialize(); - Application.Run(new Form1()); + Application.Run(new FormAirline()); } } } \ No newline at end of file