// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using vassago.Models; #nullable disable namespace vassago.Migrations { [DbContext(typeof(ChattingContext))] partial class ChattingContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.5") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("ChannelUser", b => { b.Property("OtherUsersId") .HasColumnType("uuid"); b.Property("SeenInChannelsId") .HasColumnType("uuid"); b.HasKey("OtherUsersId", "SeenInChannelsId"); b.HasIndex("SeenInChannelsId"); b.ToTable("ChannelUser"); }); modelBuilder.Entity("vassago.Models.Attachment", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Content") .HasColumnType("bytea"); b.Property("ExternalId") .HasColumnType("numeric(20,0)"); b.Property("Filename") .HasColumnType("text"); b.Property("MessageId") .HasColumnType("uuid"); b.Property("Source") .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("MessageId"); b.ToTable("Attachments"); }); modelBuilder.Entity("vassago.Models.Channel", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Discriminator") .IsRequired() .HasColumnType("text"); b.Property("DisplayName") .HasColumnType("text"); b.Property("ExternalId") .HasColumnType("numeric(20,0)"); b.Property("IsDM") .HasColumnType("boolean"); b.Property("ParentChannelId") .HasColumnType("uuid"); b.Property("PermissionsOverridesId") .HasColumnType("integer"); b.Property("ProtocolId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("ParentChannelId"); b.HasIndex("PermissionsOverridesId"); b.HasIndex("ProtocolId"); b.ToTable("Channels"); b.HasDiscriminator("Discriminator").HasValue("Channel"); b.UseTphMappingStrategy(); }); modelBuilder.Entity("vassago.Models.Message", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ActedOn") .HasColumnType("boolean"); b.Property("AuthorId") .HasColumnType("uuid"); b.Property("ChannelId") .HasColumnType("uuid"); b.Property("Content") .HasColumnType("text"); b.Property("ExternalId") .HasColumnType("numeric(20,0)"); b.Property("ExternalRepresentation") .HasColumnType("text"); b.Property("MentionsMe") .HasColumnType("boolean"); b.Property("Timestamp") .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.HasIndex("AuthorId"); b.HasIndex("ChannelId"); b.ToTable("Messages"); }); modelBuilder.Entity("vassago.Models.PermissionSettings", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("LewdnessFilterLevel") .HasColumnType("integer"); b.Property("LinksAllowed") .HasColumnType("boolean"); b.Property("MaxAttachmentBytes") .HasColumnType("bigint"); b.Property("MaxTextChars") .HasColumnType("bigint"); b.Property("MeannessFilterLevel") .HasColumnType("integer"); b.HasKey("Id"); b.ToTable("PermissionSettings"); }); modelBuilder.Entity("vassago.Models.User", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("DisplayName") .HasColumnType("text"); b.Property("External") .HasColumnType("text"); b.Property("ExternalId") .HasColumnType("numeric(20,0)"); b.Property("IsBot") .HasColumnType("boolean"); b.Property("ProtocolId") .HasColumnType("uuid"); b.Property("UserId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("ProtocolId"); b.HasIndex("UserId"); b.ToTable("Users"); }); modelBuilder.Entity("vassago.Models.Protocol", b => { b.HasBaseType("vassago.Models.Channel"); b.Property("ConnectionToken") .HasColumnType("text"); b.HasDiscriminator().HasValue("Protocol"); }); modelBuilder.Entity("ChannelUser", b => { b.HasOne("vassago.Models.User", null) .WithMany() .HasForeignKey("OtherUsersId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("vassago.Models.Channel", null) .WithMany() .HasForeignKey("SeenInChannelsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("vassago.Models.Attachment", b => { b.HasOne("vassago.Models.Message", "Message") .WithMany("Attachments") .HasForeignKey("MessageId"); b.Navigation("Message"); }); modelBuilder.Entity("vassago.Models.Channel", b => { b.HasOne("vassago.Models.Channel", "ParentChannel") .WithMany("SubChannels") .HasForeignKey("ParentChannelId"); b.HasOne("vassago.Models.PermissionSettings", "PermissionsOverrides") .WithMany() .HasForeignKey("PermissionsOverridesId"); b.HasOne("vassago.Models.Protocol", "Protocol") .WithMany() .HasForeignKey("ProtocolId"); b.Navigation("ParentChannel"); b.Navigation("PermissionsOverrides"); b.Navigation("Protocol"); }); modelBuilder.Entity("vassago.Models.Message", b => { b.HasOne("vassago.Models.User", "Author") .WithMany() .HasForeignKey("AuthorId"); b.HasOne("vassago.Models.Channel", "Channel") .WithMany("Messages") .HasForeignKey("ChannelId"); b.Navigation("Author"); b.Navigation("Channel"); }); modelBuilder.Entity("vassago.Models.User", b => { b.HasOne("vassago.Models.Protocol", "Protocol") .WithMany() .HasForeignKey("ProtocolId"); b.HasOne("vassago.Models.User", null) .WithMany("KnownAliases") .HasForeignKey("UserId"); b.Navigation("Protocol"); }); modelBuilder.Entity("vassago.Models.Channel", b => { b.Navigation("Messages"); b.Navigation("SubChannels"); }); modelBuilder.Entity("vassago.Models.Message", b => { b.Navigation("Attachments"); }); modelBuilder.Entity("vassago.Models.User", b => { b.Navigation("KnownAliases"); }); #pragma warning restore 612, 618 } } }