//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SCHALE.Common.Database;
#nullable disable
namespace SCHALE.Common.Migrations.SqliteMigrations
{
[DbContext(typeof(SCHALESqliteContext))]
[Migration("20240601161847_InitialMigration")]
partial class InitialMigration
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.6");
modelBuilder.Entity("SCHALE.Common.Database.AccountDB", b =>
{
b.Property("ServerId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("BirthDay")
.HasColumnType("TEXT");
b.Property("CallName")
.HasColumnType("TEXT");
b.Property("CallNameUpdateTime")
.HasColumnType("TEXT");
b.Property("Comment")
.HasColumnType("TEXT");
b.Property("CreateDate")
.HasColumnType("TEXT");
b.Property("DevId")
.HasColumnType("TEXT");
b.Property("Exp")
.HasColumnType("INTEGER");
b.Property("LastConnectTime")
.HasColumnType("TEXT");
b.Property("Level")
.HasColumnType("INTEGER");
b.Property("LinkRewardDate")
.HasColumnType("TEXT");
b.Property("LobbyMode")
.HasColumnType("INTEGER");
b.Property("MemoryLobbyUniqueId")
.HasColumnType("INTEGER");
b.Property("Nickname")
.HasColumnType("TEXT");
b.Property("PublisherAccountId")
.HasColumnType("INTEGER");
b.Property("RaidInfo")
.IsRequired()
.HasColumnType("TEXT");
b.Property("RepresentCharacterServerId")
.HasColumnType("INTEGER");
b.Property("RetentionDays")
.HasColumnType("INTEGER");
b.Property("State")
.HasColumnType("INTEGER");
b.Property("UnReadMailCount")
.HasColumnType("INTEGER");
b.Property("VIPLevel")
.HasColumnType("INTEGER");
b.HasKey("ServerId");
b.ToTable("Accounts");
});
modelBuilder.Entity("SCHALE.Common.Database.CharacterDB", b =>
{
b.Property("ServerId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AccountServerId")
.HasColumnType("INTEGER");
b.Property("EquipmentServerIds")
.IsRequired()
.HasColumnType("TEXT");
b.Property("EquipmentSlotAndDBIds")
.IsRequired()
.HasColumnType("TEXT");
b.Property("ExSkillLevel")
.HasColumnType("INTEGER");
b.Property("Exp")
.HasColumnType("INTEGER");
b.Property("ExtraPassiveSkillLevel")
.HasColumnType("INTEGER");
b.Property("FavorExp")
.HasColumnType("INTEGER");
b.Property("FavorRank")
.HasColumnType("INTEGER");
b.Property("IsFavorite")
.HasColumnType("INTEGER");
b.Property("IsLocked")
.HasColumnType("INTEGER");
b.Property("LeaderSkillLevel")
.HasColumnType("INTEGER");
b.Property("Level")
.HasColumnType("INTEGER");
b.Property("PassiveSkillLevel")
.HasColumnType("INTEGER");
b.Property("PotentialStats")
.IsRequired()
.HasColumnType("TEXT");
b.Property("PublicSkillLevel")
.HasColumnType("INTEGER");
b.Property("StarGrade")
.HasColumnType("INTEGER");
b.Property("UniqueId")
.HasColumnType("INTEGER");
b.HasKey("ServerId");
b.HasIndex("AccountServerId");
b.ToTable("Characters");
});
modelBuilder.Entity("SCHALE.Common.Database.EchelonDB", b =>
{
b.Property("ServerId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AccountServerId")
.HasColumnType("INTEGER");
b.Property("CombatStyleIndex")
.IsRequired()
.HasColumnType("TEXT");
b.Property("EchelonNumber")
.HasColumnType("INTEGER");
b.Property("EchelonType")
.HasColumnType("INTEGER");
b.Property("ExtensionType")
.HasColumnType("INTEGER");
b.Property("LeaderServerId")
.HasColumnType("INTEGER");
b.Property("MainSlotServerIds")
.IsRequired()
.HasColumnType("TEXT");
b.Property("SkillCardMulliganCharacterIds")
.IsRequired()
.HasColumnType("TEXT");
b.Property("SupportSlotServerIds")
.IsRequired()
.HasColumnType("TEXT");
b.Property("TSSInteractionServerId")
.HasColumnType("INTEGER");
b.Property("UsingFlag")
.HasColumnType("INTEGER");
b.HasKey("ServerId");
b.HasIndex("AccountServerId");
b.ToTable("Echelons");
});
modelBuilder.Entity("SCHALE.Common.Database.EquipmentDB", b =>
{
b.Property("ServerId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AccountServerId")
.HasColumnType("INTEGER");
b.Property("BoundCharacterServerId")
.HasColumnType("INTEGER");
b.Property("Exp")
.HasColumnType("INTEGER");
b.Property("IsLocked")
.HasColumnType("INTEGER");
b.Property("Level")
.HasColumnType("INTEGER");
b.Property("StackCount")
.HasColumnType("INTEGER");
b.Property("Tier")
.HasColumnType("INTEGER");
b.Property("UniqueId")
.HasColumnType("INTEGER");
b.HasKey("ServerId");
b.HasIndex("AccountServerId");
b.ToTable("Equipment");
});
modelBuilder.Entity("SCHALE.Common.Database.GearDB", b =>
{
b.Property("ServerId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AccountServerId")
.HasColumnType("INTEGER");
b.Property("BoundCharacterServerId")
.HasColumnType("INTEGER");
b.Property("Exp")
.HasColumnType("INTEGER");
b.Property("Level")
.HasColumnType("INTEGER");
b.Property("SlotIndex")
.HasColumnType("INTEGER");
b.Property("Tier")
.HasColumnType("INTEGER");
b.Property("UniqueId")
.HasColumnType("INTEGER");
b.HasKey("ServerId");
b.HasIndex("AccountServerId");
b.ToTable("Gears");
});
modelBuilder.Entity("SCHALE.Common.Database.ItemDB", b =>
{
b.Property("ServerId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AccountServerId")
.HasColumnType("INTEGER");
b.Property("IsLocked")
.HasColumnType("INTEGER");
b.Property("StackCount")
.HasColumnType("INTEGER");
b.Property("UniqueId")
.HasColumnType("INTEGER");
b.HasKey("ServerId");
b.HasIndex("AccountServerId");
b.ToTable("Items");
});
modelBuilder.Entity("SCHALE.Common.Database.MemoryLobbyDB", b =>
{
b.Property("ServerId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AccountServerId")
.HasColumnType("INTEGER");
b.Property("MemoryLobbyUniqueId")
.HasColumnType("INTEGER");
b.HasKey("ServerId");
b.HasIndex("AccountServerId");
b.ToTable("MemoryLobbies");
});
modelBuilder.Entity("SCHALE.Common.Database.MissionProgressDB", b =>
{
b.Property("ServerId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AccountServerId")
.HasColumnType("INTEGER");
b.Property("Complete")
.HasColumnType("INTEGER");
b.Property("MissionUniqueId")
.HasColumnType("INTEGER");
b.Property("ProgressParameters")
.IsRequired()
.HasColumnType("TEXT");
b.Property("StartTime")
.HasColumnType("TEXT");
b.HasKey("ServerId");
b.HasIndex("AccountServerId");
b.ToTable("MissionProgresses");
});
modelBuilder.Entity("SCHALE.Common.Database.Models.AccountTutorial", b =>
{
b.Property("AccountServerId")
.HasColumnType("INTEGER");
b.Property("TutorialIds")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("AccountServerId");
b.ToTable("AccountTutorials");
});
modelBuilder.Entity("SCHALE.Common.Database.Models.GuestAccount", b =>
{
b.Property("Uid")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("DeviceId")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Token")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Uid");
b.ToTable("GuestAccounts");
});
modelBuilder.Entity("SCHALE.Common.Database.ScenarioHistoryDB", b =>
{
b.Property("ServerId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AccountServerId")
.HasColumnType("INTEGER");
b.Property("ClearDateTime")
.HasColumnType("TEXT");
b.Property("ScenarioUniqueId")
.HasColumnType("INTEGER");
b.HasKey("ServerId");
b.HasIndex("AccountServerId");
b.ToTable("Scenarios");
});
modelBuilder.Entity("SCHALE.Common.Database.WeaponDB", b =>
{
b.Property("ServerId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AccountServerId")
.HasColumnType("INTEGER");
b.Property("BoundCharacterServerId")
.HasColumnType("INTEGER");
b.Property("Exp")
.HasColumnType("INTEGER");
b.Property("IsLocked")
.HasColumnType("INTEGER");
b.Property("Level")
.HasColumnType("INTEGER");
b.Property("StarGrade")
.HasColumnType("INTEGER");
b.Property("UniqueId")
.HasColumnType("INTEGER");
b.HasKey("ServerId");
b.HasIndex("AccountServerId");
b.ToTable("Weapons");
});
modelBuilder.Entity("SCHALE.Common.Database.CharacterDB", b =>
{
b.HasOne("SCHALE.Common.Database.AccountDB", "Account")
.WithMany("Characters")
.HasForeignKey("AccountServerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Account");
});
modelBuilder.Entity("SCHALE.Common.Database.EchelonDB", b =>
{
b.HasOne("SCHALE.Common.Database.AccountDB", "Account")
.WithMany("Echelons")
.HasForeignKey("AccountServerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Account");
});
modelBuilder.Entity("SCHALE.Common.Database.EquipmentDB", b =>
{
b.HasOne("SCHALE.Common.Database.AccountDB", "Account")
.WithMany("Equipment")
.HasForeignKey("AccountServerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Account");
});
modelBuilder.Entity("SCHALE.Common.Database.GearDB", b =>
{
b.HasOne("SCHALE.Common.Database.AccountDB", "Account")
.WithMany("Gears")
.HasForeignKey("AccountServerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Account");
});
modelBuilder.Entity("SCHALE.Common.Database.ItemDB", b =>
{
b.HasOne("SCHALE.Common.Database.AccountDB", "Account")
.WithMany("Items")
.HasForeignKey("AccountServerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Account");
});
modelBuilder.Entity("SCHALE.Common.Database.MemoryLobbyDB", b =>
{
b.HasOne("SCHALE.Common.Database.AccountDB", "Account")
.WithMany("MemoryLobbies")
.HasForeignKey("AccountServerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Account");
});
modelBuilder.Entity("SCHALE.Common.Database.MissionProgressDB", b =>
{
b.HasOne("SCHALE.Common.Database.AccountDB", "Account")
.WithMany("MissionProgresses")
.HasForeignKey("AccountServerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Account");
});
modelBuilder.Entity("SCHALE.Common.Database.ScenarioHistoryDB", b =>
{
b.HasOne("SCHALE.Common.Database.AccountDB", "Account")
.WithMany("Scenarios")
.HasForeignKey("AccountServerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Account");
});
modelBuilder.Entity("SCHALE.Common.Database.WeaponDB", b =>
{
b.HasOne("SCHALE.Common.Database.AccountDB", "Account")
.WithMany("Weapons")
.HasForeignKey("AccountServerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Account");
});
modelBuilder.Entity("SCHALE.Common.Database.AccountDB", b =>
{
b.Navigation("Characters");
b.Navigation("Echelons");
b.Navigation("Equipment");
b.Navigation("Gears");
b.Navigation("Items");
b.Navigation("MemoryLobbies");
b.Navigation("MissionProgresses");
b.Navigation("Scenarios");
b.Navigation("Weapons");
});
#pragma warning restore 612, 618
}
}
}