Api/Brizco.Domain/Entities/ShiftPlans/ShiftPlan.cs

43 lines
1.6 KiB
C#

namespace Brizco.Domain.Entities.ShiftPlans;
[AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)]
[AdaptTo("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Projection)]
[GenerateMapper]
public partial class ShiftPlan : ApiEntity
{
public ShiftPlan()
{
}
internal ShiftPlan(DateTime planFor, Guid routineId,Guid shiftId,Guid supervisionId, Guid complexId)
{
PlanFor = planFor;
RoutineId = routineId;
ShiftId = shiftId;
SupervisorId = supervisionId;
ComplexId = complexId;
}
public DateTime PlanFor { get; internal set; }
public bool IsCompleted { get; internal set; }
public bool IsScheduled { get; internal set; }
public int CompletePercent { get; internal set; }
public string CompleteDescription { get; internal set; } = string.Empty;
public Guid ShiftId { get; internal set; }
public virtual Shift? Shift { get; internal set; }
public Guid RoutineId { get; internal set; }
public virtual Routine? Routine { get; internal set; }
public Guid ComplexId { get; internal set; }
public Complex? Complex { get; internal set; }
public Guid SupervisorId { get; internal set; }
public ApplicationUser? Supervisor { get; internal set; }
public List<ShiftPlanUser> Users { get; internal set; } = new();
}