29 lines
859 B
C#
29 lines
859 B
C#
namespace Brizco.Domain.Entities.Shifts;
|
|
public partial class Shift
|
|
{
|
|
public static Shift Create(string title, string description, TimeSpan startAt, TimeSpan endAt,Guid complexId)
|
|
{
|
|
return new Shift(title, description, startAt, endAt,complexId);
|
|
}
|
|
|
|
public ShiftDay SetDay(DayOfWeek dayOfWeek)
|
|
{
|
|
var shiftDay = new ShiftDay(dayOfWeek, this.Id);
|
|
this.Days.Add(shiftDay);
|
|
return shiftDay;
|
|
}
|
|
public ShiftPlan AddPlan(DateTime planDate,Guid routineId , Guid superVisorId)
|
|
{
|
|
var plan = new ShiftPlan(planDate , routineId, Id, superVisorId, this.ComplexId);
|
|
Plans.Add(plan);
|
|
return plan;
|
|
}
|
|
|
|
public ShiftRoutine AddRoutine(Guid routineId)
|
|
{
|
|
var routine = new ShiftRoutine(routineId, this.Id);
|
|
Routines.Add(routine);
|
|
return routine;
|
|
}
|
|
}
|