too many changes

This commit is contained in:
2026-10-07 02:17:30 +04:00
parent 0c7f3bce90
commit bcf985c17d
74 changed files with 4048 additions and 78 deletions
@@ -32,6 +32,16 @@ public sealed class CollectionRepository : ICollectionRepository
.ToListAsync(ct);
}
public async Task<IReadOnlyList<Collection>> GetByMemberAsync(long telegramId, CancellationToken ct)
{
return await _db.Collections
.Include(c => c.Members)
.Where(c => c.Members.Any(m => m.TelegramId == telegramId))
.OrderBy(x => x.IsInbox ? 0 : 1) // Inbox всегда первым
.ThenBy(x => x.Name)
.ToListAsync(ct);
}
public Task<Collection?> GetInboxAsync(long ownerTelegramId, CancellationToken ct) =>
_db.Collections
.Include(c => c.Members)