public Building(BuildingId id, string name, Company mainContractor, IEnumerable <Company> subContractors = null) : this(name, mainContractor, subContractors) { Id = id; }
public UserRole(UserBuildingRole userBuildingRole, BuildingId buildingId) { UserBuildingRole = userBuildingRole; BuildingId = buildingId; }
public bool Equals(BuildingId other) { return(Value == other.Value); }
public bool CanReport(BuildingId buildingId) => Roles.Any(r => r.BuildingId == buildingId && r.UserBuildingRole == UserBuildingRole.Reporter);