// using System; using System.Net; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using QuestShare.Server.Models; #nullable disable namespace QuestShare.Server.Migrations { [DbContext(typeof(QuestShareContext))] partial class QuestShareContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "9.0.2") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("QuestShare.Server.Models.Ban", b => { b.Property("BanId") .HasColumnType("text"); b.Property("BanCharacterId") .HasColumnType("numeric(20,0)"); b.Property("BanDate") .HasColumnType("timestamp with time zone"); b.Property("BanExpiry") .HasColumnType("timestamp with time zone"); b.Property("BanIp") .IsRequired() .HasColumnType("inet"); b.Property("BanIssuer") .IsRequired() .HasColumnType("text"); b.Property("BanReason") .IsRequired() .HasColumnType("text"); b.HasKey("BanId"); b.ToTable("Bans", (string)null); }); modelBuilder.Entity("QuestShare.Server.Models.Client", b => { b.Property("ClientId") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ConnectionId") .IsRequired() .HasColumnType("text"); b.Property("Created") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasDefaultValueSql("current_timestamp"); b.Property("KnownShareCodes") .IsRequired() .HasColumnType("text"); b.Property("LastUpdated") .ValueGeneratedOnAddOrUpdate() .HasColumnType("timestamp with time zone") .HasDefaultValueSql("current_timestamp"); b.Property("SessionMemberClientSessionId") .HasColumnType("uuid"); b.Property("Token") .IsRequired() .HasColumnType("text"); b.HasKey("ClientId"); b.HasIndex("SessionMemberClientSessionId"); b.ToTable("Clients", (string)null); }); modelBuilder.Entity("QuestShare.Server.Models.Session", b => { b.Property("SessionId") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AllowJoins") .HasColumnType("boolean"); b.Property("Created") .ValueGeneratedOnAddOrUpdate() .HasColumnType("timestamp with time zone") .HasDefaultValueSql("current_timestamp"); b.Property("IsActive") .HasColumnType("boolean"); b.Property("LastUpdated") .ValueGeneratedOnAddOrUpdate() .HasColumnType("timestamp with time zone") .HasDefaultValueSql("current_timestamp"); b.Property("OwnerCharacterId") .IsRequired() .HasColumnType("text"); b.Property("OwnerClientId") .HasColumnType("uuid"); b.Property("PartyMembers") .IsRequired() .HasColumnType("text"); b.Property("ReservedConnectionId") .IsRequired() .HasColumnType("text"); b.Property("SessionMemberClientSessionId") .HasColumnType("uuid"); b.Property("ShareCode") .IsRequired() .HasColumnType("text"); b.Property("SharedQuestId") .HasColumnType("integer"); b.Property("SharedQuestStep") .HasColumnType("smallint"); b.Property("SkipPartyCheck") .HasColumnType("boolean"); b.HasKey("SessionId"); b.HasIndex("OwnerClientId"); b.HasIndex("SessionMemberClientSessionId"); b.ToTable("Sessions", (string)null); }); modelBuilder.Entity("QuestShare.Server.Models.SessionMember", b => { b.Property("ClientSessionId") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ClientId") .HasColumnType("uuid"); b.Property("Created") .ValueGeneratedOnAddOrUpdate() .HasColumnType("timestamp with time zone") .HasDefaultValueSql("current_timestamp"); b.Property("LastUpdated") .ValueGeneratedOnAddOrUpdate() .HasColumnType("timestamp with time zone") .HasDefaultValueSql("current_timestamp"); b.Property("SessionId") .HasColumnType("uuid"); b.HasKey("ClientSessionId"); b.HasIndex("ClientId"); b.HasIndex("SessionId"); b.ToTable("SessionMembers", (string)null); }); modelBuilder.Entity("QuestShare.Server.Models.Client", b => { b.HasOne("QuestShare.Server.Models.SessionMember", null) .WithMany() .HasForeignKey("SessionMemberClientSessionId"); }); modelBuilder.Entity("QuestShare.Server.Models.Session", b => { b.HasOne("QuestShare.Server.Models.Client", "Owner") .WithMany() .HasForeignKey("OwnerClientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("QuestShare.Server.Models.SessionMember", null) .WithMany() .HasForeignKey("SessionMemberClientSessionId"); b.Navigation("Owner"); }); modelBuilder.Entity("QuestShare.Server.Models.SessionMember", b => { b.HasOne("QuestShare.Server.Models.Client", "Client") .WithMany() .HasForeignKey("ClientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("QuestShare.Server.Models.Session", "Session") .WithMany() .HasForeignKey("SessionId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Client"); b.Navigation("Session"); }); #pragma warning restore 612, 618 } } }