Split remaining fields
This commit is contained in:
parent
dbfa9ccca6
commit
0042f9afce
@ -23,24 +23,34 @@ namespace GameDatabase.Entities
|
||||
public int NotesPosition { get; set; }
|
||||
public bool IsVoiceOn { get; set; }
|
||||
public bool IsSkipOn { get; set; }
|
||||
// TODO: Split into separate fields
|
||||
public string DifficultyPlayedArray { get; set; } = "[]";
|
||||
// TODO: Split into separate fields
|
||||
public uint DifficultyPlayedCourse { get; set; }
|
||||
public uint DifficultyPlayedStar { get; set; }
|
||||
public uint DifficultyPlayedSort { get; set; }
|
||||
|
||||
public string DifficultySettingArray { get; set; } = "[]";
|
||||
public uint DifficultySettingCourse { get; set; }
|
||||
public uint DifficultySettingStar { get; set; }
|
||||
public uint DifficultySettingSort { get; set; }
|
||||
public uint SelectedToneId { get; set; }
|
||||
public DateTime LastPlayDatetime { get; set; }
|
||||
public uint LastPlayMode { get; set; }
|
||||
public uint ColorBody { get; set; }
|
||||
public uint ColorFace { get; set; }
|
||||
public uint ColorLimb { get; set; }
|
||||
// TODO: Split into separate fields
|
||||
|
||||
public string CostumeData { get; set; } = "[]";
|
||||
public uint CurrentKigurumi { get; set; }
|
||||
public uint CurrentHead { get; set; }
|
||||
public uint CurrentBody { get; set; }
|
||||
public uint CurrentFace { get; set; }
|
||||
public uint CurrentPuchi { get; set; }
|
||||
public bool DisplayDan { get; set; }
|
||||
public bool DisplayAchievement { get; set; }
|
||||
public Difficulty AchievementDisplayDifficulty { get; set; }
|
||||
public int AiWinCount { get; set; }
|
||||
public List<Token> Tokens { get; set; } = new();
|
||||
public List<uint> UnlockedSongIdList { get; set; } = [];
|
||||
public List<uint> UnlockedSongIdList { get; set; } = [];
|
||||
public bool IsAdmin { get; set; }
|
||||
}
|
||||
}
|
554
GameDatabase/Migrations/20240317153533_SplitCurrentCostume.Designer.cs
generated
Normal file
554
GameDatabase/Migrations/20240317153533_SplitCurrentCostume.Designer.cs
generated
Normal file
@ -0,0 +1,554 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using GameDatabase.Context;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GameDatabase.Migrations
|
||||
{
|
||||
[DbContext(typeof(TaikoDbContext))]
|
||||
[Migration("20240317153533_SplitCurrentCostume")]
|
||||
partial class SplitCurrentCostume
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.3");
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.AiScoreDatum", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("SongId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("Difficulty")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsWin")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Baid", "SongId", "Difficulty");
|
||||
|
||||
b.ToTable("AiScoreData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.AiSectionScoreDatum", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("SongId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("Difficulty")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("SectionIndex")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Crown")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DrumrollCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("GoodCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsWin")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("MissCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("OkCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("Score")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Baid", "SongId", "Difficulty", "SectionIndex");
|
||||
|
||||
b.ToTable("AiSectionScoreData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.Card", b =>
|
||||
{
|
||||
b.Property<string>("AccessCode")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("AccessCode");
|
||||
|
||||
b.HasIndex("Baid");
|
||||
|
||||
b.ToTable("Card", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.Credential", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Salt")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Baid");
|
||||
|
||||
b.ToTable("Credential", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.DanScoreDatum", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DanId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("DanType")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(1);
|
||||
|
||||
b.Property<uint>("ArrivalSongCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ClearState")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(0u);
|
||||
|
||||
b.Property<uint>("ComboCountTotal")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("SoulGaugeTotal")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Baid", "DanId", "DanType");
|
||||
|
||||
b.ToTable("DanScoreData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.DanStageScoreDatum", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DanId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("DanType")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(1);
|
||||
|
||||
b.Property<uint>("SongNumber")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("BadCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ComboCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DrumrollCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("GoodCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("HighScore")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("OkCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("PlayScore")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("TotalHitCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Baid", "DanId", "DanType", "SongNumber");
|
||||
|
||||
b.ToTable("DanStageScoreData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.SongBestDatum", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("SongId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("Difficulty")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("BestCrown")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("BestRate")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("BestScore")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("BestScoreRank")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Baid", "SongId", "Difficulty");
|
||||
|
||||
b.ToTable("SongBestData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.SongPlayDatum", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ComboCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("Crown")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("Difficulty")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DrumrollCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("GoodCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("HitCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("MissCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("OkCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("PlayTime")
|
||||
.HasColumnType("datetime");
|
||||
|
||||
b.Property<uint>("Score")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ScoreRank")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ScoreRate")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("Skipped")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("SongId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("SongNumber")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Baid");
|
||||
|
||||
b.ToTable("SongPlayData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.Token", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Count")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Baid", "Id");
|
||||
|
||||
b.ToTable("Tokens");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.UserDatum", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("AchievementDisplayDifficulty")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("AiWinCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ColorBody")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ColorFace")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ColorLimb")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("CostumeData")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("CostumeFlgArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<uint>("CurrentBody")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("CurrentFace")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("CurrentHead")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("CurrentKigurumi")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("CurrentPuchi")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("DifficultyPlayedArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DifficultySettingArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("DisplayAchievement")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("DisplayDan")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("FavoriteSongsArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("GenericInfoFlgArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("IsAdmin")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsSkipOn")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsVoiceOn")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("LastPlayDatetime")
|
||||
.HasColumnType("datetime");
|
||||
|
||||
b.Property<uint>("LastPlayMode")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("MyDonName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<uint>("MyDonNameLanguage")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("NotesPosition")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<short>("OptionSetting")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("SelectedToneId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("TitleFlgArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<uint>("TitlePlateId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("ToneFlgArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UnlockedBody")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UnlockedFace")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UnlockedHead")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UnlockedKigurumi")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UnlockedPuchi")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UnlockedSongIdList")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Baid");
|
||||
|
||||
b.ToTable("UserData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.AiScoreDatum", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.UserDatum", "Ba")
|
||||
.WithMany()
|
||||
.HasForeignKey("Baid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ba");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.AiSectionScoreDatum", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.AiScoreDatum", "Parent")
|
||||
.WithMany("AiSectionScoreData")
|
||||
.HasForeignKey("Baid", "SongId", "Difficulty")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Parent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.Card", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.UserDatum", "Ba")
|
||||
.WithMany()
|
||||
.HasForeignKey("Baid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ba");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.Credential", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.UserDatum", "Ba")
|
||||
.WithMany()
|
||||
.HasForeignKey("Baid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ba");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.DanScoreDatum", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.UserDatum", "Ba")
|
||||
.WithMany()
|
||||
.HasForeignKey("Baid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ba");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.DanStageScoreDatum", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.DanScoreDatum", "Parent")
|
||||
.WithMany("DanStageScoreData")
|
||||
.HasForeignKey("Baid", "DanId", "DanType")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Parent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.SongBestDatum", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.UserDatum", "Ba")
|
||||
.WithMany()
|
||||
.HasForeignKey("Baid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ba");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.SongPlayDatum", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.UserDatum", "Ba")
|
||||
.WithMany()
|
||||
.HasForeignKey("Baid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ba");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.Token", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.UserDatum", "Datum")
|
||||
.WithMany("Tokens")
|
||||
.HasForeignKey("Baid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Datum");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.AiScoreDatum", b =>
|
||||
{
|
||||
b.Navigation("AiSectionScoreData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.DanScoreDatum", b =>
|
||||
{
|
||||
b.Navigation("DanStageScoreData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.UserDatum", b =>
|
||||
{
|
||||
b.Navigation("Tokens");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GameDatabase.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class SplitCurrentCostume : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<uint>(
|
||||
name: "CurrentBody",
|
||||
table: "UserData",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0u);
|
||||
|
||||
migrationBuilder.AddColumn<uint>(
|
||||
name: "CurrentFace",
|
||||
table: "UserData",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0u);
|
||||
|
||||
migrationBuilder.AddColumn<uint>(
|
||||
name: "CurrentHead",
|
||||
table: "UserData",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0u);
|
||||
|
||||
migrationBuilder.AddColumn<uint>(
|
||||
name: "CurrentKigurumi",
|
||||
table: "UserData",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0u);
|
||||
|
||||
migrationBuilder.AddColumn<uint>(
|
||||
name: "CurrentPuchi",
|
||||
table: "UserData",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0u);
|
||||
// Split CostumeData (json array) into the new fields
|
||||
migrationBuilder.Sql(@"
|
||||
UPDATE UserData
|
||||
SET CurrentKigurumi = json_extract(CostumeData, '$[0]'),
|
||||
CurrentHead = json_extract(CostumeData, '$[1]'),
|
||||
CurrentBody = json_extract(CostumeData, '$[2]'),
|
||||
CurrentFace = json_extract(CostumeData, '$[3]'),
|
||||
CurrentPuchi = json_extract(CostumeData, '$[4]')");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CurrentBody",
|
||||
table: "UserData");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CurrentFace",
|
||||
table: "UserData");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CurrentHead",
|
||||
table: "UserData");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CurrentKigurumi",
|
||||
table: "UserData");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CurrentPuchi",
|
||||
table: "UserData");
|
||||
}
|
||||
}
|
||||
}
|
572
GameDatabase/Migrations/20240317163817_SplitDifficultyArrays.Designer.cs
generated
Normal file
572
GameDatabase/Migrations/20240317163817_SplitDifficultyArrays.Designer.cs
generated
Normal file
@ -0,0 +1,572 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using GameDatabase.Context;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GameDatabase.Migrations
|
||||
{
|
||||
[DbContext(typeof(TaikoDbContext))]
|
||||
[Migration("20240317163817_SplitDifficultyArrays")]
|
||||
partial class SplitDifficultyArrays
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.3");
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.AiScoreDatum", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("SongId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("Difficulty")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsWin")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Baid", "SongId", "Difficulty");
|
||||
|
||||
b.ToTable("AiScoreData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.AiSectionScoreDatum", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("SongId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("Difficulty")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("SectionIndex")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Crown")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DrumrollCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("GoodCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsWin")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("MissCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("OkCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("Score")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Baid", "SongId", "Difficulty", "SectionIndex");
|
||||
|
||||
b.ToTable("AiSectionScoreData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.Card", b =>
|
||||
{
|
||||
b.Property<string>("AccessCode")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("AccessCode");
|
||||
|
||||
b.HasIndex("Baid");
|
||||
|
||||
b.ToTable("Card", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.Credential", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Salt")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Baid");
|
||||
|
||||
b.ToTable("Credential", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.DanScoreDatum", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DanId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("DanType")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(1);
|
||||
|
||||
b.Property<uint>("ArrivalSongCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ClearState")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(0u);
|
||||
|
||||
b.Property<uint>("ComboCountTotal")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("SoulGaugeTotal")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Baid", "DanId", "DanType");
|
||||
|
||||
b.ToTable("DanScoreData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.DanStageScoreDatum", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DanId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("DanType")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(1);
|
||||
|
||||
b.Property<uint>("SongNumber")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("BadCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ComboCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DrumrollCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("GoodCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("HighScore")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("OkCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("PlayScore")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("TotalHitCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Baid", "DanId", "DanType", "SongNumber");
|
||||
|
||||
b.ToTable("DanStageScoreData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.SongBestDatum", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("SongId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("Difficulty")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("BestCrown")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("BestRate")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("BestScore")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("BestScoreRank")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Baid", "SongId", "Difficulty");
|
||||
|
||||
b.ToTable("SongBestData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.SongPlayDatum", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ComboCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("Crown")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("Difficulty")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DrumrollCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("GoodCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("HitCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("MissCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("OkCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("PlayTime")
|
||||
.HasColumnType("datetime");
|
||||
|
||||
b.Property<uint>("Score")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ScoreRank")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ScoreRate")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("Skipped")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("SongId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("SongNumber")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Baid");
|
||||
|
||||
b.ToTable("SongPlayData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.Token", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Count")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Baid", "Id");
|
||||
|
||||
b.ToTable("Tokens");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.UserDatum", b =>
|
||||
{
|
||||
b.Property<uint>("Baid")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("AchievementDisplayDifficulty")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("AiWinCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ColorBody")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ColorFace")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("ColorLimb")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("CostumeData")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("CostumeFlgArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<uint>("CurrentBody")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("CurrentFace")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("CurrentHead")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("CurrentKigurumi")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("CurrentPuchi")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("DifficultyPlayedArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<uint>("DifficultyPlayedCourse")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DifficultyPlayedSort")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DifficultyPlayedStar")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("DifficultySettingArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<uint>("DifficultySettingCourse")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DifficultySettingSort")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DifficultySettingStar")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("DisplayAchievement")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("DisplayDan")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("FavoriteSongsArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("GenericInfoFlgArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("IsAdmin")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsSkipOn")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsVoiceOn")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("LastPlayDatetime")
|
||||
.HasColumnType("datetime");
|
||||
|
||||
b.Property<uint>("LastPlayMode")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("MyDonName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<uint>("MyDonNameLanguage")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("NotesPosition")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<short>("OptionSetting")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("SelectedToneId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("TitleFlgArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<uint>("TitlePlateId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("ToneFlgArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UnlockedBody")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UnlockedFace")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UnlockedHead")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UnlockedKigurumi")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UnlockedPuchi")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UnlockedSongIdList")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Baid");
|
||||
|
||||
b.ToTable("UserData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.AiScoreDatum", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.UserDatum", "Ba")
|
||||
.WithMany()
|
||||
.HasForeignKey("Baid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ba");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.AiSectionScoreDatum", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.AiScoreDatum", "Parent")
|
||||
.WithMany("AiSectionScoreData")
|
||||
.HasForeignKey("Baid", "SongId", "Difficulty")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Parent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.Card", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.UserDatum", "Ba")
|
||||
.WithMany()
|
||||
.HasForeignKey("Baid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ba");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.Credential", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.UserDatum", "Ba")
|
||||
.WithMany()
|
||||
.HasForeignKey("Baid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ba");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.DanScoreDatum", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.UserDatum", "Ba")
|
||||
.WithMany()
|
||||
.HasForeignKey("Baid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ba");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.DanStageScoreDatum", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.DanScoreDatum", "Parent")
|
||||
.WithMany("DanStageScoreData")
|
||||
.HasForeignKey("Baid", "DanId", "DanType")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Parent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.SongBestDatum", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.UserDatum", "Ba")
|
||||
.WithMany()
|
||||
.HasForeignKey("Baid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ba");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.SongPlayDatum", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.UserDatum", "Ba")
|
||||
.WithMany()
|
||||
.HasForeignKey("Baid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ba");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.Token", b =>
|
||||
{
|
||||
b.HasOne("GameDatabase.Entities.UserDatum", "Datum")
|
||||
.WithMany("Tokens")
|
||||
.HasForeignKey("Baid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Datum");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.AiScoreDatum", b =>
|
||||
{
|
||||
b.Navigation("AiSectionScoreData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.DanScoreDatum", b =>
|
||||
{
|
||||
b.Navigation("DanStageScoreData");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.UserDatum", b =>
|
||||
{
|
||||
b.Navigation("Tokens");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GameDatabase.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class SplitDifficultyArrays : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<uint>(
|
||||
name: "DifficultyPlayedCourse",
|
||||
table: "UserData",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0u);
|
||||
|
||||
migrationBuilder.AddColumn<uint>(
|
||||
name: "DifficultyPlayedSort",
|
||||
table: "UserData",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0u);
|
||||
|
||||
migrationBuilder.AddColumn<uint>(
|
||||
name: "DifficultyPlayedStar",
|
||||
table: "UserData",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0u);
|
||||
|
||||
migrationBuilder.AddColumn<uint>(
|
||||
name: "DifficultySettingCourse",
|
||||
table: "UserData",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0u);
|
||||
|
||||
migrationBuilder.AddColumn<uint>(
|
||||
name: "DifficultySettingSort",
|
||||
table: "UserData",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0u);
|
||||
|
||||
migrationBuilder.AddColumn<uint>(
|
||||
name: "DifficultySettingStar",
|
||||
table: "UserData",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0u);
|
||||
|
||||
// Extract from json arrays
|
||||
migrationBuilder.Sql(@"
|
||||
UPDATE UserData
|
||||
SET DifficultyPlayedCourse = json_extract(DifficultyPlayedArray, '$[0]'),
|
||||
DifficultyPlayedStar = json_extract(DifficultyPlayedArray, '$[1]'),
|
||||
DifficultyPlayedSort = json_extract(DifficultyPlayedArray, '$[2]') ,
|
||||
DifficultySettingCourse = json_extract(DifficultySettingArray, '$[0]'),
|
||||
DifficultySettingStar = json_extract(DifficultySettingArray, '$[1]'),
|
||||
DifficultySettingSort = json_extract(DifficultySettingArray, '$[2]');
|
||||
");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DifficultyPlayedCourse",
|
||||
table: "UserData");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DifficultyPlayedSort",
|
||||
table: "UserData");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DifficultyPlayedStar",
|
||||
table: "UserData");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DifficultySettingCourse",
|
||||
table: "UserData");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DifficultySettingSort",
|
||||
table: "UserData");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DifficultySettingStar",
|
||||
table: "UserData");
|
||||
}
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@ namespace TaikoLocalServer.Migrations
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.0-rc.2.23480.1");
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.3");
|
||||
|
||||
modelBuilder.Entity("GameDatabase.Entities.AiScoreDatum", b =>
|
||||
{
|
||||
@ -320,14 +320,47 @@ namespace TaikoLocalServer.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<uint>("CurrentBody")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("CurrentFace")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("CurrentHead")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("CurrentKigurumi")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("CurrentPuchi")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("DifficultyPlayedArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<uint>("DifficultyPlayedCourse")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DifficultyPlayedSort")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DifficultyPlayedStar")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("DifficultySettingArray")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<uint>("DifficultySettingCourse")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DifficultySettingSort")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<uint>("DifficultySettingStar")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("DisplayAchievement")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
|
@ -22,33 +22,9 @@ public static class JsonHelper
|
||||
return array;
|
||||
}
|
||||
|
||||
logger.LogWarning($"{fieldName} is null or length less than {length}!");
|
||||
logger.LogWarning("{FieldName} is null or length less than {Length}!", fieldName, length);
|
||||
array = new uint[length];
|
||||
|
||||
return array;
|
||||
}
|
||||
|
||||
public static List<uint> GetCostumeDataFromUserData(UserDatum userData, ILogger logger)
|
||||
{
|
||||
var costumeData = new List<uint> { 0, 0, 0, 0, 0 };
|
||||
try
|
||||
{
|
||||
// logger.LogInformation(userData.CostumeData);
|
||||
costumeData = JsonSerializer.Deserialize<List<uint>>(userData.CostumeData);
|
||||
}
|
||||
catch (JsonException e)
|
||||
{
|
||||
logger.LogError(e, "Parsing costume json data failed");
|
||||
}
|
||||
|
||||
if (costumeData != null && costumeData.Count >= 5)
|
||||
{
|
||||
return costumeData;
|
||||
}
|
||||
|
||||
logger.LogWarning("Costume data is null or count less than 5!");
|
||||
costumeData = new List<uint> { 0, 0, 0, 0, 0 };
|
||||
|
||||
return costumeData;
|
||||
}
|
||||
}
|
@ -25,11 +25,6 @@ public class UserSettingsController : BaseController<UserSettingsController>
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var difficultySettingArray = JsonHelper.GetUIntArrayFromJson(user.DifficultySettingArray, 3, Logger,
|
||||
nameof(user.DifficultySettingArray));
|
||||
|
||||
var costumeData = JsonHelper.GetCostumeDataFromUserData(user, Logger);
|
||||
|
||||
List<List<uint>> costumeUnlockData =
|
||||
[user.UnlockedKigurumi, user.UnlockedHead, user.UnlockedBody, user.UnlockedFace, user.UnlockedPuchi];
|
||||
|
||||
@ -49,9 +44,9 @@ public class UserSettingsController : BaseController<UserSettingsController>
|
||||
AchievementDisplayDifficulty = user.AchievementDisplayDifficulty,
|
||||
IsDisplayAchievement = user.DisplayAchievement,
|
||||
IsDisplayDanOnNamePlate = user.DisplayDan,
|
||||
DifficultySettingCourse = difficultySettingArray[0],
|
||||
DifficultySettingStar = difficultySettingArray[1],
|
||||
DifficultySettingSort = difficultySettingArray[2],
|
||||
DifficultySettingCourse = user.DifficultySettingCourse,
|
||||
DifficultySettingStar = user.DifficultySettingStar,
|
||||
DifficultySettingSort = user.DifficultySettingSort,
|
||||
IsVoiceOn = user.IsVoiceOn,
|
||||
IsSkipOn = user.IsSkipOn,
|
||||
NotesPosition = user.NotesPosition,
|
||||
@ -61,11 +56,11 @@ public class UserSettingsController : BaseController<UserSettingsController>
|
||||
MyDonNameLanguage = user.MyDonNameLanguage,
|
||||
Title = user.Title,
|
||||
TitlePlateId = user.TitlePlateId,
|
||||
Kigurumi = costumeData[0],
|
||||
Head = costumeData[1],
|
||||
Body = costumeData[2],
|
||||
Face = costumeData[3],
|
||||
Puchi = costumeData[4],
|
||||
Kigurumi = user.CurrentKigurumi,
|
||||
Head = user.CurrentHead,
|
||||
Body = user.CurrentBody,
|
||||
Face = user.CurrentFace,
|
||||
Puchi = user.CurrentPuchi,
|
||||
UnlockedKigurumi = costumeUnlockData[0],
|
||||
UnlockedHead = costumeUnlockData[1],
|
||||
UnlockedBody = costumeUnlockData[2],
|
||||
@ -90,15 +85,6 @@ public class UserSettingsController : BaseController<UserSettingsController>
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var costumes = new List<uint>
|
||||
{
|
||||
userSetting.Kigurumi,
|
||||
userSetting.Head,
|
||||
userSetting.Body,
|
||||
userSetting.Face,
|
||||
userSetting.Puchi,
|
||||
};
|
||||
|
||||
var difficultySettings = new List<uint>
|
||||
{
|
||||
userSetting.DifficultySettingCourse,
|
||||
@ -110,7 +96,9 @@ public class UserSettingsController : BaseController<UserSettingsController>
|
||||
user.IsVoiceOn = userSetting.IsVoiceOn;
|
||||
user.DisplayAchievement = userSetting.IsDisplayAchievement;
|
||||
user.DisplayDan = userSetting.IsDisplayDanOnNamePlate;
|
||||
user.DifficultySettingArray = JsonSerializer.Serialize(difficultySettings);
|
||||
user.DifficultySettingCourse = userSetting.DifficultySettingCourse;
|
||||
user.DifficultySettingStar = userSetting.DifficultySettingStar;
|
||||
user.DifficultySettingSort = userSetting.DifficultySettingSort;
|
||||
user.NotesPosition = userSetting.NotesPosition;
|
||||
user.SelectedToneId = userSetting.ToneId;
|
||||
user.AchievementDisplayDifficulty = userSetting.AchievementDisplayDifficulty;
|
||||
@ -122,7 +110,12 @@ public class UserSettingsController : BaseController<UserSettingsController>
|
||||
user.ColorBody = userSetting.BodyColor;
|
||||
user.ColorFace = userSetting.FaceColor;
|
||||
user.ColorLimb = userSetting.LimbColor;
|
||||
user.CostumeData = JsonSerializer.Serialize(costumes);
|
||||
// user.CostumeData = JsonSerializer.Serialize(costumes);
|
||||
user.CurrentKigurumi = userSetting.Kigurumi;
|
||||
user.CurrentHead = userSetting.Head;
|
||||
user.CurrentBody = userSetting.Body;
|
||||
user.CurrentFace = userSetting.Face;
|
||||
user.CurrentPuchi = userSetting.Puchi;
|
||||
|
||||
// If a locked tone is selected, unlock it
|
||||
var toneFlg = user.ToneFlgArray;
|
||||
|
@ -66,9 +66,9 @@ public class BaidQueryHandler(
|
||||
scoreRankCount[(int)scoreRank - 2] = scoreRankData.GetValueOrDefault(scoreRank, (uint)0);
|
||||
}
|
||||
}
|
||||
|
||||
var costumeData = JsonHelper.GetCostumeDataFromUserData(userData, logger);
|
||||
|
||||
|
||||
List<uint> costumeData = [userData.CurrentKigurumi, userData.CurrentHead, userData.CurrentBody, userData.CurrentFace, userData.CurrentPuchi];
|
||||
|
||||
List<List<uint>> costumeArrays =
|
||||
[userData.UnlockedKigurumi, userData.UnlockedHead, userData.UnlockedBody, userData.UnlockedFace, userData.UnlockedPuchi];
|
||||
|
||||
|
@ -238,7 +238,12 @@ public class UpdatePlayResultCommandHandler(TaikoDbContext context, ILogger<Upda
|
||||
playResultData.AryCurrentCostume.Costume4,
|
||||
playResultData.AryCurrentCostume.Costume5
|
||||
};
|
||||
user.CostumeData = JsonSerializer.Serialize(costumeData);
|
||||
//user.CostumeData = JsonSerializer.Serialize(costumeData);
|
||||
user.CurrentKigurumi = playResultData.AryCurrentCostume.Costume1;
|
||||
user.CurrentHead = playResultData.AryCurrentCostume.Costume2;
|
||||
user.CurrentBody = playResultData.AryCurrentCostume.Costume3;
|
||||
user.CurrentFace = playResultData.AryCurrentCostume.Costume4;
|
||||
user.CurrentPuchi = playResultData.AryCurrentCostume.Costume5;
|
||||
user.LastPlayDatetime = lastPlayDateTime;
|
||||
user.LastPlayMode = playResultData.PlayMode;
|
||||
|
||||
@ -260,7 +265,10 @@ public class UpdatePlayResultCommandHandler(TaikoDbContext context, ILogger<Upda
|
||||
playResultData.DifficultyPlayedStar,
|
||||
playResultData.DifficultyPlayedSort
|
||||
};
|
||||
user.DifficultyPlayedArray = JsonSerializer.Serialize(difficultyPlayedArray);
|
||||
//user.DifficultyPlayedArray = JsonSerializer.Serialize(difficultyPlayedArray);
|
||||
user.DifficultyPlayedCourse = playResultData.DifficultyPlayedCourse;
|
||||
user.DifficultyPlayedStar = playResultData.DifficultyPlayedStar;
|
||||
user.DifficultyPlayedSort = playResultData.DifficultyPlayedSort;
|
||||
|
||||
user.AiWinCount += playResultData.AryStageInfoes.Count(data => data.IsWin);
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ public class UserDataQueryHandler(TaikoDbContext context, IGameDataService gameD
|
||||
var defaultOptions = new byte[2];
|
||||
BinaryPrimitives.WriteInt16LittleEndian(defaultOptions, userData.OptionSetting);
|
||||
|
||||
var difficultySettingArray = JsonHelper.GetUIntArrayFromJson(userData.DifficultySettingArray, 3, logger, nameof(userData.DifficultySettingArray));
|
||||
uint[] difficultySettingArray = [userData.DifficultySettingCourse, userData.DifficultySettingStar, userData.DifficultySettingSort];
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (difficultySettingArray[i] >= 2)
|
||||
@ -72,9 +72,7 @@ public class UserDataQueryHandler(TaikoDbContext context, IGameDataService gameD
|
||||
difficultySettingArray[i] -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
var difficultyPlayedArray = JsonHelper.GetUIntArrayFromJson(userData.DifficultyPlayedArray, 3, logger, nameof(userData.DifficultyPlayedArray));
|
||||
|
||||
|
||||
var response = new CommonUserDataResponse
|
||||
{
|
||||
Result = 1,
|
||||
@ -91,9 +89,9 @@ public class UserDataQueryHandler(TaikoDbContext context, IGameDataService gameD
|
||||
DifficultySettingCourse = difficultySettingArray[0],
|
||||
DifficultySettingStar = difficultySettingArray[1],
|
||||
DifficultySettingSort = difficultySettingArray[2],
|
||||
DifficultyPlayedCourse = difficultyPlayedArray[0],
|
||||
DifficultyPlayedStar = difficultyPlayedArray[1],
|
||||
DifficultyPlayedSort = difficultyPlayedArray[2],
|
||||
DifficultyPlayedCourse = userData.DifficultyPlayedCourse,
|
||||
DifficultyPlayedStar = userData.DifficultyPlayedStar,
|
||||
DifficultyPlayedSort = userData.DifficultyPlayedSort,
|
||||
SongRecentCnt = (uint)recentSongs.Length,
|
||||
IsChallengecompe = false,
|
||||
// TODO: Other fields
|
||||
|
@ -3,46 +3,46 @@ namespace TaikoLocalServer.Models.Application;
|
||||
|
||||
public class CommonPlayResultData
|
||||
{
|
||||
public uint Baid { get; set; }
|
||||
public string ChassisId { get; set; } = string.Empty;
|
||||
public string ShopId { get; set; } = string.Empty;
|
||||
public string PlayDatetime { get; set; } = string.Empty;
|
||||
public bool IsRight { get; set; }
|
||||
public uint CardType { get; set; }
|
||||
public bool IsTwoPlayers { get; set; }
|
||||
public List<StageData> AryStageInfoes { get; set; } = [];
|
||||
public List<uint> ReleaseSongNoes { get; set; } = [];
|
||||
public List<uint> UraReleaseSongNoes { get; set; } = [];
|
||||
public List<uint> GetToneNoes { get; set; } = [];
|
||||
public List<uint> GetCostumeNo1s { get; set; } = [];
|
||||
public List<uint> GetCostumeNo2s { get; set; } = [];
|
||||
public List<uint> GetCostumeNo3s { get; set; } = [];
|
||||
public List<uint> GetCostumeNo4s { get; set; } = [];
|
||||
public List<uint> GetCostumeNo5s { get; set; } = [];
|
||||
public List<uint> GetTitleNoes { get; set; } = [];
|
||||
public List<uint> GetGenericInfoNoes { get; set; } = [];
|
||||
public CostumeData AryPlayCostume { get; set; } = new();
|
||||
public CostumeData AryCurrentCostume { get; set; } = new();
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public uint TitleplateId { get; set; }
|
||||
public uint PlayMode { get; set; }
|
||||
public uint CollaborationId { get; set; }
|
||||
public uint DanId { get; set; }
|
||||
public uint DanResult { get; set; }
|
||||
public uint SoulGaugeTotal { get; set; }
|
||||
public uint ComboCntTotal { get; set; }
|
||||
public bool IsNotRecordedDan { get; set; }
|
||||
public uint AreaCode { get; set; }
|
||||
public byte[] Reserved { get; set; } = [];
|
||||
public uint TournamentMode { get; set; }
|
||||
public string Accesstoken { get; set; } = string.Empty;
|
||||
public byte[] ContentInfo { get; set; } = [];
|
||||
public uint DifficultyPlayedCourse { get; set; }
|
||||
public uint DifficultyPlayedStar { get; set; }
|
||||
public uint DifficultyPlayedSort { get; set; }
|
||||
public uint IsRandomUsePlay { get; set; }
|
||||
public string InputMedian { get; set; } = string.Empty;
|
||||
public string InputVariance { get; set; } = string.Empty;
|
||||
public uint Baid { get; set; }
|
||||
public string ChassisId { get; set; } = string.Empty;
|
||||
public string ShopId { get; set; } = string.Empty;
|
||||
public string PlayDatetime { get; set; } = string.Empty;
|
||||
public bool IsRight { get; set; }
|
||||
public uint CardType { get; set; }
|
||||
public bool IsTwoPlayers { get; set; }
|
||||
public List<StageData> AryStageInfoes { get; set; } = [];
|
||||
public List<uint> ReleaseSongNoes { get; set; } = [];
|
||||
public List<uint> UraReleaseSongNoes { get; set; } = [];
|
||||
public List<uint> GetToneNoes { get; set; } = [];
|
||||
public List<uint> GetCostumeNo1s { get; set; } = [];
|
||||
public List<uint> GetCostumeNo2s { get; set; } = [];
|
||||
public List<uint> GetCostumeNo3s { get; set; } = [];
|
||||
public List<uint> GetCostumeNo4s { get; set; } = [];
|
||||
public List<uint> GetCostumeNo5s { get; set; } = [];
|
||||
public List<uint> GetTitleNoes { get; set; } = [];
|
||||
public List<uint> GetGenericInfoNoes { get; set; } = [];
|
||||
public CostumeData AryPlayCostume { get; set; } = new();
|
||||
public CostumeData AryCurrentCostume { get; set; } = new();
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public uint TitleplateId { get; set; }
|
||||
public uint PlayMode { get; set; }
|
||||
public uint CollaborationId { get; set; }
|
||||
public uint DanId { get; set; }
|
||||
public uint DanResult { get; set; }
|
||||
public uint SoulGaugeTotal { get; set; }
|
||||
public uint ComboCntTotal { get; set; }
|
||||
public bool IsNotRecordedDan { get; set; }
|
||||
public uint AreaCode { get; set; }
|
||||
public byte[] Reserved { get; set; } = [];
|
||||
public uint TournamentMode { get; set; }
|
||||
public string Accesstoken { get; set; } = string.Empty;
|
||||
public byte[] ContentInfo { get; set; } = [];
|
||||
public uint DifficultyPlayedCourse { get; set; }
|
||||
public uint DifficultyPlayedStar { get; set; }
|
||||
public uint DifficultyPlayedSort { get; set; }
|
||||
public uint IsRandomUsePlay { get; set; }
|
||||
public string InputMedian { get; set; } = string.Empty;
|
||||
public string InputVariance { get; set; } = string.Empty;
|
||||
|
||||
public class StageData
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user