33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using ProjectAirline.Entities.Enums;
|
|
using ProjectAirline.Forms;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ProjectAirline.Entities;
|
|
|
|
public class PreparatoryWork
|
|
{
|
|
public int Id { get; private set; }
|
|
public int FlightId { get; private set; }
|
|
public DateTime StartDate { get; private set; }
|
|
public DateTime EndDate { get; private set; }
|
|
public PreparatoryWorkStatus Status { get; private set; }
|
|
public IEnumerable<PreparatoryWorkPlane> PreparatoryWorkPlanes { get; private set; } = Enumerable.Empty<PreparatoryWorkPlane>();
|
|
|
|
public static PreparatoryWork CreatePreparatoryWork(int id, int flightId, DateTime startDate, DateTime endDate, PreparatoryWorkStatus status, IEnumerable<PreparatoryWorkPlane> preparatoryWorkPlanes)
|
|
{
|
|
return new PreparatoryWork
|
|
{
|
|
Id = id,
|
|
FlightId = flightId,
|
|
StartDate = startDate,
|
|
EndDate = endDate,
|
|
Status = status,
|
|
PreparatoryWorkPlanes = preparatoryWorkPlanes
|
|
};
|
|
}
|
|
}
|