namespace Brizco.Domain.Entities.Complex;

public partial class Complex
{
    public static Complex Create(string name, string address, string supportPhone)
    {
        return new Complex(name,address,supportPhone);
    }

    public ComplexUser AddComplexUser(Guid userId)
    {
        var complex = ComplexUser.Create(userId, this.Id);
        this.Users.Add(complex);
        return complex;
    }
}
public partial class ComplexUser
{
    public static ComplexUser Create(Guid userId,Guid complexId)
    {
        return new ComplexUser(userId,complexId);
    }

    public ComplexUserRole AddRole(Guid roleId)
    {
        var role = new ComplexUserRole(this.Id, roleId);
        this.Roles.Add(role);
        return role;
    }
}

public partial class Section
{
    public static Section Create(string name, string description, Guid complexId)
    {
        return new Section(name, description, complexId);
    }

    public Position AddPosition(string name, string description, Guid complexId)
    {
        var position = Position.Create(name, description, complexId, this.Id);
        this.Positions.Add(position);
        return position;
    }
}

public partial class Position
{
    public static Position Create(string name, string description, Guid complexId, Guid sectionId)
    {
        return new Position(name, description, complexId, sectionId);
    }
}

