2024-11-26 01:43:42 +04:00
|
|
|
|
using ProjectAirline.Entities.Enums;
|
2024-11-27 10:53:18 +04:00
|
|
|
|
using ProjectAirline.Forms;
|
2024-11-26 01:43:42 +04:00
|
|
|
|
using System;
|
2024-10-30 11:13:10 +04:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ProjectAirline.Entities;
|
|
|
|
|
|
|
|
|
|
public class PreparatoryWork
|
|
|
|
|
{
|
2024-11-26 01:43:42 +04:00
|
|
|
|
public int Id { get; private set; }
|
2024-11-27 00:48:24 +04:00
|
|
|
|
public int FlightId { get; private set; }
|
2024-11-26 01:43:42 +04:00
|
|
|
|
public DateTime StartDate { get; private set; }
|
|
|
|
|
public DateTime EndDate { get; private set; }
|
|
|
|
|
public PreparatoryWorkStatus Status { get; private set; }
|
2024-11-27 10:53:18 +04:00
|
|
|
|
public IEnumerable<PreparatoryWorkPlane> PreparatoryWorkPlanes { get; private set; } = Enumerable.Empty<PreparatoryWorkPlane>();
|
2024-11-26 01:43:42 +04:00
|
|
|
|
|
2024-11-27 10:53:18 +04:00
|
|
|
|
public static PreparatoryWork CreatePreparatoryWork(int id, int flightId, DateTime startDate, DateTime endDate, PreparatoryWorkStatus status, IEnumerable<PreparatoryWorkPlane> preparatoryWorkPlanes)
|
2024-11-26 01:43:42 +04:00
|
|
|
|
{
|
|
|
|
|
return new PreparatoryWork
|
|
|
|
|
{
|
|
|
|
|
Id = id,
|
2024-11-27 10:53:18 +04:00
|
|
|
|
FlightId = flightId,
|
|
|
|
|
StartDate = startDate,
|
|
|
|
|
EndDate = endDate,
|
|
|
|
|
Status = status,
|
|
|
|
|
PreparatoryWorkPlanes = preparatoryWorkPlanes
|
2024-11-26 01:43:42 +04:00
|
|
|
|
};
|
|
|
|
|
}
|
2024-10-30 11:13:10 +04:00
|
|
|
|
}
|