feat: invites
This commit is contained in:
@@ -13,9 +13,8 @@ public sealed class CollectionConfiguration : IEntityTypeConfiguration<Collectio
|
||||
builder.HasKey(x => x.Id);
|
||||
builder.Property(x => x.Id).HasColumnName("id");
|
||||
|
||||
builder.Property(x => x.OwnerTelegramId)
|
||||
.HasColumnName("owner_telegram_id")
|
||||
.IsRequired();
|
||||
// OwnerTelegramId вычисляется из Members, не хранится как отдельная колонка
|
||||
builder.Ignore(x => x.OwnerTelegramId);
|
||||
|
||||
builder.Property(x => x.Name)
|
||||
.HasColumnName("name")
|
||||
@@ -44,15 +43,6 @@ public sealed class CollectionConfiguration : IEntityTypeConfiguration<Collectio
|
||||
.HasFilter("share_token IS NOT NULL")
|
||||
.HasDatabaseName("ix_collections_share_token");
|
||||
|
||||
builder.HasIndex(x => x.OwnerTelegramId)
|
||||
.HasDatabaseName("ix_collections_owner");
|
||||
|
||||
// Уникальность Inbox на пользователя
|
||||
builder.HasIndex(x => new { x.OwnerTelegramId, x.IsInbox })
|
||||
.HasFilter("is_inbox = true")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("ix_collections_inbox_unique");
|
||||
|
||||
// Участники — owned entity
|
||||
builder.OwnsMany(x => x.Members, m =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user