QuestShare/QuestShare.Server/Migrations/QuestShareContextModelSnapshot.cs
2025-03-01 20:38:45 -05:00

232 lines
8.3 KiB
C#

// <auto-generated />
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<string>("BanId")
.HasColumnType("text");
b.Property<decimal>("BanCharacterId")
.HasColumnType("numeric(20,0)");
b.Property<DateTime>("BanDate")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("BanExpiry")
.HasColumnType("timestamp with time zone");
b.Property<IPAddress>("BanIp")
.IsRequired()
.HasColumnType("inet");
b.Property<string>("BanIssuer")
.IsRequired()
.HasColumnType("text");
b.Property<string>("BanReason")
.IsRequired()
.HasColumnType("text");
b.HasKey("BanId");
b.ToTable("Bans", (string)null);
});
modelBuilder.Entity("QuestShare.Server.Models.Client", b =>
{
b.Property<Guid>("ClientId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("ConnectionId")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("Created")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("current_timestamp");
b.Property<string>("KnownShareCodes")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("LastUpdated")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("current_timestamp");
b.Property<Guid?>("SessionMemberClientSessionId")
.HasColumnType("uuid");
b.Property<string>("Token")
.IsRequired()
.HasColumnType("text");
b.HasKey("ClientId");
b.HasIndex("SessionMemberClientSessionId");
b.ToTable("Clients", (string)null);
});
modelBuilder.Entity("QuestShare.Server.Models.Session", b =>
{
b.Property<Guid>("SessionId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<bool>("AllowJoins")
.HasColumnType("boolean");
b.Property<DateTime>("Created")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("current_timestamp");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<DateTime>("LastUpdated")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("current_timestamp");
b.Property<string>("OwnerCharacterId")
.IsRequired()
.HasColumnType("text");
b.Property<Guid>("OwnerClientId")
.HasColumnType("uuid");
b.Property<string>("PartyMembers")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ReservedConnectionId")
.IsRequired()
.HasColumnType("text");
b.Property<Guid?>("SessionMemberClientSessionId")
.HasColumnType("uuid");
b.Property<string>("ShareCode")
.IsRequired()
.HasColumnType("text");
b.Property<int>("SharedQuestId")
.HasColumnType("integer");
b.Property<byte>("SharedQuestStep")
.HasColumnType("smallint");
b.Property<bool>("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<Guid>("ClientSessionId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<Guid>("ClientId")
.HasColumnType("uuid");
b.Property<DateTime>("Created")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("current_timestamp");
b.Property<DateTime>("LastUpdated")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("current_timestamp");
b.Property<Guid>("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
}
}
}