еЩЕ ВОЗНЯ
This commit is contained in:
parent
f570941eaa
commit
a2be1354e8
20
ProjectAirline/Entities/Enums/PreparatoryWorkStatus.cs
Normal file
20
ProjectAirline/Entities/Enums/PreparatoryWorkStatus.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ProjectAirline.Entities.Enums;
|
||||||
|
|
||||||
|
public enum PreparatoryWorkStatus
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
|
||||||
|
Waiting = 1,
|
||||||
|
|
||||||
|
InProgress = 2,
|
||||||
|
|
||||||
|
Completed = 3,
|
||||||
|
|
||||||
|
Canceled = 4
|
||||||
|
}
|
19
ProjectAirline/Entities/Enums/TicketStatus.cs
Normal file
19
ProjectAirline/Entities/Enums/TicketStatus.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ProjectAirline.Entities.Enums;
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
public enum TicketStatus
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
|
||||||
|
Paid = 1,
|
||||||
|
|
||||||
|
Canceled = 2,
|
||||||
|
|
||||||
|
Refunded = 4
|
||||||
|
}
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using ProjectAirline.Entities.Enums;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -8,5 +9,22 @@ namespace ProjectAirline.Entities;
|
|||||||
|
|
||||||
public class PreparatoryWork
|
public class PreparatoryWork
|
||||||
{
|
{
|
||||||
|
public int Id { get; private set; }
|
||||||
|
|
||||||
|
public DateTime StartDate { get; private set; }
|
||||||
|
|
||||||
|
public DateTime EndDate { get; private set; }
|
||||||
|
|
||||||
|
public PreparatoryWorkStatus Status { get; private set; }
|
||||||
|
|
||||||
|
public static PreparatoryWork CreatePrerapatoryWork(int id, DateTime StartDate, DateTime EndDate, PreparatoryWorkStatus Status)
|
||||||
|
{
|
||||||
|
return new PreparatoryWork
|
||||||
|
{
|
||||||
|
Id = id,
|
||||||
|
StartDate = StartDate,
|
||||||
|
EndDate = EndDate,
|
||||||
|
Status = Status
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,5 +20,4 @@ public class Ticket
|
|||||||
DateBuy = DateTime.Now,
|
DateBuy = DateTime.Now,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,13 +9,17 @@ namespace ProjectAirline.Repositories;
|
|||||||
|
|
||||||
public interface IFlightRepository
|
public interface IFlightRepository
|
||||||
{
|
{
|
||||||
IEnumerable<Flight> ReadFlights();
|
IEnumerable<Flight> ReadFlights(DateTime? dateFrom = null, DateTime? dateTo = null, int? flightId = null);
|
||||||
|
|
||||||
Flight ReadFlightById(int id);
|
|
||||||
|
|
||||||
void CreateFlight(Flight flight);
|
void CreateFlight(Flight flight);
|
||||||
|
|
||||||
|
//IEnumerable<Flight> ReadFlights();
|
||||||
|
|
||||||
void UpdateFlight(Flight flight);
|
//Flight ReadFlightById(int id);
|
||||||
|
|
||||||
void DeleteFlight(int id);
|
//void CreateFlight(Flight flight);
|
||||||
|
|
||||||
|
//void UpdateFlight(Flight flight);
|
||||||
|
|
||||||
|
//void DeleteFlight(int id);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using ProjectAirline.Entities;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -8,4 +9,10 @@ namespace ProjectAirline.Repositories;
|
|||||||
|
|
||||||
public interface IPreparatoryWorkRepository
|
public interface IPreparatoryWorkRepository
|
||||||
{
|
{
|
||||||
|
IEnumerable<PreparatoryWork> ReadPreparatoryWork(DateTime? dateFrom = null, DateTime? dateTo = null, int? preparatoryWorkId = null,
|
||||||
|
PreparatoryWork? preparatoryWorkStatus = null);
|
||||||
|
|
||||||
|
void CreatePreparatoryWork(PreparatoryWork preparatoryWork);
|
||||||
|
|
||||||
|
void DeletePreparatoryWork(int id);
|
||||||
}
|
}
|
||||||
|
@ -13,21 +13,27 @@ public class FlightRepository : IFlightRepository
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteFlight(int id)
|
public IEnumerable<Flight> ReadFlights(DateTime? dateFrom = null, DateTime? dateTo = null, int? flightId = null)
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public Flight ReadFlightById(int id)
|
|
||||||
{
|
|
||||||
return Flight.CreateFlight(0, DateTime.Now, DateTime.Now, string.Empty, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<Flight> ReadFlights()
|
|
||||||
{
|
{
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateFlight(Flight flight)
|
|
||||||
{
|
//public void DeleteFlight(int id)
|
||||||
}
|
//{
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public Flight ReadFlightById(int id)
|
||||||
|
//{
|
||||||
|
// return Flight.CreateFlight(0, DateTime.Now, DateTime.Now, string.Empty, 0);
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public IEnumerable<Flight> ReadFlights()
|
||||||
|
//{
|
||||||
|
// return [];
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public void UpdateFlight(Flight flight)
|
||||||
|
//{
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using ProjectAirline.Entities;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -8,5 +9,16 @@ namespace ProjectAirline.Repositories.Implementations;
|
|||||||
|
|
||||||
public class PreparatoryWorkRepository : IPreparatoryWorkRepository
|
public class PreparatoryWorkRepository : IPreparatoryWorkRepository
|
||||||
{
|
{
|
||||||
|
public void CreatePreparatoryWork(PreparatoryWork preparatoryWork)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeletePreparatoryWork(int id)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<PreparatoryWork> ReadPreparatoryWork(DateTime? dateFrom = null, DateTime? dateTo = null, int? preparatoryWorkId = null, PreparatoryWork? preparatoryWorkStatus = null)
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user