feat: invites

This commit is contained in:
2026-09-28 09:32:22 +04:00
parent 3055381788
commit 7e1e036bf1
24 changed files with 936 additions and 29 deletions
@@ -14,7 +14,11 @@ public sealed class Collection
private readonly List<IDomainEvent> _domainEvents = [];
public Guid Id { get; private set; }
public long OwnerTelegramId { get; private set; }
/// <summary>Вычисляется из CollectionMember с ролью Owner.</summary>
public long OwnerTelegramId =>
_members.FirstOrDefault(m => m.Role == CollectionRole.Owner)?.TelegramId ?? 0L;
public string Name { get; private set; } = string.Empty;
public string? Description { get; private set; }
public CollectionVisibility Visibility { get; private set; }
@@ -37,7 +41,6 @@ public sealed class Collection
private Collection(Guid id, long ownerTelegramId, string name, string? description, bool isInbox)
{
Id = id;
OwnerTelegramId = ownerTelegramId;
Name = name;
Description = description;
IsInbox = isInbox;