continuity/Continuity.AuthServer/DB/Migrations/WonderkingContextModelSnapshot.cs

345 lines
12 KiB
C#
Raw Normal View History

2023-08-14 11:49:48 +00:00
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Server.DB;
#nullable disable
namespace Server.DB.Migrations
{
[DbContext(typeof(WonderkingContext))]
partial class WonderkingContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
2023-11-14 20:06:02 +00:00
.HasAnnotation("ProductVersion", "8.0.0")
2023-11-16 11:06:36 +00:00
.HasAnnotation("Proxies:ChangeTracking", false)
.HasAnnotation("Proxies:CheckEquality", false)
.HasAnnotation("Proxies:LazyLoading", true)
2023-08-14 11:49:48 +00:00
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Continuity.AuthServer.DB.Documents.Account", b =>
2023-08-14 11:49:48 +00:00
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Email")
.HasColumnType("text");
b.Property<byte[]>("Password")
.HasColumnType("bytea");
b.Property<byte>("PermissionLevel")
.HasColumnType("smallint");
b.Property<byte[]>("Salt")
.HasColumnType("bytea");
b.Property<string>("Username")
2023-11-16 11:06:36 +00:00
.HasMaxLength(20)
.HasColumnType("character varying(20)");
2023-08-14 11:49:48 +00:00
b.HasKey("Id");
b.HasIndex("Id")
.IsUnique();
2023-11-14 20:06:02 +00:00
b.HasIndex("Username")
.IsUnique();
2023-08-14 11:49:48 +00:00
b.ToTable("Accounts");
});
2023-08-17 23:09:27 +00:00
modelBuilder.Entity("Continuity.AuthServer.DB.Documents.Character", b =>
2023-08-17 23:09:27 +00:00
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
2023-11-25 11:24:42 +00:00
b.Property<Guid>("AccountId")
2023-08-17 23:09:27 +00:00
.HasColumnType("uuid");
b.Property<long>("Experience")
.HasColumnType("bigint");
b.Property<byte>("Gender")
.HasColumnType("smallint");
2023-11-14 20:06:02 +00:00
b.Property<int>("Health")
.HasColumnType("integer");
2023-08-17 23:09:27 +00:00
b.Property<short>("LastXCoordinate")
.HasColumnType("smallint");
b.Property<short>("LastYCoordinate")
.HasColumnType("smallint");
b.Property<byte>("Level")
.HasColumnType("smallint");
2023-11-14 20:06:02 +00:00
b.Property<int>("Mana")
.HasColumnType("integer");
2023-08-17 23:09:27 +00:00
b.Property<int>("MapId")
.HasColumnType("integer");
b.Property<string>("Name")
2023-11-16 11:06:36 +00:00
.HasMaxLength(20)
.HasColumnType("character varying(20)");
2023-08-17 23:09:27 +00:00
b.Property<byte>("PvPLevel")
.HasColumnType("smallint");
b.HasKey("Id");
b.HasIndex("AccountId");
2023-11-16 11:06:36 +00:00
b.HasIndex("Id")
.IsUnique();
b.HasIndex("Name")
.IsUnique();
2023-08-17 23:09:27 +00:00
b.ToTable("Characters");
});
modelBuilder.Entity("Continuity.AuthServer.DB.Documents.Guild", b =>
2023-11-14 20:06:02 +00:00
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Name")
.HasMaxLength(16)
.HasColumnType("character varying(16)");
2023-11-14 20:06:02 +00:00
b.Property<string>("Notice")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("Id")
.IsUnique();
b.HasIndex("Name")
.IsUnique();
2023-11-20 18:50:09 +00:00
b.ToTable("Guilds");
2023-11-14 20:06:02 +00:00
});
modelBuilder.Entity("Continuity.AuthServer.DB.Documents.GuildMember", b =>
2023-11-14 20:06:02 +00:00
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
2023-11-25 11:24:42 +00:00
b.Property<Guid>("CharacterId")
2023-11-14 20:06:02 +00:00
.HasColumnType("uuid");
2023-11-25 11:24:42 +00:00
b.Property<Guid>("GuildId")
2023-11-14 20:06:02 +00:00
.HasColumnType("uuid");
b.Property<byte>("Rank")
.HasColumnType("smallint");
b.HasKey("Id");
2023-11-25 11:24:42 +00:00
b.HasIndex("CharacterId")
.IsUnique();
2023-11-14 20:06:02 +00:00
b.HasIndex("GuildId");
b.HasIndex("Id")
.IsUnique();
2023-11-14 20:06:02 +00:00
b.ToTable("GuildMember");
});
modelBuilder.Entity("Continuity.AuthServer.DB.Documents.InventoryItem", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<byte>("AddOption")
.HasColumnType("smallint");
b.Property<byte>("AddOption2")
.HasColumnType("smallint");
b.Property<byte>("AddOption3")
.HasColumnType("smallint");
2023-11-25 11:24:42 +00:00
b.Property<Guid>("CharacterId")
.HasColumnType("uuid");
b.Property<int>("Count")
.HasColumnType("integer");
b.Property<byte>("InventoryTab")
.HasColumnType("smallint");
2023-11-14 20:06:02 +00:00
b.Property<int>("ItemId")
.HasColumnType("integer");
b.Property<byte>("Level")
.HasColumnType("smallint");
b.Property<short>("Option")
.HasColumnType("smallint");
b.Property<short>("Option2")
.HasColumnType("smallint");
b.Property<short>("Option3")
.HasColumnType("smallint");
b.Property<byte>("Rarity")
.HasColumnType("smallint");
b.Property<byte>("Slot")
.HasColumnType("smallint");
b.HasKey("Id");
b.HasIndex("CharacterId");
2023-11-20 18:50:09 +00:00
b.ToTable("InventoryItems");
});
modelBuilder.Entity("Continuity.AuthServer.DB.Documents.Character", b =>
2023-08-17 23:09:27 +00:00
{
b.HasOne("Continuity.AuthServer.DB.Documents.Account", "Account")
2023-08-17 23:09:27 +00:00
.WithMany("Characters")
.HasForeignKey("AccountId")
2023-11-25 11:24:42 +00:00
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
2023-11-14 20:06:02 +00:00
2023-11-14 20:28:52 +00:00
b.OwnsOne("Wonderking.Packets.Outgoing.Data.BaseStats", "BaseStats", b1 =>
2023-11-14 20:06:02 +00:00
{
b1.Property<Guid>("CharacterId")
.HasColumnType("uuid");
b1.Property<short>("Dexterity")
2023-11-20 18:50:09 +00:00
.HasColumnType("smallint")
.HasAnnotation("Relational:JsonPropertyName", "dexterity");
2023-11-14 20:06:02 +00:00
b1.Property<short>("Intelligence")
2023-11-20 18:50:09 +00:00
.HasColumnType("smallint")
.HasAnnotation("Relational:JsonPropertyName", "intelligence");
2023-11-14 20:06:02 +00:00
b1.Property<short>("Luck")
2023-11-20 18:50:09 +00:00
.HasColumnType("smallint")
.HasAnnotation("Relational:JsonPropertyName", "luck");
2023-11-14 20:06:02 +00:00
b1.Property<short>("Strength")
2023-11-20 18:50:09 +00:00
.HasColumnType("smallint")
.HasAnnotation("Relational:JsonPropertyName", "strength");
2023-11-14 20:06:02 +00:00
b1.Property<short>("Vitality")
2023-11-20 18:50:09 +00:00
.HasColumnType("smallint")
.HasAnnotation("Relational:JsonPropertyName", "vitality");
2023-11-14 20:06:02 +00:00
b1.Property<short>("Wisdom")
2023-11-20 18:50:09 +00:00
.HasColumnType("smallint")
.HasAnnotation("Relational:JsonPropertyName", "wisdom");
2023-11-14 20:06:02 +00:00
b1.HasKey("CharacterId");
b1.ToTable("Characters");
b1.WithOwner()
.HasForeignKey("CharacterId");
});
2023-11-14 20:28:52 +00:00
b.OwnsOne("Wonderking.Packets.Outgoing.Data.JobData", "JobData", b1 =>
2023-11-14 20:06:02 +00:00
{
b1.Property<Guid>("CharacterId")
.HasColumnType("uuid");
b1.Property<byte>("FirstJob")
.HasColumnType("smallint");
b1.Property<byte>("FourthJob")
.HasColumnType("smallint");
b1.Property<byte>("SecondJob")
.HasColumnType("smallint");
b1.Property<byte>("ThirdJob")
.HasColumnType("smallint");
b1.HasKey("CharacterId");
b1.ToTable("Characters");
b1.WithOwner()
.HasForeignKey("CharacterId");
});
2023-08-17 23:09:27 +00:00
b.Navigation("Account");
2023-11-14 20:06:02 +00:00
b.Navigation("BaseStats");
b.Navigation("JobData");
});
modelBuilder.Entity("Continuity.AuthServer.DB.Documents.GuildMember", b =>
2023-11-14 20:06:02 +00:00
{
b.HasOne("Continuity.AuthServer.DB.Documents.Character", "Character")
2023-11-25 11:24:42 +00:00
.WithOne("GuildMember")
.HasForeignKey("Continuity.AuthServer.DB.Documents.GuildMember", "CharacterId")
2023-11-25 11:24:42 +00:00
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
2023-11-14 20:06:02 +00:00
b.HasOne("Continuity.AuthServer.DB.Documents.Guild", "Guild")
2023-11-14 20:06:02 +00:00
.WithMany("GuildMembers")
.HasForeignKey("GuildId")
2023-11-25 11:24:42 +00:00
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
2023-11-14 20:06:02 +00:00
b.Navigation("Character");
b.Navigation("Guild");
});
modelBuilder.Entity("Continuity.AuthServer.DB.Documents.InventoryItem", b =>
{
b.HasOne("Continuity.AuthServer.DB.Documents.Character", "Character")
.WithMany("InventoryItems")
2023-11-21 21:00:55 +00:00
.HasForeignKey("CharacterId")
2023-11-25 11:24:42 +00:00
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Character");
});
modelBuilder.Entity("Continuity.AuthServer.DB.Documents.Account", b =>
2023-08-17 23:09:27 +00:00
{
b.Navigation("Characters");
});
modelBuilder.Entity("Continuity.AuthServer.DB.Documents.Character", b =>
{
2023-11-25 11:24:42 +00:00
b.Navigation("GuildMember");
b.Navigation("InventoryItems");
});
2023-11-14 20:06:02 +00:00
modelBuilder.Entity("Continuity.AuthServer.DB.Documents.Guild", b =>
2023-11-14 20:06:02 +00:00
{
b.Navigation("GuildMembers");
});
2023-08-14 11:49:48 +00:00
#pragma warning restore 612, 618
}
}
}