From 35dfda0ca8c9817f27f1252c54e5173a3469c238 Mon Sep 17 00:00:00 2001 From: Yang Chun Ung Date: Mon, 2 Dec 2024 22:19:40 +0900 Subject: [PATCH 1/6] Optimize avatar state --- NineChronicles.DataProvider/DataRendering/HackAndSlashData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NineChronicles.DataProvider/DataRendering/HackAndSlashData.cs b/NineChronicles.DataProvider/DataRendering/HackAndSlashData.cs index f37b142d..fc0ef7d4 100644 --- a/NineChronicles.DataProvider/DataRendering/HackAndSlashData.cs +++ b/NineChronicles.DataProvider/DataRendering/HackAndSlashData.cs @@ -20,7 +20,7 @@ public static HackAndSlashModel GetHackAndSlashInfo( DateTimeOffset blockTime ) { - AvatarState avatarState = outputStates.GetAvatarState(avatarAddress); + AvatarState avatarState = outputStates.GetAvatarState(avatarAddress, false, false, false); bool isClear = avatarState.stageMap.ContainsKey(stageId); var hasModel = new HackAndSlashModel() From 515caa35183b42c2fc7344c7b361da43d95a9218 Mon Sep 17 00:00:00 2001 From: Yang Chun Ung Date: Mon, 2 Dec 2024 22:22:07 +0900 Subject: [PATCH 2/6] Delete unused StoreHackAndSlash --- .../Store/MySqlStore.cs | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/NineChronicles.DataProvider/Store/MySqlStore.cs b/NineChronicles.DataProvider/Store/MySqlStore.cs index eaabf10c..15630786 100644 --- a/NineChronicles.DataProvider/Store/MySqlStore.cs +++ b/NineChronicles.DataProvider/Store/MySqlStore.cs @@ -192,39 +192,6 @@ public void StoreAgentList(List agentList) } } - public void StoreHackAndSlash( - Guid id, - Address agentAddress, - Address avatarAddress, - int stageId, - bool cleared, - bool isMimisbrunnr, - long blockIndex) - { - try - { - using NineChroniclesContext ctx = _dbContextFactory.CreateDbContext(); - ctx.HackAndSlashes!.AddRange( - new HackAndSlashModel() - { - Id = id.ToString(), - AgentAddress = agentAddress.ToString(), - AvatarAddress = avatarAddress.ToString(), - StageId = stageId, - Cleared = cleared, - Mimisbrunnr = isMimisbrunnr, - BlockIndex = blockIndex, - } - ); - ctx.SaveChanges(); - ctx.Dispose(); - } - catch (Exception e) - { - Log.Debug(e.Message); - } - } - public void StoreHackAndSlashList(List hasList) { try From 0f634776a1ce4f2f8efffc81f2ee9d4fc4605a8b Mon Sep 17 00:00:00 2001 From: Yang Chun Ung Date: Mon, 2 Dec 2024 22:22:53 +0900 Subject: [PATCH 3/6] Add avatar level field on HackAndSlashes --- ...743_AddHackAndSlashAvatarLevel.Designer.cs | 4548 +++++++++++++++++ ...241202131743_AddHackAndSlashAvatarLevel.cs | 26 + .../NineChroniclesContextModelSnapshot.cs | 11 +- .../DataRendering/HackAndSlashData.cs | 2 + .../Store/Models/HackAndSlashModel.cs | 2 + 5 files changed, 4585 insertions(+), 4 deletions(-) create mode 100644 NineChronicles.DataProvider.Executable/Migrations/20241202131743_AddHackAndSlashAvatarLevel.Designer.cs create mode 100644 NineChronicles.DataProvider.Executable/Migrations/20241202131743_AddHackAndSlashAvatarLevel.cs diff --git a/NineChronicles.DataProvider.Executable/Migrations/20241202131743_AddHackAndSlashAvatarLevel.Designer.cs b/NineChronicles.DataProvider.Executable/Migrations/20241202131743_AddHackAndSlashAvatarLevel.Designer.cs new file mode 100644 index 00000000..7f6a69f9 --- /dev/null +++ b/NineChronicles.DataProvider.Executable/Migrations/20241202131743_AddHackAndSlashAvatarLevel.Designer.cs @@ -0,0 +1,4548 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using NineChronicles.DataProvider.Store; + +#nullable disable + +namespace NineChronicles.DataProvider.Executable.Migrations +{ + [DbContext(typeof(NineChroniclesContext))] + [Migration("20241202131743_AddHackAndSlashAvatarLevel")] + partial class AddHackAndSlashAvatarLevel + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AbilityRankingModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("AbilityRanking"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ActivateCollectionModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ActionId") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("AvatarAddress") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("CollectionId") + .HasColumnType("int"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarAddress", "CollectionId") + .IsUnique(); + + b.ToTable("ActivateCollections"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossChallengeModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EndFloor") + .HasColumnType("int"); + + b.Property("Point") + .HasColumnType("int"); + + b.Property("Season") + .HasColumnType("bigint"); + + b.Property("StartFloor") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TotalPoint") + .HasColumnType("bigint"); + + b.Property("UsedApPotion") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("AdventureBossChallenge"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossClaimRewardModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("ClaimedSeason") + .HasColumnType("longtext"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("NcgReward") + .HasColumnType("decimal(65,30)"); + + b.Property("RewardData") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("AdventureBossClaimReward"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossRushModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EndFloor") + .HasColumnType("int"); + + b.Property("Point") + .HasColumnType("int"); + + b.Property("Season") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TotalPoint") + .HasColumnType("bigint"); + + b.Property("UsedApPotion") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("AdventureBossRush"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossSeasonModel", b => + { + b.Property("Season") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("BossId") + .HasColumnType("int"); + + b.Property("ClaimableBlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EndBlockIndex") + .HasColumnType("bigint"); + + b.Property("FixedRewardData") + .HasColumnType("longtext"); + + b.Property("NextSeasonBlockIndex") + .HasColumnType("bigint"); + + b.Property("RaffleReward") + .HasColumnType("decimal(65,30)"); + + b.Property("RaffleWinnerAddress") + .HasColumnType("varchar(255)"); + + b.Property("RandomRewardData") + .HasColumnType("longtext"); + + b.Property("StartBlockIndex") + .HasColumnType("bigint"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Season"); + + b.HasIndex("RaffleWinnerAddress"); + + b.ToTable("AdventureBossSeason"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossUnlockFloorModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Season") + .HasColumnType("bigint"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TotalUsedGoldenDust") + .HasColumnType("bigint"); + + b.Property("TotalUsedNcg") + .HasColumnType("decimal(65,30)"); + + b.Property("UnlockFloor") + .HasColumnType("int"); + + b.Property("UsedGoldenDust") + .HasColumnType("bigint"); + + b.Property("UsedNcg") + .HasColumnType("decimal(65,30)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("AdventureBossUnlockFloor"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossWantedModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Bounty") + .HasColumnType("decimal(65,30)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Season") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TotalBounty") + .HasColumnType("decimal(65,30)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("AdventureBossWanted"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AgentModel", b => + { + b.Property("Address") + .HasColumnType("varchar(255)"); + + b.HasKey("Address"); + + b.ToTable("Agents"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ApprovePledgeModel", b => + { + b.Property("TxId") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("PatronAddress") + .HasColumnType("longtext"); + + b.Property("Signer") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("TxId"); + + b.HasIndex("Date"); + + b.ToTable("ApprovePledges"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AuraSummonFailModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Exception") + .HasColumnType("longtext"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.Property("SummonCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("AuraSummonFails"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AuraSummonModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.Property("SummonCount") + .HasColumnType("int"); + + b.Property("SummonResult") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("AuraSummons"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AvatarModel", b => + { + b.Property("Address") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Timestamp") + .HasColumnType("datetime(6)"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.HasKey("Address"); + + b.HasIndex("AgentAddress"); + + b.ToTable("Avatars"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.BattleArenaModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("ChampionshipId") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EnemyAvatarAddress") + .HasColumnType("longtext"); + + b.Property("MedalCount") + .HasColumnType("int"); + + b.Property("Round") + .HasColumnType("int"); + + b.Property("TicketCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("Victory") + .HasColumnType("tinyint(1)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("BattleArenas"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.BattleArenaRankingModel", b => + { + b.Property("AdditionalTicketPrice") + .HasColumnType("bigint"); + + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArenaType") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("ChampionshipId") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EndBlockIndex") + .HasColumnType("bigint"); + + b.Property("EntranceFee") + .HasColumnType("bigint"); + + b.Property("LossCount") + .HasColumnType("int"); + + b.Property("MedalCount") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("PurchasedTicketCount") + .HasColumnType("int"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("RequiredMedalCount") + .HasColumnType("int"); + + b.Property("Round") + .HasColumnType("int"); + + b.Property("Score") + .HasColumnType("int"); + + b.Property("StartBlockIndex") + .HasColumnType("bigint"); + + b.Property("Ticket") + .HasColumnType("int"); + + b.Property("TicketPrice") + .HasColumnType("bigint"); + + b.Property("TicketResetCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.Property("WinCount") + .HasColumnType("int"); + + b.ToTable("BattleArenaRanking"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.BattleGrandFinaleModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("datetime(6)"); + + b.Property("EnemyAvatarAddress") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("GrandFinaleId") + .HasColumnType("int"); + + b.Property("GrandFinaleScore") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("Victory") + .HasColumnType("tinyint(1)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("BattleGrandFinales"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.BlockModel", b => + { + b.Property("Hash") + .HasColumnType("varchar(255)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Difficulty") + .HasColumnType("bigint"); + + b.Property("Index") + .HasColumnType("bigint"); + + b.Property("Miner") + .HasColumnType("longtext"); + + b.Property("Nonce") + .HasColumnType("longtext"); + + b.Property("PreviousHash") + .HasColumnType("longtext"); + + b.Property("ProtocolVersion") + .HasColumnType("int"); + + b.Property("PublicKey") + .HasColumnType("longtext"); + + b.Property("StateRootHash") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TotalDifficulty") + .HasColumnType("bigint"); + + b.Property("TxCount") + .HasColumnType("int"); + + b.Property("TxHash") + .HasColumnType("longtext"); + + b.HasKey("Hash"); + + b.HasIndex("Date"); + + b.HasIndex("Index"); + + b.ToTable("Blocks"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Claim.ClaimGiftsModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("GiftId") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("ClaimGifts"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ClaimStakeRewardModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("ApPotionCount") + .HasColumnType("int"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("ClaimRewardAvatarAddress") + .HasColumnType("longtext"); + + b.Property("ClaimStakeEndBlockIndex") + .HasColumnType("bigint"); + + b.Property("ClaimStakeStartBlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("HourGlassCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("Date"); + + b.ToTable("ClaimStakeRewards"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.CombinationConsumableModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("RecipeId") + .HasColumnType("int"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("CombinationConsumables"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.CombinationEquipmentModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("OptionCount") + .HasColumnType("int"); + + b.Property("RecipeId") + .HasColumnType("int"); + + b.Property("SkillContains") + .HasColumnType("tinyint(1)"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("SubRecipeId") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("CombinationEquipments"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Crafting.CustomEquipmentCraftCountModel", b => + { + b.Property("IconId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Count") + .HasColumnType("bigint"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.HasKey("IconId"); + + b.ToTable("CustomEquipmentCraftCount"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Crafting.CustomEquipmentCraftModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AdditionalCost") + .HasColumnType("longtext"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Circle") + .HasColumnType("int"); + + b.Property("CraftWithRandom") + .HasColumnType("tinyint(1)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("EquipmentItemId") + .HasColumnType("int"); + + b.Property("HasRandomOnlyIcon") + .HasColumnType("tinyint(1)"); + + b.Property("IconId") + .HasColumnType("int"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("NcgCost") + .HasColumnType("decimal(65,30)"); + + b.Property("OptionId") + .HasColumnType("int"); + + b.Property("RecipeId") + .HasColumnType("int"); + + b.Property("Relationship") + .HasColumnType("int"); + + b.Property("Scroll") + .HasColumnType("int"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TotalCP") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("CustomEquipmentCraft"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Crafting.RapidCombinationModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("HourglassCount") + .HasColumnType("int"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("RapidCombinations"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Crafting.UnlockCombinationSlotModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("CrystalCost") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("MaterialCosts") + .HasColumnType("longtext"); + + b.Property("NcgCost") + .HasColumnType("decimal(65,30)"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("UnlockCombinationSlot"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.CraftRankingModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("CraftCount") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("CraftRankings"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.DailyMetricModel", b => + { + b.Property("Date") + .HasColumnType("date"); + + b.Property("ApUsage") + .HasColumnType("int"); + + b.Property("ArenaNcg") + .HasColumnType("decimal(65,30)"); + + b.Property("AuraSummonCount") + .HasColumnType("int"); + + b.Property("CraftingConsumableCount") + .HasColumnType("int"); + + b.Property("CraftingConsumableUsers") + .HasColumnType("int"); + + b.Property("CraftingEquipmentCount") + .HasColumnType("int"); + + b.Property("CraftingEquipmentUsers") + .HasColumnType("int"); + + b.Property("DailyNew") + .HasColumnType("int"); + + b.Property("Dau") + .HasColumnType("int"); + + b.Property("EnhanceCount") + .HasColumnType("int"); + + b.Property("EnhanceNcg") + .HasColumnType("decimal(65,30)"); + + b.Property("EnhanceUsers") + .HasColumnType("int"); + + b.Property("EventTicketNcg") + .HasColumnType("decimal(65,30)"); + + b.Property("HackAndSlashCount") + .HasColumnType("int"); + + b.Property("HackAndSlashUsers") + .HasColumnType("int"); + + b.Property("HourglassUsage") + .HasColumnType("int"); + + b.Property("NcgTrade") + .HasColumnType("decimal(65,30)"); + + b.Property("RuneNcg") + .HasColumnType("decimal(65,30)"); + + b.Property("RuneSlotNcg") + .HasColumnType("decimal(65,30)"); + + b.Property("RuneSummonCount") + .HasColumnType("int"); + + b.Property("SweepCount") + .HasColumnType("int"); + + b.Property("SweepUsers") + .HasColumnType("int"); + + b.Property("TxCount") + .HasColumnType("int"); + + b.HasKey("Date"); + + b.HasIndex("Date"); + + b.ToTable("DailyMetrics"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.EquipmentModel", b => + { + b.Property("ItemId") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("ItemId"); + + b.ToTable("Equipments"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.EventConsumableItemCraftsModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EventConsumableItemRecipeId") + .HasColumnType("int"); + + b.Property("EventScheduleId") + .HasColumnType("int"); + + b.Property("RequiredItem1Count") + .HasColumnType("int"); + + b.Property("RequiredItem1Id") + .HasColumnType("int"); + + b.Property("RequiredItem2Count") + .HasColumnType("int"); + + b.Property("RequiredItem2Id") + .HasColumnType("int"); + + b.Property("RequiredItem3Count") + .HasColumnType("int"); + + b.Property("RequiredItem3Id") + .HasColumnType("int"); + + b.Property("RequiredItem4Count") + .HasColumnType("int"); + + b.Property("RequiredItem4Id") + .HasColumnType("int"); + + b.Property("RequiredItem5Count") + .HasColumnType("int"); + + b.Property("RequiredItem5Id") + .HasColumnType("int"); + + b.Property("RequiredItem6Count") + .HasColumnType("int"); + + b.Property("RequiredItem6Id") + .HasColumnType("int"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("Timestamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("EventConsumableItemCrafts"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.EventDungeonBattleModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("Cleared") + .HasColumnType("tinyint(1)"); + + b.Property("CostumesCount") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EquipmentsCount") + .HasColumnType("int"); + + b.Property("EventDungeonId") + .HasColumnType("int"); + + b.Property("EventDungeonStageId") + .HasColumnType("int"); + + b.Property("EventScheduleId") + .HasColumnType("int"); + + b.Property("FoodsCount") + .HasColumnType("int"); + + b.Property("RemainingTickets") + .HasColumnType("int"); + + b.Property("RewardItem10Count") + .HasColumnType("int"); + + b.Property("RewardItem10Id") + .HasColumnType("int"); + + b.Property("RewardItem1Count") + .HasColumnType("int"); + + b.Property("RewardItem1Id") + .HasColumnType("int"); + + b.Property("RewardItem2Count") + .HasColumnType("int"); + + b.Property("RewardItem2Id") + .HasColumnType("int"); + + b.Property("RewardItem3Count") + .HasColumnType("int"); + + b.Property("RewardItem3Id") + .HasColumnType("int"); + + b.Property("RewardItem4Count") + .HasColumnType("int"); + + b.Property("RewardItem4Id") + .HasColumnType("int"); + + b.Property("RewardItem5Count") + .HasColumnType("int"); + + b.Property("RewardItem5Id") + .HasColumnType("int"); + + b.Property("RewardItem6Count") + .HasColumnType("int"); + + b.Property("RewardItem6Id") + .HasColumnType("int"); + + b.Property("RewardItem7Count") + .HasColumnType("int"); + + b.Property("RewardItem7Id") + .HasColumnType("int"); + + b.Property("RewardItem8Count") + .HasColumnType("int"); + + b.Property("RewardItem8Id") + .HasColumnType("int"); + + b.Property("RewardItem9Count") + .HasColumnType("int"); + + b.Property("RewardItem9Id") + .HasColumnType("int"); + + b.Property("Timestamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("EventDungeonBattles"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.EventMaterialItemCraftsModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("datetime(6)"); + + b.Property("EventMaterialItemRecipeId") + .HasColumnType("int"); + + b.Property("EventScheduleId") + .HasColumnType("int"); + + b.Property("Material10Count") + .HasColumnType("int"); + + b.Property("Material10Id") + .HasColumnType("int"); + + b.Property("Material11Count") + .HasColumnType("int"); + + b.Property("Material11Id") + .HasColumnType("int"); + + b.Property("Material12Count") + .HasColumnType("int"); + + b.Property("Material12Id") + .HasColumnType("int"); + + b.Property("Material1Count") + .HasColumnType("int"); + + b.Property("Material1Id") + .HasColumnType("int"); + + b.Property("Material2Count") + .HasColumnType("int"); + + b.Property("Material2Id") + .HasColumnType("int"); + + b.Property("Material3Count") + .HasColumnType("int"); + + b.Property("Material3Id") + .HasColumnType("int"); + + b.Property("Material4Count") + .HasColumnType("int"); + + b.Property("Material4Id") + .HasColumnType("int"); + + b.Property("Material5Count") + .HasColumnType("int"); + + b.Property("Material5Id") + .HasColumnType("int"); + + b.Property("Material6Count") + .HasColumnType("int"); + + b.Property("Material6Id") + .HasColumnType("int"); + + b.Property("Material7Count") + .HasColumnType("int"); + + b.Property("Material7Id") + .HasColumnType("int"); + + b.Property("Material8Count") + .HasColumnType("int"); + + b.Property("Material8Id") + .HasColumnType("int"); + + b.Property("Material9Count") + .HasColumnType("int"); + + b.Property("Material9Id") + .HasColumnType("int"); + + b.Property("Timestamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("EventMaterialItemCrafts"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Grinding.GrindingModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Crystal") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("EquipmentItemId") + .HasColumnType("longtext"); + + b.Property("EquipmentLevel") + .HasColumnType("int"); + + b.Property("Materials") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("Grindings"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HackAndSlashModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Cleared") + .HasColumnType("tinyint(1)"); + + b.Property("CurrentLevel") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Mimisbrunnr") + .HasColumnType("tinyint(1)"); + + b.Property("StageId") + .HasColumnType("int"); + + b.Property("Timestamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("HackAndSlashes"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HackAndSlashSweepModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("ActionPoint") + .HasColumnType("int"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("ApStoneCount") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Cleared") + .HasColumnType("tinyint(1)"); + + b.Property("CostumesCount") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EquipmentsCount") + .HasColumnType("int"); + + b.Property("Mimisbrunnr") + .HasColumnType("tinyint(1)"); + + b.Property("StageId") + .HasColumnType("int"); + + b.Property("Timestamp") + .HasColumnType("datetime(6)"); + + b.Property("WorldId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("HackAndSlashSweeps"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HasRandomBuffModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntCrystal") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("GachaCount") + .HasColumnType("int"); + + b.Property("HasStageId") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("HasRandomBuffs"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HasWithRandomBuffModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuffId") + .HasColumnType("int"); + + b.Property("Cleared") + .HasColumnType("tinyint(1)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("StageId") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("HasWithRandomBuffs"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ItemEnhancementFailModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EquipmentItemId") + .HasColumnType("longtext"); + + b.Property("EquipmentLevel") + .HasColumnType("int"); + + b.Property("GainedCrystal") + .HasColumnType("decimal(65,30)"); + + b.Property("MaterialIdsCount") + .HasColumnType("int"); + + b.Property("MaterialItemId") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("ItemEnhancementFails"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ItemEnhancementModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Exp") + .HasColumnType("bigint"); + + b.Property("HammerCount") + .HasColumnType("int"); + + b.Property("HammerExp") + .HasColumnType("bigint"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("MaterialId") + .HasColumnType("longtext"); + + b.Property("MaterialIdsCount") + .HasColumnType("int"); + + b.Property("SheetId") + .HasColumnType("int"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("ItemEnhancements"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.JoinArenaModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("ArenaRound") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntCrystal") + .HasColumnType("decimal(65,30)"); + + b.Property("ChampionshipId") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("JoinArenas"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.MigrateMonsterCollectionModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("MigrationAmount") + .HasColumnType("decimal(65,30)"); + + b.Property("MigrationStartBlockIndex") + .HasColumnType("bigint"); + + b.Property("StakeStartBlockIndex") + .HasColumnType("bigint"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("Date"); + + b.ToTable("MigrateMonsterCollections"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.PetEnhancementModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("BurntSoulStone") + .HasColumnType("decimal(65,30)"); + + b.Property("ChangedLevel") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("OutputPetLevel") + .HasColumnType("int"); + + b.Property("PetId") + .HasColumnType("int"); + + b.Property("PreviousPetLevel") + .HasColumnType("int"); + + b.Property("TargetLevel") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("PetEnhancements"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RaiderModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Address") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("AvatarName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("HighScore") + .HasColumnType("bigint"); + + b.Property("IconId") + .HasColumnType("int"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("PurchaseCount") + .HasColumnType("int"); + + b.Property("RaidId") + .HasColumnType("int"); + + b.Property("TotalScore") + .HasColumnType("bigint"); + + b.Property("UpdatedAt") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("RaidId", "Address") + .IsUnique(); + + b.ToTable("Raiders"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingArmorModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("EquipmentRankingArmor"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingAuraModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("EquipmentRankingAura"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingBeltModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("EquipmentRankingBelt"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingGrimoireModel", b => + { + b.Property("ItemId") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.HasKey("ItemId"); + + b.ToTable("EquipmentRankingGrimoire"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("EquipmentRanking"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingNecklaceModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("EquipmentRankingNecklace"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingRingModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("EquipmentRankingRing"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingWeaponModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("EquipmentRankingWeapon"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ReplaceCombinationEquipmentMaterialModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntCrystal") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("ReplacedMaterialCount") + .HasColumnType("int"); + + b.Property("ReplacedMaterialId") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("ReplaceCombinationEquipmentMaterials"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RequestPledgeModel", b => + { + b.Property("TxId") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("PledgeAgentAddress") + .HasColumnType("longtext"); + + b.Property("RefillMead") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TxSigner") + .HasColumnType("longtext"); + + b.HasKey("TxId"); + + b.HasIndex("Date"); + + b.ToTable("RequestPledges"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RuneEnhancementModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntCrystal") + .HasColumnType("decimal(65,30)"); + + b.Property("BurntNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("BurntRune") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("OutputRuneLevel") + .HasColumnType("int"); + + b.Property("OutputRuneLevelBonus") + .HasColumnType("int"); + + b.Property("PreviousRuneLevel") + .HasColumnType("int"); + + b.Property("PreviousRuneLevelBonus") + .HasColumnType("int"); + + b.Property("RuneId") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TryCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("RuneEnhancements"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RunesAcquiredModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("ActionType") + .HasColumnType("varchar(255)"); + + b.Property("TickerType") + .HasColumnType("varchar(255)"); + + b.Property("AcquiredRune") + .HasColumnType("decimal(65,30)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id", "ActionType", "TickerType"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.HasIndex("Id", "ActionType", "TickerType") + .IsUnique(); + + b.ToTable("RunesAcquired"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RuneSummonFailModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Exception") + .HasColumnType("longtext"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.Property("SummonCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("RuneSummonFails"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RuneSummonModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.Property("SummonCount") + .HasColumnType("int"); + + b.Property("SummonResult") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("RuneSummons"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopConsumableModel", b => + { + b.Property("ItemId") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuffSkillCount") + .HasColumnType("int"); + + b.Property("CombatPoint") + .HasColumnType("int"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("MainStat") + .HasColumnType("longtext"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("OrderId") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellExpiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellStartedBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellerAgentAddress") + .HasColumnType("longtext"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("SkillsCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.HasKey("ItemId"); + + b.ToTable("ShopConsumables"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopCostumeModel", b => + { + b.Property("ItemId") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("CombatPoint") + .HasColumnType("int"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Equipped") + .HasColumnType("tinyint(1)"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("OrderId") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellExpiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellStartedBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellerAgentAddress") + .HasColumnType("longtext"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("SpineResourcePath") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.HasKey("ItemId"); + + b.ToTable("ShopCostumes"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopEquipmentModel", b => + { + b.Property("ItemId") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuffSkillCount") + .HasColumnType("int"); + + b.Property("CombatPoint") + .HasColumnType("int"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("OrderId") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellExpiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellStartedBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellerAgentAddress") + .HasColumnType("longtext"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("SetId") + .HasColumnType("int"); + + b.Property("SkillsCount") + .HasColumnType("int"); + + b.Property("SpineResourcePath") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.Property("UniqueStatType") + .HasColumnType("longtext"); + + b.HasKey("ItemId"); + + b.ToTable("ShopEquipments"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopHistoryConsumableModel", b => + { + b.Property("OrderId") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuffSkillCount") + .HasColumnType("int"); + + b.Property("BuyerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("MainStat") + .HasColumnType("longtext"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("SkillsCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.Property("TxId") + .HasColumnType("longtext"); + + b.HasKey("OrderId"); + + b.HasIndex("Date"); + + b.ToTable("ShopHistoryConsumables"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopHistoryCostumeModel", b => + { + b.Property("OrderId") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuyerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Equipped") + .HasColumnType("tinyint(1)"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("SpineResourcePath") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.Property("TxId") + .HasColumnType("longtext"); + + b.HasKey("OrderId"); + + b.HasIndex("Date"); + + b.ToTable("ShopHistoryCostumes"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopHistoryEquipmentModel", b => + { + b.Property("OrderId") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuffSkillCount") + .HasColumnType("int"); + + b.Property("BuyerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("SetId") + .HasColumnType("int"); + + b.Property("SkillsCount") + .HasColumnType("int"); + + b.Property("SpineResourcePath") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.Property("TxId") + .HasColumnType("longtext"); + + b.Property("UniqueStatType") + .HasColumnType("longtext"); + + b.HasKey("OrderId"); + + b.HasIndex("Date"); + + b.ToTable("ShopHistoryEquipments"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopHistoryFungibleAssetValueModel", b => + { + b.Property("OrderId") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuyerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("Quantity") + .HasColumnType("decimal(65,30)"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("Ticker") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TxId") + .HasColumnType("longtext"); + + b.HasKey("OrderId"); + + b.HasIndex("Date"); + + b.ToTable("ShopHistoryFungibleAssetValues"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopHistoryMaterialModel", b => + { + b.Property("OrderId") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuyerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TxId") + .HasColumnType("longtext"); + + b.HasKey("OrderId"); + + b.HasIndex("Date"); + + b.ToTable("ShopHistoryMaterials"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopMaterialModel", b => + { + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("CombatPoint") + .HasColumnType("int"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("OrderId") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("SellExpiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellStartedBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellerAgentAddress") + .HasColumnType("longtext"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.ToTable("ShopMaterials"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.StageRankingModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("ClearedStageId") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("StageRanking"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.StakeModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("NewAmount") + .HasColumnType("decimal(65,30)"); + + b.Property("NewStakeStartBlockIndex") + .HasColumnType("bigint"); + + b.Property("PrevStakeStartBlockIndex") + .HasColumnType("bigint"); + + b.Property("PreviousAmount") + .HasColumnType("decimal(65,30)"); + + b.Property("RemainingNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("Date"); + + b.ToTable("Stakings"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.TransactionModel", b => + { + b.Property("TxId") + .HasColumnType("varchar(255)"); + + b.Property("ActionType") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("datetime(6)"); + + b.Property("Nonce") + .HasColumnType("bigint"); + + b.Property("PublicKey") + .HasColumnType("longtext"); + + b.Property("Signer") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("UpdatedAddressesCount") + .HasColumnType("int"); + + b.HasKey("TxId"); + + b.HasIndex("Date"); + + b.HasIndex(new[] { "Date", "ActionType" }, "IDX_Date_ActionType"); + + b.ToTable("Transactions"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.TransferAssetModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("Amount") + .HasColumnType("decimal(65,30)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Recipient") + .HasColumnType("longtext"); + + b.Property("Sender") + .HasColumnType("longtext"); + + b.Property("TickerType") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TxId") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Date"); + + b.ToTable("TransferAssets"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UnlockEquipmentRecipeModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntCrystal") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("UnlockEquipmentRecipeId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("UnlockEquipmentRecipes"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UnlockRuneSlotModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntCRYSTAL") + .HasColumnType("decimal(65,30)"); + + b.Property("BurntNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("UnlockRuneSlots"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UnlockWorldModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntCrystal") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("UnlockWorldId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("UnlockWorlds"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserConsumablesModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuffSkillCount") + .HasColumnType("int"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("MainStat") + .HasColumnType("longtext"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SkillsCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("UserConsumables"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserCostumesModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Equipped") + .HasColumnType("tinyint(1)"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SpineResourcePath") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("UserCostumes"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserCrystalsModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("CrystalBalance") + .HasColumnType("decimal(65,30)"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasIndex("AgentAddress"); + + b.ToTable("UserCrystals"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserEquipmentsModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuffSkillCount") + .HasColumnType("int"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SetId") + .HasColumnType("int"); + + b.Property("SkillsCount") + .HasColumnType("int"); + + b.Property("SpineResourcePath") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.Property("UniqueStatType") + .HasColumnType("longtext"); + + b.ToTable("UserEquipments"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserMaterialsModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("UserMaterials"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserMonsterCollectionsModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("ExpiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("MonsterCollectionAmount") + .HasColumnType("decimal(65,30)"); + + b.Property("ReceivedBlockIndex") + .HasColumnType("bigint"); + + b.Property("RewardLevel") + .HasColumnType("bigint"); + + b.Property("StartedBlockIndex") + .HasColumnType("bigint"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasIndex("AgentAddress"); + + b.ToTable("UserMonsterCollections"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserNCGsModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("NCGBalance") + .HasColumnType("decimal(65,30)"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasIndex("AgentAddress"); + + b.ToTable("UserNCGs"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserRunesModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("RuneBalance") + .HasColumnType("decimal(65,30)"); + + b.Property("Ticker") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("UserRunes"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserStakingsModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("CancellableBlockIndex") + .HasColumnType("bigint"); + + b.Property("ReceivedBlockIndex") + .HasColumnType("bigint"); + + b.Property("StakeAmount") + .HasColumnType("decimal(65,30)"); + + b.Property("StartedBlockIndex") + .HasColumnType("bigint"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasIndex("AgentAddress"); + + b.ToTable("UserStakings"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.WorldBossRankingModel", b => + { + b.Property("Address") + .HasColumnType("longtext"); + + b.Property("AvatarName") + .HasColumnType("longtext"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("HighScore") + .HasColumnType("bigint"); + + b.Property("IconId") + .HasColumnType("int"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TotalScore") + .HasColumnType("bigint"); + + b.ToTable("WorldBossRankings", null, t => t.ExcludeFromMigrations()); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.WorldBossSeasonMigrationModel", b => + { + b.Property("RaidId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("MigratedAt") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.HasKey("RaidId"); + + b.HasIndex("RaidId") + .IsUnique(); + + b.ToTable("WorldBossSeasonMigrationModels"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ActivateCollectionModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany("ActivateCollections") + .HasForeignKey("AvatarAddress") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsMany("NineChronicles.DataProvider.Store.Models.CollectionOptionModel", "Options", b1 => + { + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("ActivateCollectionId") + .HasColumnType("int"); + + b1.Property("OperationType") + .IsRequired() + .HasColumnType("longtext"); + + b1.Property("StatType") + .IsRequired() + .HasColumnType("longtext"); + + b1.Property("Value") + .HasColumnType("bigint"); + + b1.HasKey("Id"); + + b1.HasIndex("ActivateCollectionId"); + + b1.ToTable("CollectionOptionModel"); + + b1.WithOwner() + .HasForeignKey("ActivateCollectionId"); + }); + + b.Navigation("Avatar"); + + b.Navigation("Options"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossChallengeModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossClaimRewardModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossRushModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossSeasonModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "RaffleWinner") + .WithMany() + .HasForeignKey("RaffleWinnerAddress"); + + b.Navigation("RaffleWinner"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossUnlockFloorModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossWantedModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AuraSummonFailModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AuraSummonModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AvatarModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.BattleArenaModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.BattleGrandFinaleModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Claim.ClaimGiftsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ClaimStakeRewardModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.CombinationConsumableModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.CombinationEquipmentModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Crafting.CustomEquipmentCraftModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Crafting.RapidCombinationModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Crafting.UnlockCombinationSlotModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.EventConsumableItemCraftsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.EventDungeonBattleModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.EventMaterialItemCraftsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Grinding.GrindingModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HackAndSlashModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HackAndSlashSweepModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HasRandomBuffModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HasWithRandomBuffModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ItemEnhancementFailModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ItemEnhancementModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.JoinArenaModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.MigrateMonsterCollectionModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.PetEnhancementModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ReplaceCombinationEquipmentMaterialModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RuneEnhancementModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RunesAcquiredModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RuneSummonFailModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RuneSummonModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.StakeModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UnlockEquipmentRecipeModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UnlockRuneSlotModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UnlockWorldModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserConsumablesModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserCostumesModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserCrystalsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserMaterialsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserMonsterCollectionsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserNCGsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserRunesModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserStakingsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AvatarModel", b => + { + b.Navigation("ActivateCollections"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/NineChronicles.DataProvider.Executable/Migrations/20241202131743_AddHackAndSlashAvatarLevel.cs b/NineChronicles.DataProvider.Executable/Migrations/20241202131743_AddHackAndSlashAvatarLevel.cs new file mode 100644 index 00000000..3ce57871 --- /dev/null +++ b/NineChronicles.DataProvider.Executable/Migrations/20241202131743_AddHackAndSlashAvatarLevel.cs @@ -0,0 +1,26 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace NineChronicles.DataProvider.Executable.Migrations +{ + public partial class AddHackAndSlashAvatarLevel : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "CurrentLevel", + table: "HackAndSlashes", + type: "int", + nullable: false, + defaultValue: 0); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "CurrentLevel", + table: "HackAndSlashes"); + } + } +} diff --git a/NineChronicles.DataProvider.Executable/Migrations/NineChroniclesContextModelSnapshot.cs b/NineChronicles.DataProvider.Executable/Migrations/NineChroniclesContextModelSnapshot.cs index 06c0e4e7..11a5af2f 100644 --- a/NineChronicles.DataProvider.Executable/Migrations/NineChroniclesContextModelSnapshot.cs +++ b/NineChronicles.DataProvider.Executable/Migrations/NineChroniclesContextModelSnapshot.cs @@ -1553,6 +1553,9 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("Cleared") .HasColumnType("tinyint(1)"); + b.Property("CurrentLevel") + .HasColumnType("int"); + b.Property("Date") .HasColumnType("date"); @@ -3810,8 +3813,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("Cp") .HasColumnType("int"); - b.Property("HighScore") - .HasColumnType("int"); + b.Property("HighScore") + .HasColumnType("bigint"); b.Property("IconId") .HasColumnType("int"); @@ -3822,8 +3825,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("Ranking") .HasColumnType("int"); - b.Property("TotalScore") - .HasColumnType("int"); + b.Property("TotalScore") + .HasColumnType("bigint"); b.ToTable("WorldBossRankings", null, t => t.ExcludeFromMigrations()); }); diff --git a/NineChronicles.DataProvider/DataRendering/HackAndSlashData.cs b/NineChronicles.DataProvider/DataRendering/HackAndSlashData.cs index fc0ef7d4..07089027 100644 --- a/NineChronicles.DataProvider/DataRendering/HackAndSlashData.cs +++ b/NineChronicles.DataProvider/DataRendering/HackAndSlashData.cs @@ -21,6 +21,7 @@ DateTimeOffset blockTime ) { AvatarState avatarState = outputStates.GetAvatarState(avatarAddress, false, false, false); + var level = previousStates.GetAvatarState(avatarAddress, false, false, false).level; bool isClear = avatarState.stageMap.ContainsKey(stageId); var hasModel = new HackAndSlashModel() @@ -34,6 +35,7 @@ DateTimeOffset blockTime BlockIndex = blockIndex, Date = DateOnly.FromDateTime(blockTime.DateTime), Timestamp = blockTime, + CurrentLevel = level, }; return hasModel; diff --git a/NineChronicles.DataProvider/Store/Models/HackAndSlashModel.cs b/NineChronicles.DataProvider/Store/Models/HackAndSlashModel.cs index 022592ef..98d0d952 100644 --- a/NineChronicles.DataProvider/Store/Models/HackAndSlashModel.cs +++ b/NineChronicles.DataProvider/Store/Models/HackAndSlashModel.cs @@ -30,5 +30,7 @@ public class HackAndSlashModel public DateOnly Date { get; set; } public DateTimeOffset Timestamp { get; set; } + + public int CurrentLevel { get; set; } } } From 2453d009cf6bb095555c8afdb878ffc0aee4f64c Mon Sep 17 00:00:00 2001 From: Yang Chun Ung Date: Mon, 2 Dec 2024 22:43:58 +0900 Subject: [PATCH 4/6] Refactor GetBattleArenaInfo - Optimize avatar state - use arenaParticipant instead of score, information --- .../DataRendering/BattleArenaData.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/NineChronicles.DataProvider/DataRendering/BattleArenaData.cs b/NineChronicles.DataProvider/DataRendering/BattleArenaData.cs index 9aed5c48..0c15c37d 100644 --- a/NineChronicles.DataProvider/DataRendering/BattleArenaData.cs +++ b/NineChronicles.DataProvider/DataRendering/BattleArenaData.cs @@ -28,11 +28,12 @@ public static BattleArenaModel GetBattleArenaInfo( DateTimeOffset blockTime ) { - AvatarState avatarState = outputStates.GetAvatarState(myAvatarAddress); + // optimize avatar state just use level. + AvatarState avatarState = outputStates.GetAvatarState(myAvatarAddress, false, false, false); var myArenaScoreAdr = ArenaScore.DeriveAddress(myAvatarAddress, championshipId, round); previousStates.TryGetArenaScore(myArenaScoreAdr, out var previousArenaScore); - outputStates.TryGetArenaScore(myArenaScoreAdr, out var currentArenaScore); + var arenaParticipant = outputStates.GetArenaParticipant(championshipId, round, myAvatarAddress); Currency ncgCurrency = outputStates.GetGoldCurrency(); var prevNCGBalance = previousStates.GetBalance( signer, @@ -46,8 +47,7 @@ DateTimeOffset blockTime var arenaInformationAdr = ArenaInformation.DeriveAddress(myAvatarAddress, championshipId, round); previousStates.TryGetArenaInformation(arenaInformationAdr, out var previousArenaInformation); - outputStates.TryGetArenaInformation(arenaInformationAdr, out var currentArenaInformation); - var winCount = currentArenaInformation.Win - previousArenaInformation.Win; + var winCount = arenaParticipant.Win - previousArenaInformation.Win; var medalCount = 0; if (arenaData.ArenaType != ArenaType.OffSeason && winCount > 0) { @@ -72,7 +72,7 @@ DateTimeOffset blockTime Round = round, TicketCount = ticket, BurntNCG = Convert.ToDecimal(burntNCG.GetQuantityString()), - Victory = currentArenaScore.Score > previousArenaScore.Score, + Victory = arenaParticipant.Score > previousArenaScore.Score, MedalCount = medalCount, Date = DateOnly.FromDateTime(blockTime.DateTime), TimeStamp = blockTime, From 50e4af34bbd3fa2b2ae393c2261e99d3da12b031 Mon Sep 17 00:00:00 2001 From: Yang Chun Ung Date: Mon, 2 Dec 2024 22:46:51 +0900 Subject: [PATCH 5/6] Add cp field on BattleArenas table --- ...0241202134603_AddBattleArenaCp.Designer.cs | 4554 +++++++++++++++++ .../20241202134603_AddBattleArenaCp.cs | 37 + .../NineChroniclesContextModelSnapshot.cs | 6 + .../DataRendering/BattleArenaData.cs | 3 + .../Store/Models/BattleArenaModel.cs | 4 + 5 files changed, 4604 insertions(+) create mode 100644 NineChronicles.DataProvider.Executable/Migrations/20241202134603_AddBattleArenaCp.Designer.cs create mode 100644 NineChronicles.DataProvider.Executable/Migrations/20241202134603_AddBattleArenaCp.cs diff --git a/NineChronicles.DataProvider.Executable/Migrations/20241202134603_AddBattleArenaCp.Designer.cs b/NineChronicles.DataProvider.Executable/Migrations/20241202134603_AddBattleArenaCp.Designer.cs new file mode 100644 index 00000000..a3a418fe --- /dev/null +++ b/NineChronicles.DataProvider.Executable/Migrations/20241202134603_AddBattleArenaCp.Designer.cs @@ -0,0 +1,4554 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using NineChronicles.DataProvider.Store; + +#nullable disable + +namespace NineChronicles.DataProvider.Executable.Migrations +{ + [DbContext(typeof(NineChroniclesContext))] + [Migration("20241202134603_AddBattleArenaCp")] + partial class AddBattleArenaCp + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AbilityRankingModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("AbilityRanking"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ActivateCollectionModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ActionId") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("AvatarAddress") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("CollectionId") + .HasColumnType("int"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarAddress", "CollectionId") + .IsUnique(); + + b.ToTable("ActivateCollections"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossChallengeModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EndFloor") + .HasColumnType("int"); + + b.Property("Point") + .HasColumnType("int"); + + b.Property("Season") + .HasColumnType("bigint"); + + b.Property("StartFloor") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TotalPoint") + .HasColumnType("bigint"); + + b.Property("UsedApPotion") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("AdventureBossChallenge"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossClaimRewardModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("ClaimedSeason") + .HasColumnType("longtext"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("NcgReward") + .HasColumnType("decimal(65,30)"); + + b.Property("RewardData") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("AdventureBossClaimReward"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossRushModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EndFloor") + .HasColumnType("int"); + + b.Property("Point") + .HasColumnType("int"); + + b.Property("Season") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TotalPoint") + .HasColumnType("bigint"); + + b.Property("UsedApPotion") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("AdventureBossRush"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossSeasonModel", b => + { + b.Property("Season") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("BossId") + .HasColumnType("int"); + + b.Property("ClaimableBlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EndBlockIndex") + .HasColumnType("bigint"); + + b.Property("FixedRewardData") + .HasColumnType("longtext"); + + b.Property("NextSeasonBlockIndex") + .HasColumnType("bigint"); + + b.Property("RaffleReward") + .HasColumnType("decimal(65,30)"); + + b.Property("RaffleWinnerAddress") + .HasColumnType("varchar(255)"); + + b.Property("RandomRewardData") + .HasColumnType("longtext"); + + b.Property("StartBlockIndex") + .HasColumnType("bigint"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Season"); + + b.HasIndex("RaffleWinnerAddress"); + + b.ToTable("AdventureBossSeason"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossUnlockFloorModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Season") + .HasColumnType("bigint"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TotalUsedGoldenDust") + .HasColumnType("bigint"); + + b.Property("TotalUsedNcg") + .HasColumnType("decimal(65,30)"); + + b.Property("UnlockFloor") + .HasColumnType("int"); + + b.Property("UsedGoldenDust") + .HasColumnType("bigint"); + + b.Property("UsedNcg") + .HasColumnType("decimal(65,30)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("AdventureBossUnlockFloor"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossWantedModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Bounty") + .HasColumnType("decimal(65,30)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Season") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TotalBounty") + .HasColumnType("decimal(65,30)"); + + b.HasKey("Id"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("AdventureBossWanted"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AgentModel", b => + { + b.Property("Address") + .HasColumnType("varchar(255)"); + + b.HasKey("Address"); + + b.ToTable("Agents"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ApprovePledgeModel", b => + { + b.Property("TxId") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("PatronAddress") + .HasColumnType("longtext"); + + b.Property("Signer") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("TxId"); + + b.HasIndex("Date"); + + b.ToTable("ApprovePledges"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AuraSummonFailModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Exception") + .HasColumnType("longtext"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.Property("SummonCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("AuraSummonFails"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AuraSummonModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.Property("SummonCount") + .HasColumnType("int"); + + b.Property("SummonResult") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("AuraSummons"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AvatarModel", b => + { + b.Property("Address") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Timestamp") + .HasColumnType("datetime(6)"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.HasKey("Address"); + + b.HasIndex("AgentAddress"); + + b.ToTable("Avatars"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.BattleArenaModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("ChampionshipId") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EnemyAvatarAddress") + .HasColumnType("longtext"); + + b.Property("EnemyCp") + .HasColumnType("int"); + + b.Property("MedalCount") + .HasColumnType("int"); + + b.Property("Round") + .HasColumnType("int"); + + b.Property("TicketCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("Victory") + .HasColumnType("tinyint(1)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("BattleArenas"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.BattleArenaRankingModel", b => + { + b.Property("AdditionalTicketPrice") + .HasColumnType("bigint"); + + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArenaType") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("ChampionshipId") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EndBlockIndex") + .HasColumnType("bigint"); + + b.Property("EntranceFee") + .HasColumnType("bigint"); + + b.Property("LossCount") + .HasColumnType("int"); + + b.Property("MedalCount") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("PurchasedTicketCount") + .HasColumnType("int"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("RequiredMedalCount") + .HasColumnType("int"); + + b.Property("Round") + .HasColumnType("int"); + + b.Property("Score") + .HasColumnType("int"); + + b.Property("StartBlockIndex") + .HasColumnType("bigint"); + + b.Property("Ticket") + .HasColumnType("int"); + + b.Property("TicketPrice") + .HasColumnType("bigint"); + + b.Property("TicketResetCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.Property("WinCount") + .HasColumnType("int"); + + b.ToTable("BattleArenaRanking"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.BattleGrandFinaleModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("datetime(6)"); + + b.Property("EnemyAvatarAddress") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("GrandFinaleId") + .HasColumnType("int"); + + b.Property("GrandFinaleScore") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("Victory") + .HasColumnType("tinyint(1)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("BattleGrandFinales"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.BlockModel", b => + { + b.Property("Hash") + .HasColumnType("varchar(255)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Difficulty") + .HasColumnType("bigint"); + + b.Property("Index") + .HasColumnType("bigint"); + + b.Property("Miner") + .HasColumnType("longtext"); + + b.Property("Nonce") + .HasColumnType("longtext"); + + b.Property("PreviousHash") + .HasColumnType("longtext"); + + b.Property("ProtocolVersion") + .HasColumnType("int"); + + b.Property("PublicKey") + .HasColumnType("longtext"); + + b.Property("StateRootHash") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TotalDifficulty") + .HasColumnType("bigint"); + + b.Property("TxCount") + .HasColumnType("int"); + + b.Property("TxHash") + .HasColumnType("longtext"); + + b.HasKey("Hash"); + + b.HasIndex("Date"); + + b.HasIndex("Index"); + + b.ToTable("Blocks"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Claim.ClaimGiftsModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("GiftId") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("ClaimGifts"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ClaimStakeRewardModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("ApPotionCount") + .HasColumnType("int"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("ClaimRewardAvatarAddress") + .HasColumnType("longtext"); + + b.Property("ClaimStakeEndBlockIndex") + .HasColumnType("bigint"); + + b.Property("ClaimStakeStartBlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("HourGlassCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("Date"); + + b.ToTable("ClaimStakeRewards"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.CombinationConsumableModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("RecipeId") + .HasColumnType("int"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("CombinationConsumables"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.CombinationEquipmentModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("OptionCount") + .HasColumnType("int"); + + b.Property("RecipeId") + .HasColumnType("int"); + + b.Property("SkillContains") + .HasColumnType("tinyint(1)"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("SubRecipeId") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("CombinationEquipments"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Crafting.CustomEquipmentCraftCountModel", b => + { + b.Property("IconId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Count") + .HasColumnType("bigint"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.HasKey("IconId"); + + b.ToTable("CustomEquipmentCraftCount"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Crafting.CustomEquipmentCraftModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AdditionalCost") + .HasColumnType("longtext"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Circle") + .HasColumnType("int"); + + b.Property("CraftWithRandom") + .HasColumnType("tinyint(1)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("EquipmentItemId") + .HasColumnType("int"); + + b.Property("HasRandomOnlyIcon") + .HasColumnType("tinyint(1)"); + + b.Property("IconId") + .HasColumnType("int"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("NcgCost") + .HasColumnType("decimal(65,30)"); + + b.Property("OptionId") + .HasColumnType("int"); + + b.Property("RecipeId") + .HasColumnType("int"); + + b.Property("Relationship") + .HasColumnType("int"); + + b.Property("Scroll") + .HasColumnType("int"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TotalCP") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("CustomEquipmentCraft"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Crafting.RapidCombinationModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("HourglassCount") + .HasColumnType("int"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("RapidCombinations"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Crafting.UnlockCombinationSlotModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("CrystalCost") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("MaterialCosts") + .HasColumnType("longtext"); + + b.Property("NcgCost") + .HasColumnType("decimal(65,30)"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("UnlockCombinationSlot"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.CraftRankingModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("CraftCount") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("CraftRankings"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.DailyMetricModel", b => + { + b.Property("Date") + .HasColumnType("date"); + + b.Property("ApUsage") + .HasColumnType("int"); + + b.Property("ArenaNcg") + .HasColumnType("decimal(65,30)"); + + b.Property("AuraSummonCount") + .HasColumnType("int"); + + b.Property("CraftingConsumableCount") + .HasColumnType("int"); + + b.Property("CraftingConsumableUsers") + .HasColumnType("int"); + + b.Property("CraftingEquipmentCount") + .HasColumnType("int"); + + b.Property("CraftingEquipmentUsers") + .HasColumnType("int"); + + b.Property("DailyNew") + .HasColumnType("int"); + + b.Property("Dau") + .HasColumnType("int"); + + b.Property("EnhanceCount") + .HasColumnType("int"); + + b.Property("EnhanceNcg") + .HasColumnType("decimal(65,30)"); + + b.Property("EnhanceUsers") + .HasColumnType("int"); + + b.Property("EventTicketNcg") + .HasColumnType("decimal(65,30)"); + + b.Property("HackAndSlashCount") + .HasColumnType("int"); + + b.Property("HackAndSlashUsers") + .HasColumnType("int"); + + b.Property("HourglassUsage") + .HasColumnType("int"); + + b.Property("NcgTrade") + .HasColumnType("decimal(65,30)"); + + b.Property("RuneNcg") + .HasColumnType("decimal(65,30)"); + + b.Property("RuneSlotNcg") + .HasColumnType("decimal(65,30)"); + + b.Property("RuneSummonCount") + .HasColumnType("int"); + + b.Property("SweepCount") + .HasColumnType("int"); + + b.Property("SweepUsers") + .HasColumnType("int"); + + b.Property("TxCount") + .HasColumnType("int"); + + b.HasKey("Date"); + + b.HasIndex("Date"); + + b.ToTable("DailyMetrics"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.EquipmentModel", b => + { + b.Property("ItemId") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("ItemId"); + + b.ToTable("Equipments"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.EventConsumableItemCraftsModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EventConsumableItemRecipeId") + .HasColumnType("int"); + + b.Property("EventScheduleId") + .HasColumnType("int"); + + b.Property("RequiredItem1Count") + .HasColumnType("int"); + + b.Property("RequiredItem1Id") + .HasColumnType("int"); + + b.Property("RequiredItem2Count") + .HasColumnType("int"); + + b.Property("RequiredItem2Id") + .HasColumnType("int"); + + b.Property("RequiredItem3Count") + .HasColumnType("int"); + + b.Property("RequiredItem3Id") + .HasColumnType("int"); + + b.Property("RequiredItem4Count") + .HasColumnType("int"); + + b.Property("RequiredItem4Id") + .HasColumnType("int"); + + b.Property("RequiredItem5Count") + .HasColumnType("int"); + + b.Property("RequiredItem5Id") + .HasColumnType("int"); + + b.Property("RequiredItem6Count") + .HasColumnType("int"); + + b.Property("RequiredItem6Id") + .HasColumnType("int"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("Timestamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("EventConsumableItemCrafts"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.EventDungeonBattleModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("Cleared") + .HasColumnType("tinyint(1)"); + + b.Property("CostumesCount") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EquipmentsCount") + .HasColumnType("int"); + + b.Property("EventDungeonId") + .HasColumnType("int"); + + b.Property("EventDungeonStageId") + .HasColumnType("int"); + + b.Property("EventScheduleId") + .HasColumnType("int"); + + b.Property("FoodsCount") + .HasColumnType("int"); + + b.Property("RemainingTickets") + .HasColumnType("int"); + + b.Property("RewardItem10Count") + .HasColumnType("int"); + + b.Property("RewardItem10Id") + .HasColumnType("int"); + + b.Property("RewardItem1Count") + .HasColumnType("int"); + + b.Property("RewardItem1Id") + .HasColumnType("int"); + + b.Property("RewardItem2Count") + .HasColumnType("int"); + + b.Property("RewardItem2Id") + .HasColumnType("int"); + + b.Property("RewardItem3Count") + .HasColumnType("int"); + + b.Property("RewardItem3Id") + .HasColumnType("int"); + + b.Property("RewardItem4Count") + .HasColumnType("int"); + + b.Property("RewardItem4Id") + .HasColumnType("int"); + + b.Property("RewardItem5Count") + .HasColumnType("int"); + + b.Property("RewardItem5Id") + .HasColumnType("int"); + + b.Property("RewardItem6Count") + .HasColumnType("int"); + + b.Property("RewardItem6Id") + .HasColumnType("int"); + + b.Property("RewardItem7Count") + .HasColumnType("int"); + + b.Property("RewardItem7Id") + .HasColumnType("int"); + + b.Property("RewardItem8Count") + .HasColumnType("int"); + + b.Property("RewardItem8Id") + .HasColumnType("int"); + + b.Property("RewardItem9Count") + .HasColumnType("int"); + + b.Property("RewardItem9Id") + .HasColumnType("int"); + + b.Property("Timestamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("EventDungeonBattles"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.EventMaterialItemCraftsModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("datetime(6)"); + + b.Property("EventMaterialItemRecipeId") + .HasColumnType("int"); + + b.Property("EventScheduleId") + .HasColumnType("int"); + + b.Property("Material10Count") + .HasColumnType("int"); + + b.Property("Material10Id") + .HasColumnType("int"); + + b.Property("Material11Count") + .HasColumnType("int"); + + b.Property("Material11Id") + .HasColumnType("int"); + + b.Property("Material12Count") + .HasColumnType("int"); + + b.Property("Material12Id") + .HasColumnType("int"); + + b.Property("Material1Count") + .HasColumnType("int"); + + b.Property("Material1Id") + .HasColumnType("int"); + + b.Property("Material2Count") + .HasColumnType("int"); + + b.Property("Material2Id") + .HasColumnType("int"); + + b.Property("Material3Count") + .HasColumnType("int"); + + b.Property("Material3Id") + .HasColumnType("int"); + + b.Property("Material4Count") + .HasColumnType("int"); + + b.Property("Material4Id") + .HasColumnType("int"); + + b.Property("Material5Count") + .HasColumnType("int"); + + b.Property("Material5Id") + .HasColumnType("int"); + + b.Property("Material6Count") + .HasColumnType("int"); + + b.Property("Material6Id") + .HasColumnType("int"); + + b.Property("Material7Count") + .HasColumnType("int"); + + b.Property("Material7Id") + .HasColumnType("int"); + + b.Property("Material8Count") + .HasColumnType("int"); + + b.Property("Material8Id") + .HasColumnType("int"); + + b.Property("Material9Count") + .HasColumnType("int"); + + b.Property("Material9Id") + .HasColumnType("int"); + + b.Property("Timestamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("EventMaterialItemCrafts"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Grinding.GrindingModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Crystal") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("EquipmentItemId") + .HasColumnType("longtext"); + + b.Property("EquipmentLevel") + .HasColumnType("int"); + + b.Property("Materials") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("Grindings"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HackAndSlashModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Cleared") + .HasColumnType("tinyint(1)"); + + b.Property("CurrentLevel") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Mimisbrunnr") + .HasColumnType("tinyint(1)"); + + b.Property("StageId") + .HasColumnType("int"); + + b.Property("Timestamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("HackAndSlashes"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HackAndSlashSweepModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("ActionPoint") + .HasColumnType("int"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("ApStoneCount") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Cleared") + .HasColumnType("tinyint(1)"); + + b.Property("CostumesCount") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EquipmentsCount") + .HasColumnType("int"); + + b.Property("Mimisbrunnr") + .HasColumnType("tinyint(1)"); + + b.Property("StageId") + .HasColumnType("int"); + + b.Property("Timestamp") + .HasColumnType("datetime(6)"); + + b.Property("WorldId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("HackAndSlashSweeps"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HasRandomBuffModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntCrystal") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("GachaCount") + .HasColumnType("int"); + + b.Property("HasStageId") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("HasRandomBuffs"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HasWithRandomBuffModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuffId") + .HasColumnType("int"); + + b.Property("Cleared") + .HasColumnType("tinyint(1)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("StageId") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("HasWithRandomBuffs"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ItemEnhancementFailModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("EquipmentItemId") + .HasColumnType("longtext"); + + b.Property("EquipmentLevel") + .HasColumnType("int"); + + b.Property("GainedCrystal") + .HasColumnType("decimal(65,30)"); + + b.Property("MaterialIdsCount") + .HasColumnType("int"); + + b.Property("MaterialItemId") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("ItemEnhancementFails"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ItemEnhancementModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Exp") + .HasColumnType("bigint"); + + b.Property("HammerCount") + .HasColumnType("int"); + + b.Property("HammerExp") + .HasColumnType("bigint"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("MaterialId") + .HasColumnType("longtext"); + + b.Property("MaterialIdsCount") + .HasColumnType("int"); + + b.Property("SheetId") + .HasColumnType("int"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("ItemEnhancements"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.JoinArenaModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("ArenaRound") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntCrystal") + .HasColumnType("decimal(65,30)"); + + b.Property("ChampionshipId") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("JoinArenas"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.MigrateMonsterCollectionModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("MigrationAmount") + .HasColumnType("decimal(65,30)"); + + b.Property("MigrationStartBlockIndex") + .HasColumnType("bigint"); + + b.Property("StakeStartBlockIndex") + .HasColumnType("bigint"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("Date"); + + b.ToTable("MigrateMonsterCollections"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.PetEnhancementModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("BurntSoulStone") + .HasColumnType("decimal(65,30)"); + + b.Property("ChangedLevel") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("OutputPetLevel") + .HasColumnType("int"); + + b.Property("PetId") + .HasColumnType("int"); + + b.Property("PreviousPetLevel") + .HasColumnType("int"); + + b.Property("TargetLevel") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("PetEnhancements"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RaiderModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Address") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("AvatarName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("HighScore") + .HasColumnType("bigint"); + + b.Property("IconId") + .HasColumnType("int"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("PurchaseCount") + .HasColumnType("int"); + + b.Property("RaidId") + .HasColumnType("int"); + + b.Property("TotalScore") + .HasColumnType("bigint"); + + b.Property("UpdatedAt") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("RaidId", "Address") + .IsUnique(); + + b.ToTable("Raiders"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingArmorModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("EquipmentRankingArmor"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingAuraModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("EquipmentRankingAura"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingBeltModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("EquipmentRankingBelt"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingGrimoireModel", b => + { + b.Property("ItemId") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.HasKey("ItemId"); + + b.ToTable("EquipmentRankingGrimoire"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("EquipmentRanking"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingNecklaceModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("EquipmentRankingNecklace"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingRingModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("EquipmentRankingRing"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Ranking.EquipmentRankingWeaponModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("EquipmentId") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("EquipmentRankingWeapon"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ReplaceCombinationEquipmentMaterialModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntCrystal") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("ReplacedMaterialCount") + .HasColumnType("int"); + + b.Property("ReplacedMaterialId") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("ReplaceCombinationEquipmentMaterials"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RequestPledgeModel", b => + { + b.Property("TxId") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("PledgeAgentAddress") + .HasColumnType("longtext"); + + b.Property("RefillMead") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TxSigner") + .HasColumnType("longtext"); + + b.HasKey("TxId"); + + b.HasIndex("Date"); + + b.ToTable("RequestPledges"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RuneEnhancementModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntCrystal") + .HasColumnType("decimal(65,30)"); + + b.Property("BurntNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("BurntRune") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("OutputRuneLevel") + .HasColumnType("int"); + + b.Property("OutputRuneLevelBonus") + .HasColumnType("int"); + + b.Property("PreviousRuneLevel") + .HasColumnType("int"); + + b.Property("PreviousRuneLevelBonus") + .HasColumnType("int"); + + b.Property("RuneId") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TryCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("RuneEnhancements"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RunesAcquiredModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("ActionType") + .HasColumnType("varchar(255)"); + + b.Property("TickerType") + .HasColumnType("varchar(255)"); + + b.Property("AcquiredRune") + .HasColumnType("decimal(65,30)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id", "ActionType", "TickerType"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.HasIndex("Id", "ActionType", "TickerType") + .IsUnique(); + + b.ToTable("RunesAcquired"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RuneSummonFailModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Exception") + .HasColumnType("longtext"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.Property("SummonCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("RuneSummonFails"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RuneSummonModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.Property("SummonCount") + .HasColumnType("int"); + + b.Property("SummonResult") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("RuneSummons"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopConsumableModel", b => + { + b.Property("ItemId") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuffSkillCount") + .HasColumnType("int"); + + b.Property("CombatPoint") + .HasColumnType("int"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("MainStat") + .HasColumnType("longtext"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("OrderId") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellExpiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellStartedBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellerAgentAddress") + .HasColumnType("longtext"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("SkillsCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.HasKey("ItemId"); + + b.ToTable("ShopConsumables"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopCostumeModel", b => + { + b.Property("ItemId") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("CombatPoint") + .HasColumnType("int"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Equipped") + .HasColumnType("tinyint(1)"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("OrderId") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellExpiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellStartedBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellerAgentAddress") + .HasColumnType("longtext"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("SpineResourcePath") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.HasKey("ItemId"); + + b.ToTable("ShopCostumes"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopEquipmentModel", b => + { + b.Property("ItemId") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuffSkillCount") + .HasColumnType("int"); + + b.Property("CombatPoint") + .HasColumnType("int"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("OrderId") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellExpiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellStartedBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellerAgentAddress") + .HasColumnType("longtext"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("SetId") + .HasColumnType("int"); + + b.Property("SkillsCount") + .HasColumnType("int"); + + b.Property("SpineResourcePath") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.Property("UniqueStatType") + .HasColumnType("longtext"); + + b.HasKey("ItemId"); + + b.ToTable("ShopEquipments"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopHistoryConsumableModel", b => + { + b.Property("OrderId") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuffSkillCount") + .HasColumnType("int"); + + b.Property("BuyerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("MainStat") + .HasColumnType("longtext"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("SkillsCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.Property("TxId") + .HasColumnType("longtext"); + + b.HasKey("OrderId"); + + b.HasIndex("Date"); + + b.ToTable("ShopHistoryConsumables"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopHistoryCostumeModel", b => + { + b.Property("OrderId") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuyerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Equipped") + .HasColumnType("tinyint(1)"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("SpineResourcePath") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.Property("TxId") + .HasColumnType("longtext"); + + b.HasKey("OrderId"); + + b.HasIndex("Date"); + + b.ToTable("ShopHistoryCostumes"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopHistoryEquipmentModel", b => + { + b.Property("OrderId") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuffSkillCount") + .HasColumnType("int"); + + b.Property("BuyerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("SetId") + .HasColumnType("int"); + + b.Property("SkillsCount") + .HasColumnType("int"); + + b.Property("SpineResourcePath") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.Property("TxId") + .HasColumnType("longtext"); + + b.Property("UniqueStatType") + .HasColumnType("longtext"); + + b.HasKey("OrderId"); + + b.HasIndex("Date"); + + b.ToTable("ShopHistoryEquipments"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopHistoryFungibleAssetValueModel", b => + { + b.Property("OrderId") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuyerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("Quantity") + .HasColumnType("decimal(65,30)"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("Ticker") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TxId") + .HasColumnType("longtext"); + + b.HasKey("OrderId"); + + b.HasIndex("Date"); + + b.ToTable("ShopHistoryFungibleAssetValues"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopHistoryMaterialModel", b => + { + b.Property("OrderId") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuyerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TxId") + .HasColumnType("longtext"); + + b.HasKey("OrderId"); + + b.HasIndex("Date"); + + b.ToTable("ShopHistoryMaterials"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ShopMaterialModel", b => + { + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("CombatPoint") + .HasColumnType("int"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemCount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("OrderId") + .HasColumnType("longtext"); + + b.Property("Price") + .HasColumnType("decimal(65,30)"); + + b.Property("SellExpiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellStartedBlockIndex") + .HasColumnType("bigint"); + + b.Property("SellerAgentAddress") + .HasColumnType("longtext"); + + b.Property("SellerAvatarAddress") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.ToTable("ShopMaterials"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.StageRankingModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("ArmorId") + .HasColumnType("int"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("AvatarLevel") + .HasColumnType("int"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("ClearedStageId") + .HasColumnType("int"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TitleId") + .HasColumnType("int"); + + b.ToTable("StageRanking"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.StakeModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("NewAmount") + .HasColumnType("decimal(65,30)"); + + b.Property("NewStakeStartBlockIndex") + .HasColumnType("bigint"); + + b.Property("PrevStakeStartBlockIndex") + .HasColumnType("bigint"); + + b.Property("PreviousAmount") + .HasColumnType("decimal(65,30)"); + + b.Property("RemainingNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("Date"); + + b.ToTable("Stakings"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.TransactionModel", b => + { + b.Property("TxId") + .HasColumnType("varchar(255)"); + + b.Property("ActionType") + .HasColumnType("varchar(255)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("datetime(6)"); + + b.Property("Nonce") + .HasColumnType("bigint"); + + b.Property("PublicKey") + .HasColumnType("longtext"); + + b.Property("Signer") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("UpdatedAddressesCount") + .HasColumnType("int"); + + b.HasKey("TxId"); + + b.HasIndex("Date"); + + b.HasIndex(new[] { "Date", "ActionType" }, "IDX_Date_ActionType"); + + b.ToTable("Transactions"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.TransferAssetModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("Amount") + .HasColumnType("decimal(65,30)"); + + b.Property("BlockHash") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Recipient") + .HasColumnType("longtext"); + + b.Property("Sender") + .HasColumnType("longtext"); + + b.Property("TickerType") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TxId") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Date"); + + b.ToTable("TransferAssets"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UnlockEquipmentRecipeModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntCrystal") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("UnlockEquipmentRecipeId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("UnlockEquipmentRecipes"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UnlockRuneSlotModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntCRYSTAL") + .HasColumnType("decimal(65,30)"); + + b.Property("BurntNCG") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("SlotIndex") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("UnlockRuneSlots"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UnlockWorldModel", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BurntCrystal") + .HasColumnType("decimal(65,30)"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("UnlockWorldId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.HasIndex("Date"); + + b.ToTable("UnlockWorlds"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserConsumablesModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuffSkillCount") + .HasColumnType("int"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("MainStat") + .HasColumnType("longtext"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SkillsCount") + .HasColumnType("int"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("UserConsumables"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserCostumesModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Equipped") + .HasColumnType("tinyint(1)"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SpineResourcePath") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("UserCostumes"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserCrystalsModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("CrystalBalance") + .HasColumnType("decimal(65,30)"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasIndex("AgentAddress"); + + b.ToTable("UserCrystals"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserEquipmentsModel", b => + { + b.Property("AgentAddress") + .HasColumnType("longtext"); + + b.Property("AvatarAddress") + .HasColumnType("longtext"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("BuffSkillCount") + .HasColumnType("int"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("NonFungibleId") + .HasColumnType("longtext"); + + b.Property("RequiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("SetId") + .HasColumnType("int"); + + b.Property("SkillsCount") + .HasColumnType("int"); + + b.Property("SpineResourcePath") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.Property("TradableId") + .HasColumnType("longtext"); + + b.Property("UniqueStatType") + .HasColumnType("longtext"); + + b.ToTable("UserEquipments"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserMaterialsModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("ElementalType") + .HasColumnType("longtext"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("Id") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("longtext"); + + b.Property("ItemSubType") + .HasColumnType("longtext"); + + b.Property("ItemType") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("UserMaterials"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserMonsterCollectionsModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("ExpiredBlockIndex") + .HasColumnType("bigint"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("MonsterCollectionAmount") + .HasColumnType("decimal(65,30)"); + + b.Property("ReceivedBlockIndex") + .HasColumnType("bigint"); + + b.Property("RewardLevel") + .HasColumnType("bigint"); + + b.Property("StartedBlockIndex") + .HasColumnType("bigint"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasIndex("AgentAddress"); + + b.ToTable("UserMonsterCollections"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserNCGsModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("NCGBalance") + .HasColumnType("decimal(65,30)"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasIndex("AgentAddress"); + + b.ToTable("UserNCGs"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserRunesModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("AvatarAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("RuneBalance") + .HasColumnType("decimal(65,30)"); + + b.Property("Ticker") + .HasColumnType("longtext"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasIndex("AgentAddress"); + + b.HasIndex("AvatarAddress"); + + b.ToTable("UserRunes"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserStakingsModel", b => + { + b.Property("AgentAddress") + .HasColumnType("varchar(255)"); + + b.Property("BlockIndex") + .HasColumnType("bigint"); + + b.Property("CancellableBlockIndex") + .HasColumnType("bigint"); + + b.Property("ReceivedBlockIndex") + .HasColumnType("bigint"); + + b.Property("StakeAmount") + .HasColumnType("decimal(65,30)"); + + b.Property("StartedBlockIndex") + .HasColumnType("bigint"); + + b.Property("TimeStamp") + .HasColumnType("datetime(6)"); + + b.HasIndex("AgentAddress"); + + b.ToTable("UserStakings"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.WorldBossRankingModel", b => + { + b.Property("Address") + .HasColumnType("longtext"); + + b.Property("AvatarName") + .HasColumnType("longtext"); + + b.Property("Cp") + .HasColumnType("int"); + + b.Property("HighScore") + .HasColumnType("bigint"); + + b.Property("IconId") + .HasColumnType("int"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Ranking") + .HasColumnType("int"); + + b.Property("TotalScore") + .HasColumnType("bigint"); + + b.ToTable("WorldBossRankings", null, t => t.ExcludeFromMigrations()); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.WorldBossSeasonMigrationModel", b => + { + b.Property("RaidId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("MigratedAt") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.HasKey("RaidId"); + + b.HasIndex("RaidId") + .IsUnique(); + + b.ToTable("WorldBossSeasonMigrationModels"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ActivateCollectionModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany("ActivateCollections") + .HasForeignKey("AvatarAddress") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsMany("NineChronicles.DataProvider.Store.Models.CollectionOptionModel", "Options", b1 => + { + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("ActivateCollectionId") + .HasColumnType("int"); + + b1.Property("OperationType") + .IsRequired() + .HasColumnType("longtext"); + + b1.Property("StatType") + .IsRequired() + .HasColumnType("longtext"); + + b1.Property("Value") + .HasColumnType("bigint"); + + b1.HasKey("Id"); + + b1.HasIndex("ActivateCollectionId"); + + b1.ToTable("CollectionOptionModel"); + + b1.WithOwner() + .HasForeignKey("ActivateCollectionId"); + }); + + b.Navigation("Avatar"); + + b.Navigation("Options"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossChallengeModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossClaimRewardModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossRushModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossSeasonModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "RaffleWinner") + .WithMany() + .HasForeignKey("RaffleWinnerAddress"); + + b.Navigation("RaffleWinner"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossUnlockFloorModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AdventureBoss.AdventureBossWantedModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AuraSummonFailModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AuraSummonModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AvatarModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.BattleArenaModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.BattleGrandFinaleModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Claim.ClaimGiftsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ClaimStakeRewardModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.CombinationConsumableModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.CombinationEquipmentModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Crafting.CustomEquipmentCraftModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Crafting.RapidCombinationModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Crafting.UnlockCombinationSlotModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.EventConsumableItemCraftsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.EventDungeonBattleModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.EventMaterialItemCraftsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.Grinding.GrindingModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HackAndSlashModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HackAndSlashSweepModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HasRandomBuffModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.HasWithRandomBuffModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ItemEnhancementFailModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ItemEnhancementModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.JoinArenaModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.MigrateMonsterCollectionModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.PetEnhancementModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.ReplaceCombinationEquipmentMaterialModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RuneEnhancementModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RunesAcquiredModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RuneSummonFailModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.RuneSummonModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.StakeModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UnlockEquipmentRecipeModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UnlockRuneSlotModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UnlockWorldModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserConsumablesModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserCostumesModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserCrystalsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserMaterialsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserMonsterCollectionsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserNCGsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserRunesModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.HasOne("NineChronicles.DataProvider.Store.Models.AvatarModel", "Avatar") + .WithMany() + .HasForeignKey("AvatarAddress"); + + b.Navigation("Agent"); + + b.Navigation("Avatar"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.UserStakingsModel", b => + { + b.HasOne("NineChronicles.DataProvider.Store.Models.AgentModel", "Agent") + .WithMany() + .HasForeignKey("AgentAddress"); + + b.Navigation("Agent"); + }); + + modelBuilder.Entity("NineChronicles.DataProvider.Store.Models.AvatarModel", b => + { + b.Navigation("ActivateCollections"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/NineChronicles.DataProvider.Executable/Migrations/20241202134603_AddBattleArenaCp.cs b/NineChronicles.DataProvider.Executable/Migrations/20241202134603_AddBattleArenaCp.cs new file mode 100644 index 00000000..e38caa56 --- /dev/null +++ b/NineChronicles.DataProvider.Executable/Migrations/20241202134603_AddBattleArenaCp.cs @@ -0,0 +1,37 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace NineChronicles.DataProvider.Executable.Migrations +{ + public partial class AddBattleArenaCp : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Cp", + table: "BattleArenas", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "EnemyCp", + table: "BattleArenas", + type: "int", + nullable: false, + defaultValue: 0); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Cp", + table: "BattleArenas"); + + migrationBuilder.DropColumn( + name: "EnemyCp", + table: "BattleArenas"); + } + } +} diff --git a/NineChronicles.DataProvider.Executable/Migrations/NineChroniclesContextModelSnapshot.cs b/NineChronicles.DataProvider.Executable/Migrations/NineChroniclesContextModelSnapshot.cs index 11a5af2f..a8867c67 100644 --- a/NineChronicles.DataProvider.Executable/Migrations/NineChroniclesContextModelSnapshot.cs +++ b/NineChronicles.DataProvider.Executable/Migrations/NineChroniclesContextModelSnapshot.cs @@ -494,12 +494,18 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ChampionshipId") .HasColumnType("int"); + b.Property("Cp") + .HasColumnType("int"); + b.Property("Date") .HasColumnType("date"); b.Property("EnemyAvatarAddress") .HasColumnType("longtext"); + b.Property("EnemyCp") + .HasColumnType("int"); + b.Property("MedalCount") .HasColumnType("int"); diff --git a/NineChronicles.DataProvider/DataRendering/BattleArenaData.cs b/NineChronicles.DataProvider/DataRendering/BattleArenaData.cs index 0c15c37d..7f2fbdfe 100644 --- a/NineChronicles.DataProvider/DataRendering/BattleArenaData.cs +++ b/NineChronicles.DataProvider/DataRendering/BattleArenaData.cs @@ -34,6 +34,7 @@ DateTimeOffset blockTime ArenaScore.DeriveAddress(myAvatarAddress, championshipId, round); previousStates.TryGetArenaScore(myArenaScoreAdr, out var previousArenaScore); var arenaParticipant = outputStates.GetArenaParticipant(championshipId, round, myAvatarAddress); + var enemyArenaParticipant = outputStates.GetArenaParticipant(championshipId, round, enemyAvatarAddress); Currency ncgCurrency = outputStates.GetGoldCurrency(); var prevNCGBalance = previousStates.GetBalance( signer, @@ -76,6 +77,8 @@ DateTimeOffset blockTime MedalCount = medalCount, Date = DateOnly.FromDateTime(blockTime.DateTime), TimeStamp = blockTime, + Cp = arenaParticipant.Cp, + EnemyCp = enemyArenaParticipant.Cp, }; return battleArenaModel; diff --git a/NineChronicles.DataProvider/Store/Models/BattleArenaModel.cs b/NineChronicles.DataProvider/Store/Models/BattleArenaModel.cs index 1d4b58f3..8fb1f0f0 100644 --- a/NineChronicles.DataProvider/Store/Models/BattleArenaModel.cs +++ b/NineChronicles.DataProvider/Store/Models/BattleArenaModel.cs @@ -40,5 +40,9 @@ public class BattleArenaModel public DateOnly Date { get; set; } public DateTimeOffset TimeStamp { get; set; } + + public int Cp { get; set; } + + public int EnemyCp { get; set; } } } From a20e4fac36a513799519b83cc54eb27fa295db9e Mon Sep 17 00:00:00 2001 From: Yang Chun Ung Date: Mon, 2 Dec 2024 22:50:30 +0900 Subject: [PATCH 6/6] Push docker image --- .github/workflows/push_docker_image.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/push_docker_image.yml b/.github/workflows/push_docker_image.yml index 28a5708c..2137a075 100644 --- a/.github/workflows/push_docker_image.yml +++ b/.github/workflows/push_docker_image.yml @@ -8,6 +8,7 @@ on: - rc-* - 2023q1-previewnet - release/* + - feature/irregular-alarm tags: - "*"