Compare commits

..
1 Commits
Author SHA1 Message Date
asesidaa 82e0ecd9c3 Update card_detail.md 2024-01-16 23:42:54 +08:00
15 changed files with 51 additions and 922 deletions
-6
View File
@@ -23,12 +23,6 @@ public interface ICardDbContext
public DbSet<OnlineMatch> OnlineMatches { get; set; }
public DbSet<OnlineMatchEntry> OnlineMatchEntries { get; set; }
public DbSet<Unlock> Unlocks { get; set; }
public DbSet<Item> Items { get; set; }
public DbSet<Coin> Coins { get; set; }
public Task<int> SaveChangesAsync(CancellationToken cancellationToken);
-14
View File
@@ -1,14 +0,0 @@
using System.Text.Json.Serialization;
using Domain.Enums;
namespace Domain.Config;
public class LockedItemConfig
{
public const string LOCKED_SECTION = "Locked";
public int ItemId { get; set; }
[JsonConverter(typeof(JsonStringEnumConverter))]
public UnlockType ItemType { get; set; }
}
-4
View File
@@ -19,8 +19,4 @@ public partial class CardMain
public string? Created { get; set; } = string.Empty;
public string? Modified { get; set; } = string.Empty;
public List<Item>? Items { get; set; }
public Coin? Coin { get; set; }
public List<Unlock>? Unlocks { get; set; }
}
-12
View File
@@ -1,12 +0,0 @@
namespace Domain.Entities;
public class Coin
{
public long CardId { get; set; }
public int Count { get; set; }
public DateTime CreateTime { get; set; }
public DateTime UpdateTime { get; set; }
}
-13
View File
@@ -1,13 +0,0 @@
namespace Domain.Entities;
public class Item
{
public long CardId { get; set; }
public int ItemId { get; set; }
public int Count { get; set; }
public DateTime CreateTime { get; set; }
public DateTime UpdateTime { get; set; }
}
-13
View File
@@ -1,13 +0,0 @@
using Domain.Enums;
namespace Domain.Entities;
public class Unlock
{
public long CardId { get; set; }
public int UnlockItemId { get; set; }
public UnlockType UnlockType { get; set; }
public bool IsNew { get; set; }
public DateTime CreateTime { get; set; }
public DateTime UpdateTime { get; set; }
}
-11
View File
@@ -1,11 +0,0 @@
namespace Domain.Enums;
public enum UnlockType
{
Avatar,
Music,
Navigator,
Title,
Skin,
SoundEffect
}
@@ -1,584 +0,0 @@
// <auto-generated />
using System;
using Infrastructure.Persistence;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Infrastructure.Migrations
{
[DbContext(typeof(CardDbContext))]
[Migration("20240329093329_AddUnlocks")]
partial class AddUnlocks
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
modelBuilder.Entity("Domain.Entities.CardBdatum", b =>
{
b.Property<long>("CardId")
.HasColumnType("INTEGER")
.HasColumnName("card_id");
b.Property<string>("Bdata")
.HasColumnType("TEXT")
.HasColumnName("bdata");
b.Property<long>("BdataSize")
.HasColumnType("INTEGER")
.HasColumnName("bdata_size");
b.HasKey("CardId");
b.ToTable("card_bdata", (string)null);
});
modelBuilder.Entity("Domain.Entities.CardDetail", b =>
{
b.Property<long>("CardId")
.HasColumnType("INTEGER")
.HasColumnName("card_id");
b.Property<long>("Pcol1")
.HasColumnType("INTEGER")
.HasColumnName("pcol1");
b.Property<long>("Pcol2")
.HasColumnType("INTEGER")
.HasColumnName("pcol2");
b.Property<long>("Pcol3")
.HasColumnType("INTEGER")
.HasColumnName("pcol3");
b.Property<long>("Fcol1")
.HasColumnType("INTEGER")
.HasColumnName("fcol1");
b.Property<long>("Fcol2")
.HasColumnType("INTEGER")
.HasColumnName("fcol2");
b.Property<long>("Fcol3")
.HasColumnType("INTEGER")
.HasColumnName("fcol3");
b.Property<string>("LastPlayTenpoId")
.HasColumnType("TEXT")
.HasColumnName("last_play_tenpo_id");
b.Property<long?>("LastPlayTime")
.HasColumnType("INTEGER")
.HasColumnName("last_play_time");
b.Property<long>("ScoreBi1")
.HasColumnType("INTEGER")
.HasColumnName("score_bi1");
b.Property<long>("ScoreI1")
.HasColumnType("INTEGER")
.HasColumnName("score_i1");
b.Property<long>("ScoreUi1")
.HasColumnType("INTEGER")
.HasColumnName("score_ui1");
b.Property<long>("ScoreUi2")
.HasColumnType("INTEGER")
.HasColumnName("score_ui2");
b.Property<long>("ScoreUi3")
.HasColumnType("INTEGER")
.HasColumnName("score_ui3");
b.Property<long>("ScoreUi4")
.HasColumnType("INTEGER")
.HasColumnName("score_ui4");
b.Property<long>("ScoreUi5")
.HasColumnType("INTEGER")
.HasColumnName("score_ui5");
b.Property<long>("ScoreUi6")
.HasColumnType("INTEGER")
.HasColumnName("score_ui6");
b.HasKey("CardId", "Pcol1", "Pcol2", "Pcol3");
b.ToTable("card_detail", (string)null);
});
modelBuilder.Entity("Domain.Entities.CardMain", b =>
{
b.Property<long>("CardId")
.HasColumnType("INTEGER")
.HasColumnName("card_id");
b.Property<string>("AchieveStatus")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("achieve_status");
b.Property<string>("Created")
.HasColumnType("TEXT")
.HasColumnName("created");
b.Property<long>("Fcol1")
.HasColumnType("INTEGER")
.HasColumnName("fcol1");
b.Property<long>("Fcol2")
.HasColumnType("INTEGER")
.HasColumnName("fcol2");
b.Property<long>("Fcol3")
.HasColumnType("INTEGER")
.HasColumnName("fcol3");
b.Property<string>("Modified")
.HasColumnType("TEXT")
.HasColumnName("modified");
b.Property<string>("PlayerName")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("player_name");
b.Property<long>("ScoreI1")
.HasColumnType("INTEGER")
.HasColumnName("score_i1");
b.HasKey("CardId");
b.ToTable("card_main", (string)null);
});
modelBuilder.Entity("Domain.Entities.CardPlayCount", b =>
{
b.Property<long>("CardId")
.HasColumnType("INTEGER")
.HasColumnName("card_id");
b.Property<long>("LastPlayedTime")
.HasColumnType("INTEGER")
.HasColumnName("last_played_time");
b.Property<long>("PlayCount")
.HasColumnType("INTEGER")
.HasColumnName("play_count");
b.HasKey("CardId");
b.ToTable("CardPlayCount", (string)null);
});
modelBuilder.Entity("Domain.Entities.Coin", b =>
{
b.Property<long>("CardId")
.HasColumnType("INTEGER");
b.Property<int>("Count")
.HasColumnType("INTEGER");
b.Property<DateTime>("CreateTime")
.HasColumnType("TEXT");
b.Property<DateTime>("UpdateTime")
.HasColumnType("TEXT");
b.HasKey("CardId");
b.ToTable("Coins");
});
modelBuilder.Entity("Domain.Entities.GlobalScoreRank", b =>
{
b.Property<long>("CardId")
.HasColumnType("INTEGER");
b.Property<string>("Area")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("AreaId")
.HasColumnType("INTEGER");
b.Property<int>("AvatarId")
.HasColumnType("INTEGER");
b.Property<long>("Fcol1")
.HasColumnType("INTEGER");
b.Property<int>("LastPlayTenpoId")
.HasColumnType("INTEGER");
b.Property<string>("PlayerName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Pref")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("PrefId")
.HasColumnType("INTEGER");
b.Property<long>("Rank")
.HasColumnType("INTEGER");
b.Property<string>("TenpoName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("TEXT");
b.Property<long>("TitleId")
.HasColumnType("INTEGER");
b.Property<long>("TotalScore")
.HasColumnType("INTEGER");
b.HasKey("CardId");
b.ToTable("GlobalScoreRank", (string)null);
});
modelBuilder.Entity("Domain.Entities.Item", b =>
{
b.Property<int>("ItemId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<long>("CardId")
.HasColumnType("INTEGER");
b.Property<int>("Count")
.HasColumnType("INTEGER");
b.Property<DateTime>("CreateTime")
.HasColumnType("TEXT");
b.Property<DateTime>("UpdateTime")
.HasColumnType("TEXT");
b.HasKey("ItemId");
b.HasIndex("CardId");
b.ToTable("Items");
});
modelBuilder.Entity("Domain.Entities.MonthlyScoreRank", b =>
{
b.Property<long>("CardId")
.HasColumnType("INTEGER");
b.Property<string>("Area")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("AreaId")
.HasColumnType("INTEGER");
b.Property<int>("AvatarId")
.HasColumnType("INTEGER");
b.Property<long>("Fcol1")
.HasColumnType("INTEGER");
b.Property<int>("LastPlayTenpoId")
.HasColumnType("INTEGER");
b.Property<string>("PlayerName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Pref")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("PrefId")
.HasColumnType("INTEGER");
b.Property<long>("Rank")
.HasColumnType("INTEGER");
b.Property<string>("TenpoName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("TEXT");
b.Property<long>("TitleId")
.HasColumnType("INTEGER");
b.Property<long>("TotalScore")
.HasColumnType("INTEGER");
b.HasKey("CardId");
b.ToTable("MonthlyScoreRank", (string)null);
});
modelBuilder.Entity("Domain.Entities.OnlineMatch", b =>
{
b.Property<long>("MatchId")
.HasColumnType("INTEGER");
b.Property<Guid>("Guid")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.Property<bool>("IsOpen")
.HasColumnType("INTEGER");
b.HasKey("MatchId");
b.ToTable("OnlineMatches");
});
modelBuilder.Entity("Domain.Entities.OnlineMatchEntry", b =>
{
b.Property<long>("MatchId")
.HasColumnType("INTEGER");
b.Property<long>("EntryId")
.HasColumnType("INTEGER");
b.Property<long>("AvatarId")
.HasColumnType("INTEGER");
b.Property<long>("CardId")
.HasColumnType("INTEGER");
b.Property<long>("ClassId")
.HasColumnType("INTEGER");
b.Property<long>("EventId")
.HasColumnType("INTEGER");
b.Property<long>("GroupId")
.HasColumnType("INTEGER");
b.Property<long>("MachineId")
.HasColumnType("INTEGER");
b.Property<long>("MatchRemainingTime")
.HasColumnType("INTEGER");
b.Property<long>("MatchTimeout")
.HasColumnType("INTEGER");
b.Property<long>("MatchWaitTime")
.HasColumnType("INTEGER");
b.Property<long>("MessageId")
.HasColumnType("INTEGER");
b.Property<string>("PlayerName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Pref")
.IsRequired()
.HasColumnType("TEXT");
b.Property<long>("PrefId")
.HasColumnType("INTEGER");
b.Property<DateTime>("StartTime")
.HasColumnType("TEXT");
b.Property<long>("Status")
.HasColumnType("INTEGER");
b.Property<long>("TenpoId")
.HasColumnType("INTEGER");
b.Property<string>("TenpoName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<long>("TitleId")
.HasColumnType("INTEGER");
b.HasKey("MatchId", "EntryId");
b.ToTable("OnlineMatchEntries");
});
modelBuilder.Entity("Domain.Entities.PlayNumRank", b =>
{
b.Property<int>("MusicId")
.HasColumnType("INTEGER");
b.Property<string>("Artist")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("PlayCount")
.HasColumnType("INTEGER");
b.Property<int>("PrevRank")
.HasColumnType("INTEGER");
b.Property<int>("PrevRank2")
.HasColumnType("INTEGER");
b.Property<int>("Rank")
.HasColumnType("INTEGER");
b.Property<int>("Rank2")
.HasColumnType("INTEGER");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("MusicId");
b.ToTable("PlayNumRank", (string)null);
});
modelBuilder.Entity("Domain.Entities.ShopScoreRank", b =>
{
b.Property<long>("CardId")
.HasColumnType("INTEGER");
b.Property<string>("Area")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("AreaId")
.HasColumnType("INTEGER");
b.Property<int>("AvatarId")
.HasColumnType("INTEGER");
b.Property<long>("Fcol1")
.HasColumnType("INTEGER");
b.Property<int>("LastPlayTenpoId")
.HasColumnType("INTEGER");
b.Property<string>("PlayerName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Pref")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("PrefId")
.HasColumnType("INTEGER");
b.Property<long>("Rank")
.HasColumnType("INTEGER");
b.Property<string>("TenpoName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("TEXT");
b.Property<long>("TitleId")
.HasColumnType("INTEGER");
b.Property<long>("TotalScore")
.HasColumnType("INTEGER");
b.HasKey("CardId");
b.ToTable("ShopScoreRank", (string)null);
});
modelBuilder.Entity("Domain.Entities.Unlock", b =>
{
b.Property<long>("CardId")
.HasColumnType("INTEGER");
b.Property<int>("UnlockItemId")
.HasColumnType("INTEGER");
b.Property<int>("UnlockType")
.HasColumnType("INTEGER");
b.Property<DateTime>("CreateTime")
.HasColumnType("TEXT");
b.Property<bool>("IsNew")
.HasColumnType("INTEGER");
b.Property<DateTime>("UpdateTime")
.HasColumnType("TEXT");
b.HasKey("CardId", "UnlockItemId", "UnlockType");
b.ToTable("Unlocks");
});
modelBuilder.Entity("Domain.Entities.Coin", b =>
{
b.HasOne("Domain.Entities.CardMain", null)
.WithOne("Coin")
.HasForeignKey("Domain.Entities.Coin", "CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Domain.Entities.Item", b =>
{
b.HasOne("Domain.Entities.CardMain", null)
.WithMany("Items")
.HasForeignKey("CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Domain.Entities.OnlineMatchEntry", b =>
{
b.HasOne("Domain.Entities.OnlineMatch", null)
.WithMany("Entries")
.HasForeignKey("MatchId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Domain.Entities.Unlock", b =>
{
b.HasOne("Domain.Entities.CardMain", null)
.WithMany("Unlocks")
.HasForeignKey("CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Domain.Entities.CardMain", b =>
{
b.Navigation("Coin");
b.Navigation("Items");
b.Navigation("Unlocks");
});
modelBuilder.Entity("Domain.Entities.OnlineMatch", b =>
{
b.Navigation("Entries");
});
#pragma warning restore 612, 618
}
}
}
@@ -1,115 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Infrastructure.Migrations
{
/// <inheritdoc />
public partial class AddUnlocks : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<long>(
name: "MatchId",
table: "OnlineMatches",
type: "INTEGER",
nullable: false,
oldClrType: typeof(long),
oldType: "INTEGER")
.OldAnnotation("Sqlite:Autoincrement", true);
migrationBuilder.CreateTable(
name: "Coins",
columns: table => new
{
CardId = table.Column<long>(type: "INTEGER", nullable: false),
Count = table.Column<int>(type: "INTEGER", nullable: false),
CreateTime = table.Column<DateTime>(type: "TEXT", nullable: false),
UpdateTime = table.Column<DateTime>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Coins", x => x.CardId);
table.ForeignKey(
name: "FK_Coins_card_main_CardId",
column: x => x.CardId,
principalTable: "card_main",
principalColumn: "card_id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Items",
columns: table => new
{
ItemId = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
CardId = table.Column<long>(type: "INTEGER", nullable: false),
Count = table.Column<int>(type: "INTEGER", nullable: false),
CreateTime = table.Column<DateTime>(type: "TEXT", nullable: false),
UpdateTime = table.Column<DateTime>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Items", x => x.ItemId);
table.ForeignKey(
name: "FK_Items_card_main_CardId",
column: x => x.CardId,
principalTable: "card_main",
principalColumn: "card_id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Unlocks",
columns: table => new
{
CardId = table.Column<long>(type: "INTEGER", nullable: false),
UnlockItemId = table.Column<int>(type: "INTEGER", nullable: false),
UnlockType = table.Column<int>(type: "INTEGER", nullable: false),
IsNew = table.Column<bool>(type: "INTEGER", nullable: false),
CreateTime = table.Column<DateTime>(type: "TEXT", nullable: false),
UpdateTime = table.Column<DateTime>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Unlocks", x => new { x.CardId, x.UnlockItemId, x.UnlockType });
table.ForeignKey(
name: "FK_Unlocks_card_main_CardId",
column: x => x.CardId,
principalTable: "card_main",
principalColumn: "card_id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Items_CardId",
table: "Items",
column: "CardId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Coins");
migrationBuilder.DropTable(
name: "Items");
migrationBuilder.DropTable(
name: "Unlocks");
migrationBuilder.AlterColumn<long>(
name: "MatchId",
table: "OnlineMatches",
type: "INTEGER",
nullable: false,
oldClrType: typeof(long),
oldType: "INTEGER")
.Annotation("Sqlite:Autoincrement", true);
}
}
}
@@ -175,25 +175,6 @@ namespace Infrastructure.Migrations
b.ToTable("CardPlayCount", (string)null);
});
modelBuilder.Entity("Domain.Entities.Coin", b =>
{
b.Property<long>("CardId")
.HasColumnType("INTEGER");
b.Property<int>("Count")
.HasColumnType("INTEGER");
b.Property<DateTime>("CreateTime")
.HasColumnType("TEXT");
b.Property<DateTime>("UpdateTime")
.HasColumnType("TEXT");
b.HasKey("CardId");
b.ToTable("Coins");
});
modelBuilder.Entity("Domain.Entities.GlobalScoreRank", b =>
{
b.Property<long>("CardId")
@@ -248,31 +229,6 @@ namespace Infrastructure.Migrations
b.ToTable("GlobalScoreRank", (string)null);
});
modelBuilder.Entity("Domain.Entities.Item", b =>
{
b.Property<int>("ItemId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<long>("CardId")
.HasColumnType("INTEGER");
b.Property<int>("Count")
.HasColumnType("INTEGER");
b.Property<DateTime>("CreateTime")
.HasColumnType("TEXT");
b.Property<DateTime>("UpdateTime")
.HasColumnType("TEXT");
b.HasKey("ItemId");
b.HasIndex("CardId");
b.ToTable("Items");
});
modelBuilder.Entity("Domain.Entities.MonthlyScoreRank", b =>
{
b.Property<long>("CardId")
@@ -330,6 +286,7 @@ namespace Infrastructure.Migrations
modelBuilder.Entity("Domain.Entities.OnlineMatch", b =>
{
b.Property<long>("MatchId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<Guid>("Guid")
@@ -341,7 +298,7 @@ namespace Infrastructure.Migrations
b.HasKey("MatchId");
b.ToTable("OnlineMatches");
b.ToTable("OnlineMatches", (string)null);
});
modelBuilder.Entity("Domain.Entities.OnlineMatchEntry", b =>
@@ -411,7 +368,7 @@ namespace Infrastructure.Migrations
b.HasKey("MatchId", "EntryId");
b.ToTable("OnlineMatchEntries");
b.ToTable("OnlineMatchEntries", (string)null);
});
modelBuilder.Entity("Domain.Entities.PlayNumRank", b =>
@@ -501,49 +458,6 @@ namespace Infrastructure.Migrations
b.ToTable("ShopScoreRank", (string)null);
});
modelBuilder.Entity("Domain.Entities.Unlock", b =>
{
b.Property<long>("CardId")
.HasColumnType("INTEGER");
b.Property<int>("UnlockItemId")
.HasColumnType("INTEGER");
b.Property<int>("UnlockType")
.HasColumnType("INTEGER");
b.Property<DateTime>("CreateTime")
.HasColumnType("TEXT");
b.Property<bool>("IsNew")
.HasColumnType("INTEGER");
b.Property<DateTime>("UpdateTime")
.HasColumnType("TEXT");
b.HasKey("CardId", "UnlockItemId", "UnlockType");
b.ToTable("Unlocks");
});
modelBuilder.Entity("Domain.Entities.Coin", b =>
{
b.HasOne("Domain.Entities.CardMain", null)
.WithOne("Coin")
.HasForeignKey("Domain.Entities.Coin", "CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Domain.Entities.Item", b =>
{
b.HasOne("Domain.Entities.CardMain", null)
.WithMany("Items")
.HasForeignKey("CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Domain.Entities.OnlineMatchEntry", b =>
{
b.HasOne("Domain.Entities.OnlineMatch", null)
@@ -553,24 +467,6 @@ namespace Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("Domain.Entities.Unlock", b =>
{
b.HasOne("Domain.Entities.CardMain", null)
.WithMany("Unlocks")
.HasForeignKey("CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Domain.Entities.CardMain", b =>
{
b.Navigation("Coin");
b.Navigation("Items");
b.Navigation("Unlocks");
});
modelBuilder.Entity("Domain.Entities.OnlineMatch", b =>
{
b.Navigation("Entries");
+46 -29
View File
@@ -36,12 +36,6 @@ public partial class CardDbContext : DbContext, ICardDbContext
public virtual DbSet<OnlineMatch> OnlineMatches { get; set; } = null!;
public virtual DbSet<OnlineMatchEntry> OnlineMatchEntries { get; set; } = null!;
public virtual DbSet<Unlock> Unlocks { get; set; } = null!;
public virtual DbSet<Item> Items { get; set; } = null!;
public virtual DbSet<Coin> Coins { get; set; } = null!;
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
@@ -137,6 +131,13 @@ public partial class CardDbContext : DbContext, ICardDbContext
entity.ToTable("PlayNumRank");
entity.Property(e => e.MusicId).ValueGeneratedNever();
entity.Property(e => e.PlayCount);
entity.Property(e => e.Artist);
entity.Property(e => e.Title);
entity.Property(e => e.Rank);
entity.Property(e => e.Rank2);
entity.Property(e => e.PrevRank);
entity.Property(e => e.PrevRank2);
});
modelBuilder.Entity<GlobalScoreRank>(entity =>
@@ -146,6 +147,19 @@ public partial class CardDbContext : DbContext, ICardDbContext
entity.ToTable("GlobalScoreRank");
entity.Property(e => e.CardId).ValueGeneratedNever();
entity.Property(e => e.Fcol1);
entity.Property(e => e.AvatarId);
entity.Property(e => e.Title);
entity.Property(e => e.TitleId);
entity.Property(e => e.Rank);
entity.Property(e => e.AreaId);
entity.Property(e => e.Area);
entity.Property(e => e.LastPlayTenpoId);
entity.Property(e => e.TenpoName);
entity.Property(e => e.PrefId);
entity.Property(e => e.Pref);
entity.Property(e => e.TotalScore);
entity.Property(e => e.PlayerName);
});
modelBuilder.Entity<MonthlyScoreRank>(entity =>
@@ -155,6 +169,19 @@ public partial class CardDbContext : DbContext, ICardDbContext
entity.ToTable("MonthlyScoreRank");
entity.Property(e => e.CardId).ValueGeneratedNever();
entity.Property(e => e.Fcol1);
entity.Property(e => e.AvatarId);
entity.Property(e => e.Title);
entity.Property(e => e.TitleId);
entity.Property(e => e.Rank);
entity.Property(e => e.AreaId);
entity.Property(e => e.Area);
entity.Property(e => e.LastPlayTenpoId);
entity.Property(e => e.TenpoName);
entity.Property(e => e.PrefId);
entity.Property(e => e.Pref);
entity.Property(e => e.TotalScore);
entity.Property(e => e.PlayerName);
});
modelBuilder.Entity<ShopScoreRank>(entity =>
@@ -164,6 +191,19 @@ public partial class CardDbContext : DbContext, ICardDbContext
entity.ToTable("ShopScoreRank");
entity.Property(e => e.CardId).ValueGeneratedNever();
entity.Property(e => e.Fcol1);
entity.Property(e => e.AvatarId);
entity.Property(e => e.Title);
entity.Property(e => e.TitleId);
entity.Property(e => e.Rank);
entity.Property(e => e.AreaId);
entity.Property(e => e.Area);
entity.Property(e => e.LastPlayTenpoId);
entity.Property(e => e.TenpoName);
entity.Property(e => e.PrefId);
entity.Property(e => e.Pref);
entity.Property(e => e.TotalScore);
entity.Property(e => e.PlayerName);
});
modelBuilder.Entity<OnlineMatch>(entity =>
@@ -182,30 +222,7 @@ public partial class CardDbContext : DbContext, ICardDbContext
{
entity.HasKey(e => new { e.MatchId, e.EntryId });
});
modelBuilder.Entity<Unlock>(entity =>
{
entity.HasKey(e => new { e.CardId, e.UnlockItemId, e.UnlockType });
entity.HasOne<CardMain>()
.WithMany(e=>e.Unlocks)
.HasForeignKey(e => e.CardId);
});
modelBuilder.Entity<Item>(entity =>
{
entity.HasKey(e => e.ItemId);
entity.HasOne<CardMain>()
.WithMany(e=>e.Items)
.HasForeignKey(e => e.CardId);
});
modelBuilder.Entity<Coin>(entity =>
{
entity.HasKey(e => e.CardId);
entity.HasOne<CardMain>()
.WithOne(e=>e.Coin)
.HasForeignKey<Coin>(e => e.CardId);
});
OnModelCreatingPartial(modelBuilder);
}
+1 -1
View File
@@ -7,7 +7,7 @@
"TenpoName": "店舗1",
"Pref": "東京都",
"Location": "渋谷区",
"Mac": "00155D6ACF78"
"Mac": "000000000000"
}
]
}
-9
View File
@@ -1,9 +0,0 @@
{
"Locked":
[
{
"ItemId": 11,
"ItemType": "Avatar"
}
]
}
-3
View File
@@ -42,7 +42,6 @@ try
.AddJsonFile($"{configurationsDirectory}/matching.json", optional: true, reloadOnChange: false)
.AddJsonFile($"{configurationsDirectory}/auth.json", optional: true, reloadOnChange: false)
.AddJsonFile($"{configurationsDirectory}/rank.json", optional: true, reloadOnChange: false)
.AddJsonFile($"{configurationsDirectory}/locked.json", optional: true, reloadOnChange: false)
.AddJsonFile($"{configurationsDirectory}/server.json", optional: true, reloadOnChange: false);
builder.Services.Configure<EventConfig>(
@@ -53,8 +52,6 @@ try
builder.Configuration.GetSection(GameConfig.GAME_SECTION));
builder.Services.Configure<AuthConfig>(
builder.Configuration.GetSection(AuthConfig.AUTH_SECTION));
builder.Services.Configure<LockedItemConfig>(
builder.Configuration.GetSection(LockedItemConfig.LOCKED_SECTION));
builder.Services.AddOptions<RankConfig>()
.Bind(builder.Configuration.GetSection(RankConfig.RANK_SECTION))
.ValidateDataAnnotations()
+1 -1
View File
@@ -7,7 +7,7 @@ card_id, pcol1, pcol2, pcol3 are primary keys
| 0 | 0 | 0 | score_i1:**avatar** score_ui1:**fast/slow** score_ui2:**fever/trance** fcol1: fcol2:**title** fcol3:**sound** |
| 1 | 0 | 0 | score_i1:**navigator** fcol3:**unknown** |
| 10 | song id | 0 | score_i1:**skin**, score_ui2:**Whether the song is unlocked**, score_ui6: **The song need to be unlocked**, fcol1:**Favorite song** |
| 20 | song id | difficulty | score_ui1:**play count** score_ui2:**clear count** score_ui3:**no miss or higher count** score_ui4: **full_chain or higher count** score_ui5: **S+ or higher count** score_ui6: **perfect count** |
| 20 | song id | difficulty | score_i1: **rank(S and above=0,A=1,etc)**,**score_ui1:**play count** score_ui2:**clear count** score_ui3:**no miss or higher count** score_ui4: **full_chain or higher count** score_ui5: **1 for S+,2 for S++** score_ui6: **perfect count** |
| 21 | song id | difficulty | score_ui1/score_ui5: **highest score**, score_ui2/score_ui6:**highest_score time** score_ui3:**max_chain** score_ui4: **max chain time** fcol1:**max hit adlib count** fcol2:**time for fcol1** |
| 30 | 0 | 0 | score_ui2:**Unknown, looks like some sort of count** |
| 31 | 0 | 0 | score_bi1: **Unknown, looks like some sort of count** |