Files
TenWholeYears.Server/src/RecNet.Domain/Profiles/Relationship.cs
2026-06-26 17:06:15 -05:00

35 lines
809 B
C#

using RecNet.Domain.Exceptions;
namespace RecNet.Domain.Profiles;
public class Relationship
{
public Guid OwnerProfileId { get; private set; }
public Guid ProfileId { get; private set; }
public bool Muted { get; private set; }
public bool Ignored { get; private set; }
private Relationship()
{
}
public static Relationship Create(Guid ownerProfileId, Guid profileId)
{
if (ownerProfileId == Guid.Empty || profileId == Guid.Empty)
throw new DomainException("Profile IDs cannot be null.");
return new Relationship
{
OwnerProfileId = ownerProfileId,
ProfileId = profileId
};
}
public void Mutate(bool muted, bool ignored)
{
Muted = muted;
Ignored = ignored;
}
}