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-08 14:39:25 +00:00
|
|
|
|
.HasAnnotation("ProductVersion", "7.0.13")
|
2023-08-14 11:49:48 +00:00
|
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
|
|
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("Server.DB.Documents.Account", b =>
|
|
|
|
|
{
|
|
|
|
|
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")
|
|
|
|
|
.HasColumnType("varchar(20)");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Accounts");
|
|
|
|
|
});
|
2023-08-17 23:09:27 +00:00
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("Server.DB.Documents.Character", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("AccountId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<long>("Experience")
|
|
|
|
|
.HasColumnType("bigint");
|
|
|
|
|
|
|
|
|
|
b.Property<byte>("Gender")
|
|
|
|
|
.HasColumnType("smallint");
|
|
|
|
|
|
2023-11-14 19:07:45 +00:00
|
|
|
|
b.Property<Guid>("GuildId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
2023-11-13 20:12:12 +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-13 20:12:12 +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")
|
|
|
|
|
.HasColumnType("varchar(20)");
|
|
|
|
|
|
|
|
|
|
b.Property<byte>("PvPLevel")
|
|
|
|
|
.HasColumnType("smallint");
|
|
|
|
|
|
|
|
|
|
b.Property<byte>("ServerId")
|
|
|
|
|
.HasColumnType("smallint");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("AccountId");
|
|
|
|
|
|
2023-11-14 19:07:45 +00:00
|
|
|
|
b.HasIndex("GuildId");
|
|
|
|
|
|
2023-08-17 23:09:27 +00:00
|
|
|
|
b.ToTable("Characters");
|
|
|
|
|
});
|
|
|
|
|
|
2023-11-14 19:07:45 +00:00
|
|
|
|
modelBuilder.Entity("Server.DB.Documents.Guild", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Notice")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Guild");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("Server.DB.Documents.GuildMember", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("CharacterId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("GuildId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<byte>("Rank")
|
|
|
|
|
.HasColumnType("smallint");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("CharacterId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("GuildId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("GuildMember");
|
|
|
|
|
});
|
|
|
|
|
|
2023-11-08 14:39:25 +00:00
|
|
|
|
modelBuilder.Entity("Server.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");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("CharacterId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
2023-11-13 20:12:12 +00:00
|
|
|
|
b.Property<int>("ItemId")
|
|
|
|
|
.HasColumnType("integer");
|
2023-11-08 14:39:25 +00:00
|
|
|
|
|
|
|
|
|
b.Property<byte>("ItemType")
|
|
|
|
|
.HasColumnType("smallint");
|
|
|
|
|
|
|
|
|
|
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");
|
|
|
|
|
|
|
|
|
|
b.ToTable("InventoryItem");
|
|
|
|
|
});
|
|
|
|
|
|
2023-08-17 23:09:27 +00:00
|
|
|
|
modelBuilder.Entity("Server.DB.Documents.Character", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("Server.DB.Documents.Account", "Account")
|
|
|
|
|
.WithMany("Characters")
|
|
|
|
|
.HasForeignKey("AccountId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2023-11-14 19:07:45 +00:00
|
|
|
|
b.HasOne("Server.DB.Documents.Guild", "Guild")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("GuildId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2023-11-13 20:12:12 +00:00
|
|
|
|
b.OwnsOne("Wonderking.Packets.Outgoing.BaseStats", "BaseStats", b1 =>
|
|
|
|
|
{
|
|
|
|
|
b1.Property<Guid>("CharacterId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b1.Property<short>("Dexterity")
|
|
|
|
|
.HasColumnType("smallint");
|
|
|
|
|
|
|
|
|
|
b1.Property<short>("Intelligence")
|
|
|
|
|
.HasColumnType("smallint");
|
|
|
|
|
|
|
|
|
|
b1.Property<short>("Luck")
|
|
|
|
|
.HasColumnType("smallint");
|
|
|
|
|
|
|
|
|
|
b1.Property<short>("Strength")
|
|
|
|
|
.HasColumnType("smallint");
|
|
|
|
|
|
|
|
|
|
b1.Property<short>("Vitality")
|
|
|
|
|
.HasColumnType("smallint");
|
|
|
|
|
|
|
|
|
|
b1.Property<short>("Wisdom")
|
|
|
|
|
.HasColumnType("smallint");
|
|
|
|
|
|
|
|
|
|
b1.HasKey("CharacterId");
|
|
|
|
|
|
|
|
|
|
b1.ToTable("Characters");
|
|
|
|
|
|
|
|
|
|
b1.WithOwner()
|
|
|
|
|
.HasForeignKey("CharacterId");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
b.OwnsOne("Wonderking.Packets.Outgoing.JobData", "JobData", b1 =>
|
|
|
|
|
{
|
|
|
|
|
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-13 20:12:12 +00:00
|
|
|
|
|
|
|
|
|
b.Navigation("BaseStats");
|
|
|
|
|
|
2023-11-14 19:07:45 +00:00
|
|
|
|
b.Navigation("Guild");
|
|
|
|
|
|
2023-11-13 20:12:12 +00:00
|
|
|
|
b.Navigation("JobData");
|
2023-08-17 23:09:27 +00:00
|
|
|
|
});
|
|
|
|
|
|
2023-11-14 19:07:45 +00:00
|
|
|
|
modelBuilder.Entity("Server.DB.Documents.GuildMember", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("Server.DB.Documents.Character", "Character")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("CharacterId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("Server.DB.Documents.Guild", "Guild")
|
|
|
|
|
.WithMany("GuildMembers")
|
|
|
|
|
.HasForeignKey("GuildId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Character");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Guild");
|
|
|
|
|
});
|
|
|
|
|
|
2023-11-08 14:39:25 +00:00
|
|
|
|
modelBuilder.Entity("Server.DB.Documents.InventoryItem", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("Server.DB.Documents.Character", "Character")
|
|
|
|
|
.WithMany("InventoryItems")
|
|
|
|
|
.HasForeignKey("CharacterId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Character");
|
|
|
|
|
});
|
|
|
|
|
|
2023-08-17 23:09:27 +00:00
|
|
|
|
modelBuilder.Entity("Server.DB.Documents.Account", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Characters");
|
|
|
|
|
});
|
2023-11-08 14:39:25 +00:00
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("Server.DB.Documents.Character", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("InventoryItems");
|
|
|
|
|
});
|
2023-11-14 19:07:45 +00:00
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("Server.DB.Documents.Guild", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("GuildMembers");
|
|
|
|
|
});
|
2023-08-14 11:49:48 +00:00
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|