using System;

namespace Brizco.Domain.Entities.Shift;
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 , Id);
        Days.Add(shiftDay);
        return shiftDay;
    }

    public ShiftPlan AddPlan(DateTime startAt, DateTime endAt)
    {
        var plan = new ShiftPlan(startAt, endAt , Id);
        Plans.Add(plan);
        return plan;
    }
}

public partial class ShiftPlan
{
    public ShiftPlanUser AddUser(Guid userId)
    {
        var planUser = new ShiftPlanUser(Id , userId);
        Users.Add(planUser);
        return planUser;
    }
}