Testing more garbage encryption

This commit is contained in:
gamer147
2024-09-07 22:14:24 -04:00
parent f7657c2ec4
commit 7e4bce9ac5
32 changed files with 783 additions and 51 deletions

View File

@@ -0,0 +1,171 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SVSim.Database;
#nullable disable
namespace SVSim.Database.Migrations
{
[DbContext(typeof(SVSimDbContext))]
[Migration("20240907191709_Initial")]
partial class Initial
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.8");
modelBuilder.Entity("DCGEngine.Database.Models.CardEntry", b =>
{
b.Property<long>("Id")
.HasColumnType("INTEGER");
b.Property<int?>("Attack")
.HasColumnType("INTEGER");
b.Property<DateTime?>("DateCreated")
.HasColumnType("TEXT");
b.Property<DateTime?>("DateUpdated")
.HasColumnType("TEXT");
b.Property<int?>("Defense")
.HasColumnType("INTEGER");
b.Property<string>("Discriminator")
.IsRequired()
.HasMaxLength(21)
.HasColumnType("TEXT");
b.Property<string>("InternalName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int?>("PrimaryResourceCost")
.HasColumnType("INTEGER");
b.Property<long?>("ShadowverseDeckEntryId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ShadowverseDeckEntryId");
b.ToTable("CardEntry");
b.HasDiscriminator().HasValue("CardEntry");
b.UseTphMappingStrategy();
});
modelBuilder.Entity("SVSim.Database.Models.ShadowverseDeckEntry", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime?>("DateCreated")
.HasColumnType("TEXT");
b.Property<DateTime?>("DateUpdated")
.HasColumnType("TEXT");
b.Property<string>("InternalName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("ShadowverseDeckEntry");
});
modelBuilder.Entity("SVSim.Database.Models.SocialAccountConnection", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<ulong>("AccountId")
.HasColumnType("INTEGER");
b.Property<int>("AccountType")
.HasColumnType("INTEGER");
b.Property<DateTime?>("DateCreated")
.HasColumnType("TEXT");
b.Property<DateTime?>("DateUpdated")
.HasColumnType("TEXT");
b.Property<ulong>("ViewerId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ViewerId");
b.ToTable("SocialAccountConnection");
});
modelBuilder.Entity("SVSim.Database.Models.Viewer", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime?>("DateCreated")
.HasColumnType("TEXT");
b.Property<DateTime?>("DateUpdated")
.HasColumnType("TEXT");
b.Property<string>("DisplayName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<ulong>("ShortUdid")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("Viewer");
});
modelBuilder.Entity("SVSim.Database.Models.ShadowverseCardEntry", b =>
{
b.HasBaseType("DCGEngine.Database.Models.CardEntry");
b.HasDiscriminator().HasValue("ShadowverseCardEntry");
});
modelBuilder.Entity("DCGEngine.Database.Models.CardEntry", b =>
{
b.HasOne("SVSim.Database.Models.ShadowverseDeckEntry", null)
.WithMany("Cards")
.HasForeignKey("ShadowverseDeckEntryId");
});
modelBuilder.Entity("SVSim.Database.Models.SocialAccountConnection", b =>
{
b.HasOne("SVSim.Database.Models.Viewer", "Viewer")
.WithMany()
.HasForeignKey("ViewerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Viewer");
});
modelBuilder.Entity("SVSim.Database.Models.ShadowverseDeckEntry", b =>
{
b.Navigation("Cards");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,118 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SVSim.Database.Migrations
{
/// <inheritdoc />
public partial class Initial : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ShadowverseDeckEntry",
columns: table => new
{
Id = table.Column<long>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
DateCreated = table.Column<DateTime>(type: "TEXT", nullable: true),
DateUpdated = table.Column<DateTime>(type: "TEXT", nullable: true),
InternalName = table.Column<string>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ShadowverseDeckEntry", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Viewer",
columns: table => new
{
Id = table.Column<ulong>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
DisplayName = table.Column<string>(type: "TEXT", nullable: false),
ShortUdid = table.Column<ulong>(type: "INTEGER", nullable: false),
DateCreated = table.Column<DateTime>(type: "TEXT", nullable: true),
DateUpdated = table.Column<DateTime>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Viewer", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CardEntry",
columns: table => new
{
Id = table.Column<long>(type: "INTEGER", nullable: false),
InternalName = table.Column<string>(type: "TEXT", nullable: false),
Attack = table.Column<int>(type: "INTEGER", nullable: true),
Defense = table.Column<int>(type: "INTEGER", nullable: true),
PrimaryResourceCost = table.Column<int>(type: "INTEGER", nullable: true),
Discriminator = table.Column<string>(type: "TEXT", maxLength: 21, nullable: false),
ShadowverseDeckEntryId = table.Column<long>(type: "INTEGER", nullable: true),
DateCreated = table.Column<DateTime>(type: "TEXT", nullable: true),
DateUpdated = table.Column<DateTime>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_CardEntry", x => x.Id);
table.ForeignKey(
name: "FK_CardEntry_ShadowverseDeckEntry_ShadowverseDeckEntryId",
column: x => x.ShadowverseDeckEntryId,
principalTable: "ShadowverseDeckEntry",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "SocialAccountConnection",
columns: table => new
{
Id = table.Column<Guid>(type: "TEXT", nullable: false),
AccountType = table.Column<int>(type: "INTEGER", nullable: false),
AccountId = table.Column<ulong>(type: "INTEGER", nullable: false),
ViewerId = table.Column<ulong>(type: "INTEGER", nullable: false),
DateCreated = table.Column<DateTime>(type: "TEXT", nullable: true),
DateUpdated = table.Column<DateTime>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_SocialAccountConnection", x => x.Id);
table.ForeignKey(
name: "FK_SocialAccountConnection_Viewer_ViewerId",
column: x => x.ViewerId,
principalTable: "Viewer",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_CardEntry_ShadowverseDeckEntryId",
table: "CardEntry",
column: "ShadowverseDeckEntryId");
migrationBuilder.CreateIndex(
name: "IX_SocialAccountConnection_ViewerId",
table: "SocialAccountConnection",
column: "ViewerId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CardEntry");
migrationBuilder.DropTable(
name: "SocialAccountConnection");
migrationBuilder.DropTable(
name: "ShadowverseDeckEntry");
migrationBuilder.DropTable(
name: "Viewer");
}
}
}

View File

@@ -0,0 +1,168 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SVSim.Database;
#nullable disable
namespace SVSim.Database.Migrations
{
[DbContext(typeof(SVSimDbContext))]
partial class SVSimDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.8");
modelBuilder.Entity("DCGEngine.Database.Models.CardEntry", b =>
{
b.Property<long>("Id")
.HasColumnType("INTEGER");
b.Property<int?>("Attack")
.HasColumnType("INTEGER");
b.Property<DateTime?>("DateCreated")
.HasColumnType("TEXT");
b.Property<DateTime?>("DateUpdated")
.HasColumnType("TEXT");
b.Property<int?>("Defense")
.HasColumnType("INTEGER");
b.Property<string>("Discriminator")
.IsRequired()
.HasMaxLength(21)
.HasColumnType("TEXT");
b.Property<string>("InternalName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int?>("PrimaryResourceCost")
.HasColumnType("INTEGER");
b.Property<long?>("ShadowverseDeckEntryId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ShadowverseDeckEntryId");
b.ToTable("CardEntry");
b.HasDiscriminator().HasValue("CardEntry");
b.UseTphMappingStrategy();
});
modelBuilder.Entity("SVSim.Database.Models.ShadowverseDeckEntry", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime?>("DateCreated")
.HasColumnType("TEXT");
b.Property<DateTime?>("DateUpdated")
.HasColumnType("TEXT");
b.Property<string>("InternalName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("ShadowverseDeckEntry");
});
modelBuilder.Entity("SVSim.Database.Models.SocialAccountConnection", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<ulong>("AccountId")
.HasColumnType("INTEGER");
b.Property<int>("AccountType")
.HasColumnType("INTEGER");
b.Property<DateTime?>("DateCreated")
.HasColumnType("TEXT");
b.Property<DateTime?>("DateUpdated")
.HasColumnType("TEXT");
b.Property<ulong>("ViewerId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ViewerId");
b.ToTable("SocialAccountConnection");
});
modelBuilder.Entity("SVSim.Database.Models.Viewer", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime?>("DateCreated")
.HasColumnType("TEXT");
b.Property<DateTime?>("DateUpdated")
.HasColumnType("TEXT");
b.Property<string>("DisplayName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<ulong>("ShortUdid")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("Viewer");
});
modelBuilder.Entity("SVSim.Database.Models.ShadowverseCardEntry", b =>
{
b.HasBaseType("DCGEngine.Database.Models.CardEntry");
b.HasDiscriminator().HasValue("ShadowverseCardEntry");
});
modelBuilder.Entity("DCGEngine.Database.Models.CardEntry", b =>
{
b.HasOne("SVSim.Database.Models.ShadowverseDeckEntry", null)
.WithMany("Cards")
.HasForeignKey("ShadowverseDeckEntryId");
});
modelBuilder.Entity("SVSim.Database.Models.SocialAccountConnection", b =>
{
b.HasOne("SVSim.Database.Models.Viewer", "Viewer")
.WithMany()
.HasForeignKey("ViewerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Viewer");
});
modelBuilder.Entity("SVSim.Database.Models.ShadowverseDeckEntry", b =>
{
b.Navigation("Cards");
});
#pragma warning restore 612, 618
}
}
}