ItemDB+API
This commit is contained in:
@@ -0,0 +1,831 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Server.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace SystemRevivalServer.Migrations
|
||||
{
|
||||
[DbContext(typeof(GameDbContext))]
|
||||
[Migration("20251204143006_AddVoidScavengersEntities")]
|
||||
partial class AddVoidScavengersEntities
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.10")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<ulong>("Id"));
|
||||
|
||||
b.Property<DateTime?>("BannedUntil")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<bool>("IsBanned")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<byte[]>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("varbinary(64)");
|
||||
|
||||
b.Property<byte[]>("PasswordSalt")
|
||||
.IsRequired()
|
||||
.HasColumnType("varbinary(32)");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property<DateTime>("UpdatedAt"));
|
||||
|
||||
b.Property<string>("Username")
|
||||
.IsRequired()
|
||||
.HasMaxLength(32)
|
||||
.HasColumnType("varchar(32)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Email")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("Username")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Character", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<ulong>("Id"));
|
||||
|
||||
b.Property<ulong>("AccountId")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<string>("AppearanceJson")
|
||||
.HasColumnType("json");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
b.Property<float>("FacingDeg")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<uint>("HpCurrent")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<uint>("HpMax")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<uint>("Level")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<uint>("MpCurrent")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<uint>("MpMax")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(32)
|
||||
.HasColumnType("varchar(32)");
|
||||
|
||||
b.Property<double>("PosX")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PosY")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PosZ")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<uint>("StaminaCurrent")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<uint>("StaminaMax")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<uint>("StatDexterity")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<uint>("StatEndurance")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<uint>("StatIntelligence")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<uint>("StatStrength")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<uint>("StatWisdom")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property<DateTime>("UpdatedAt"));
|
||||
|
||||
b.Property<ulong>("Xp")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<ulong>("ZoneId")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("AccountId")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("ZoneId");
|
||||
|
||||
b.ToTable("characters", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<ulong>("Id"));
|
||||
|
||||
b.Property<ulong>("CharacterId")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
b.Property<ulong>("ItemTemplateId")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<byte>("SlotCode")
|
||||
.HasColumnType("tinyint unsigned");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property<DateTime>("UpdatedAt"));
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ItemTemplateId");
|
||||
|
||||
b.HasIndex("CharacterId", "SlotCode")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("AmmoType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Category")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("CraftCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
b.Property<int>("Damage")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("DamageReduction")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("DashCooldown")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("DashDistance")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("varchar(256)");
|
||||
|
||||
b.Property<float>("ExplosionRadius")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("FireRate")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("HarvestMultiplier")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("HealAmount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("HealthBonus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("IsEnabled")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<int>("LootValue")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("varchar(64)");
|
||||
|
||||
b.Property<int>("PelletCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("ProjectileSpeed")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("Range")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("ScanCooldown")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("ScanRadius")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("ShieldBoostDuration")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("ShieldDuration")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("ShieldHealth")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("SpeedBoostDuration")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("SpeedMultiplier")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("SpeedPenalty")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("Spread")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<bool>("Stackable")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property<DateTime>("UpdatedAt"));
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Category");
|
||||
|
||||
b.HasIndex("IsEnabled");
|
||||
|
||||
b.ToTable("game_items", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
b.Property<int>("EnergyCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("IsEnabled")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<int>("RareCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ResultItemId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ScrapCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property<DateTime>("UpdatedAt"));
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("IsEnabled");
|
||||
|
||||
b.HasIndex("ResultItemId");
|
||||
|
||||
b.ToTable("game_recipes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<ulong>("Id"));
|
||||
|
||||
b.Property<ulong>("CharacterId")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
b.Property<ulong>("ItemTemplateId")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<uint>("Quantity")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<uint>("SlotIndex")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property<DateTime>("UpdatedAt"));
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CharacterId");
|
||||
|
||||
b.HasIndex("ItemTemplateId");
|
||||
|
||||
b.HasIndex("CharacterId", "SlotIndex")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("inventories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.ItemTemplate", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<ulong>("Id"));
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
b.Property<byte>("ItemType")
|
||||
.HasColumnType("tinyint unsigned");
|
||||
|
||||
b.Property<uint>("MaxStack")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("varchar(64)");
|
||||
|
||||
b.Property<byte>("Rarity")
|
||||
.HasColumnType("tinyint unsigned");
|
||||
|
||||
b.Property<string>("StatsJson")
|
||||
.HasColumnType("json");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property<DateTime>("UpdatedAt"));
|
||||
|
||||
b.Property<uint>("Weight")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Name")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("item_templates", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<ulong>("Id"));
|
||||
|
||||
b.Property<ulong>("AccountId")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<int>("DamageDealt")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DamageTaken")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Deaths")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("EloAfter")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("EloChange")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("EnergyCollected")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ItemsCrafted")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Kills")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("MatchDurationSeconds")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("MatchId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(32)
|
||||
.HasColumnType("varchar(32)");
|
||||
|
||||
b.Property<int>("Placement")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("PlayedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
b.Property<int>("RareCollected")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Result")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ScrapCollected")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SurvivalTimeSeconds")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TotalPlayers")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("AccountId");
|
||||
|
||||
b.HasIndex("MatchId");
|
||||
|
||||
b.HasIndex("PlayedAt");
|
||||
|
||||
b.ToTable("match_history", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<ulong>("Id"));
|
||||
|
||||
b.Property<ulong>("AccountId")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
b.Property<int>("Deaths")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Elo")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(1000);
|
||||
|
||||
b.Property<int>("Extractions")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ItemsCrafted")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Kills")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("LongestSurvivalSeconds")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Losses")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("MatchesPlayed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long>("TotalDamageDealt")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("TotalDamageTaken")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("TotalEnergyCollected")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("TotalPlayTimeSeconds")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("TotalRareCollected")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("TotalScrapCollected")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property<DateTime>("UpdatedAt"));
|
||||
|
||||
b.Property<int>("Wins")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("AccountId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("player_stats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<ulong>("Id"));
|
||||
|
||||
b.Property<ulong>("AccountId")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
b.Property<string>("CreatedIp")
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("varchar(64)");
|
||||
|
||||
b.Property<DateTime>("ExpiresAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime?>("RevokedAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("TokenHash")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("varchar(128)");
|
||||
|
||||
b.Property<string>("UserAgent")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("varchar(256)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("AccountId");
|
||||
|
||||
b.HasIndex("TokenHash")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("sessions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Zone", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<ulong>("Id"));
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
b.Property<double>("MaxX")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("MaxY")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("MaxZ")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("MinX")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("MinY")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("MinZ")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("varchar(64)");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property<DateTime>("UpdatedAt"));
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Name")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("zones", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Character", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
.WithMany("Characters")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Zone", "Zone")
|
||||
.WithMany()
|
||||
.HasForeignKey("ZoneId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
|
||||
b.Navigation("Zone");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Character", "Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Character");
|
||||
|
||||
b.Navigation("ItemTemplate");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.GameItem", "ResultItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ResultItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ResultItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Character", "Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Character");
|
||||
|
||||
b.Navigation("ItemTemplate");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
.WithOne()
|
||||
.HasForeignKey("Server.Data.PlayerStats", "AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
.WithMany("Sessions")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
{
|
||||
b.Navigation("Characters");
|
||||
|
||||
b.Navigation("Sessions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace SystemRevivalServer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddVoidScavengersEntities : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "game_items",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false),
|
||||
Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Category = table.Column<int>(type: "int", nullable: false),
|
||||
CraftCost = table.Column<int>(type: "int", nullable: false),
|
||||
Description = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LootValue = table.Column<int>(type: "int", nullable: false),
|
||||
Stackable = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
IsEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: true),
|
||||
Damage = table.Column<int>(type: "int", nullable: false),
|
||||
FireRate = table.Column<float>(type: "float", nullable: false),
|
||||
ProjectileSpeed = table.Column<float>(type: "float", nullable: false),
|
||||
Range = table.Column<float>(type: "float", nullable: false),
|
||||
AmmoType = table.Column<int>(type: "int", nullable: false),
|
||||
PelletCount = table.Column<int>(type: "int", nullable: false),
|
||||
Spread = table.Column<float>(type: "float", nullable: false),
|
||||
ExplosionRadius = table.Column<float>(type: "float", nullable: false),
|
||||
HarvestMultiplier = table.Column<float>(type: "float", nullable: false),
|
||||
ScanRadius = table.Column<float>(type: "float", nullable: false),
|
||||
ScanCooldown = table.Column<float>(type: "float", nullable: false),
|
||||
ShieldHealth = table.Column<int>(type: "int", nullable: false),
|
||||
ShieldDuration = table.Column<float>(type: "float", nullable: false),
|
||||
HealAmount = table.Column<int>(type: "int", nullable: false),
|
||||
ShieldBoostDuration = table.Column<float>(type: "float", nullable: false),
|
||||
DamageReduction = table.Column<float>(type: "float", nullable: false),
|
||||
SpeedBoostDuration = table.Column<float>(type: "float", nullable: false),
|
||||
SpeedMultiplier = table.Column<float>(type: "float", nullable: false),
|
||||
HealthBonus = table.Column<int>(type: "int", nullable: false),
|
||||
SpeedPenalty = table.Column<float>(type: "float", nullable: false),
|
||||
DashDistance = table.Column<float>(type: "float", nullable: false),
|
||||
DashCooldown = table.Column<float>(type: "float", nullable: false),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP(6)"),
|
||||
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP(6)")
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_game_items", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "game_recipes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false),
|
||||
ResultItemId = table.Column<int>(type: "int", nullable: false),
|
||||
IsEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: true),
|
||||
ScrapCost = table.Column<int>(type: "int", nullable: false),
|
||||
EnergyCost = table.Column<int>(type: "int", nullable: false),
|
||||
RareCost = table.Column<int>(type: "int", nullable: false),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP(6)"),
|
||||
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP(6)")
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_game_recipes", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_game_recipes_game_items_ResultItemId",
|
||||
column: x => x.ResultItemId,
|
||||
principalTable: "game_items",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_game_items_Category",
|
||||
table: "game_items",
|
||||
column: "Category");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_game_items_IsEnabled",
|
||||
table: "game_items",
|
||||
column: "IsEnabled");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_game_recipes_IsEnabled",
|
||||
table: "game_recipes",
|
||||
column: "IsEnabled");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_game_recipes_ResultItemId",
|
||||
table: "game_recipes",
|
||||
column: "ResultItemId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "game_recipes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "game_items");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -210,6 +210,168 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("AmmoType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Category")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("CraftCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
b.Property<int>("Damage")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("DamageReduction")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("DashCooldown")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("DashDistance")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("varchar(256)");
|
||||
|
||||
b.Property<float>("ExplosionRadius")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("FireRate")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("HarvestMultiplier")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("HealAmount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("HealthBonus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("IsEnabled")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<int>("LootValue")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("varchar(64)");
|
||||
|
||||
b.Property<int>("PelletCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("ProjectileSpeed")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("Range")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("ScanCooldown")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("ScanRadius")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("ShieldBoostDuration")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("ShieldDuration")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("ShieldHealth")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("SpeedBoostDuration")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("SpeedMultiplier")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("SpeedPenalty")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("Spread")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<bool>("Stackable")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property<DateTime>("UpdatedAt"));
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Category");
|
||||
|
||||
b.HasIndex("IsEnabled");
|
||||
|
||||
b.ToTable("game_items", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
b.Property<int>("EnergyCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("IsEnabled")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<int>("RareCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ResultItemId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ScrapCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property<DateTime>("UpdatedAt"));
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("IsEnabled");
|
||||
|
||||
b.HasIndex("ResultItemId");
|
||||
|
||||
b.ToTable("game_recipes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
@@ -591,6 +753,17 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemTemplate");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.GameItem", "ResultItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ResultItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ResultItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Character", "Character")
|
||||
|
||||
Reference in New Issue
Block a user