97 lines
3.3 KiB
C#
97 lines
3.3 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Knot.Modules.Chats.Infrastructure.Persistence;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace Knot.Modules.Chats.Migrations
|
|
{
|
|
[DbContext(typeof(ChatsDbContext))]
|
|
partial class ChatsDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasDefaultSchema("chats")
|
|
.HasAnnotation("ProductVersion", "10.0.4")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Avatar")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Type")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Chats", "chats");
|
|
});
|
|
|
|
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
|
{
|
|
b.OwnsMany("Knot.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
|
{
|
|
b1.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b1.Property<Guid>("ChatId")
|
|
.HasColumnType("uuid");
|
|
|
|
b1.Property<bool>("IsMuted")
|
|
.HasColumnType("boolean");
|
|
|
|
b1.Property<bool>("IsPinned")
|
|
.HasColumnType("boolean");
|
|
|
|
b1.Property<DateTime>("JoinedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b1.Property<string>("Role")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b1.HasKey("Id");
|
|
|
|
b1.HasIndex("ChatId", "UserId")
|
|
.IsUnique();
|
|
|
|
b1.ToTable("ChatMembers", "chats");
|
|
|
|
b1.WithOwner()
|
|
.HasForeignKey("ChatId");
|
|
});
|
|
|
|
b.Navigation("Members");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|