Now supports saving card groups, this is probably the ugliest code ive ever written but anything to avoid 20 cardgroup properties. we should see if there's a better way, it could probably be a lot cleaner

This commit is contained in:
2021-10-29 00:46:00 -04:00
parent ee4304d729
commit 3051b63e44
14 changed files with 393 additions and 32 deletions

View File

@@ -0,0 +1,97 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using TOOHUCardAPI.Data;
namespace TOOHUCardAPI.Migrations
{
[DbContext(typeof(AppDbContext))]
[Migration("20211029043842_fix groupkey, they send full string")]
partial class fixgroupkeytheysendfullstring
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "5.0.11");
modelBuilder.Entity("TOOHUCardAPI.Data.Models.EncodedCardGroup", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("EncodedString")
.HasColumnType("TEXT");
b.Property<string>("GroupKey")
.HasColumnType("TEXT");
b.Property<string>("UserSteamId")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("UserSteamId");
b.ToTable("EncodedCardGroup");
});
modelBuilder.Entity("TOOHUCardAPI.Data.Models.User", b =>
{
b.Property<string>("SteamId")
.HasColumnType("TEXT");
b.Property<bool>("Ban")
.HasColumnType("INTEGER");
b.Property<DateTime>("EndTime")
.HasColumnType("TEXT");
b.Property<DateTime>("KeySaveDate")
.HasColumnType("TEXT");
b.Property<int>("KeyTotal")
.HasColumnType("INTEGER");
b.Property<string>("LevelList")
.HasColumnType("TEXT");
b.Property<int>("MaxTeamWave")
.HasColumnType("INTEGER");
b.Property<int>("MaxWave")
.HasColumnType("INTEGER");
b.Property<int>("PetLevel")
.HasColumnType("INTEGER");
b.Property<int>("Point")
.HasColumnType("INTEGER");
b.Property<bool>("Vip")
.HasColumnType("INTEGER");
b.HasKey("SteamId");
b.ToTable("Users");
});
modelBuilder.Entity("TOOHUCardAPI.Data.Models.EncodedCardGroup", b =>
{
b.HasOne("TOOHUCardAPI.Data.Models.User", null)
.WithMany("EncodedCardGroups")
.HasForeignKey("UserSteamId");
});
modelBuilder.Entity("TOOHUCardAPI.Data.Models.User", b =>
{
b.Navigation("EncodedCardGroups");
});
#pragma warning restore 612, 618
}
}
}