Add relationships feature and EF migration

This commit is contained in:
Holden
2026-06-26 17:06:15 -05:00
parent dbe33f3148
commit b3028ce741
30 changed files with 536 additions and 8 deletions

View File

@@ -0,0 +1,35 @@
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;
}
}