diff --git a/README.md b/README.md index 225d9eb..9fc5f15 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,13 @@ A server emulator which allows you to play older versions of warframe,through to This work is based off of the SpaceNinjaServer project, with additional reverse engineering in order to accommodate the different endpoint structures. Currently using .net9 and sqlite for persistence, linux and windows are both supported and builds are self contained, so no runtime install is necessary. +# Getting started + +Unzip the pacakge, double click the exec, connect via localhost:5001 (or 5000, I can't remmber). The db is now created for you and migrations should be totally automatic. + + + + # Currently Tested Versions | Version | Build Id | Manifest Id| Items not working? | Notes | @@ -39,13 +46,13 @@ This is not a comprehensive list of features, just the ones that really seem to | Initial Training and Warframe Selection | Gameplay || Fully || | Complete Mastery Rank Challenges| Gameplay || Fully || | Attach system wide artifact| Gameplay || Fully |This is not actually an api endpoint, but instead relies on returnign inventory correctly| -| Obtain daily login reward| || Fully | This is customizable and uses older documentation for the rewards listing. Current state drop table percentage is not period accurate | -| Get the world state | || Partially | Can be configured via db, alerts work for the most part. operations are not implemented| -| Validate daily mission bonus status| || Fully | | -| purchase more revives || Fully || -| update taunt state | ||Fully*| There may be a bug surrounding the initial lotus explanation after completing training | +| Obtain daily login reward| Gameplay || Fully | This is customizable and uses older documentation for the rewards listing. Current state drop table percentage is not period accurate | +| Get the world state | Gameplay || Partially | Can be configured via db, alerts work for the most part. operations are not implemented| +| Validate daily mission bonus status| Gameplay || Fully | | +| purchase more revives | Economy || Fully || +| update taunt state | Gameplay ||Fully*| There may be a bug surrounding the initial lotus explanation after completing training | | Get updated credits/plat| Economy || Fully || -| Purchase Item | ||Some work started|| +| Purchase Item | Economy ||Some work started|| | Craft item in Foundry | Foundry ||Partial|Not all recipes are parsed / available in db| | Claim Foundry Item|Foundry || Fully || | Instantly complete item in foundry| Foundry || Fully || @@ -63,16 +70,16 @@ This is not a comprehensive list of features, just the ones that really seem to | Send friend request| Friends || Fully || | Remove friend| Friends || Fully || | Approve Friend request | Friends || Fully || -| Get friend listing |Friends || Partial / Unknown | More data might need to be returned. but list works.| +| Get friend listing | Friends || Partial / Unknown | More data might need to be returned. but list works.| | Set player avatar | Friends || Fully || | Get Guild Member Listing |Guild || Very Little | right now has hardcoded return object | -| Create Guild| ||Nothing|| -| Remove member from Guild | ||Nothing|| -| Donate To Guild | ||Nothing|| -| Customize Guild Ranks | ||Nothing|| -| Invite to guild | ||Nothing|| -| Accept guild invite | ||Nothing|| -| change guild rank | ||Nothing|| +| Create Guild| Guild ||Nothing|| +| Remove member from Guild | Guild ||Nothing|| +| Donate To Guild | Guild ||Nothing|| +| Customize Guild Ranks | Guild ||Nothing|| +| Invite to guild | Guild ||Nothing|| +| Accept guild invite | Guild ||Nothing|| +| change guild rank | Guild ||Nothing|| | Get Messages (Api) | ||Nothing| No idea what this is and it might be a vestigial endpoint| | Send Messages (Api) | ||Nothing| No idea what this is and it might be a vestigial endpoint| diff --git a/src/WFClassic.Web/Data/Migrations/20250526203641_AddRewardsSeedData.Designer.cs b/src/WFClassic.Web/Data/Migrations/20250526203641_AddRewardsSeedData.Designer.cs new file mode 100644 index 0000000..49bb9c5 --- /dev/null +++ b/src/WFClassic.Web/Data/Migrations/20250526203641_AddRewardsSeedData.Designer.cs @@ -0,0 +1,1641 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using WFClassic.Web.Data; + +#nullable disable + +namespace WFClassic.Web.Data.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20250526203641_AddRewardsSeedData")] + partial class AddRewardsSeedData + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "9.0.4"); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("TEXT"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClaimType") + .HasColumnType("TEXT"); + + b.Property("ClaimValue") + .HasColumnType("TEXT"); + + b.Property("RoleId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClaimType") + .HasColumnType("TEXT"); + + b.Property("ClaimValue") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasMaxLength(128) + .HasColumnType("TEXT"); + + b.Property("ProviderKey") + .HasMaxLength(128) + .HasColumnType("TEXT"); + + b.Property("ProviderDisplayName") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("TEXT"); + + b.Property("RoleId") + .HasColumnType("TEXT"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("TEXT"); + + b.Property("LoginProvider") + .HasMaxLength(128) + .HasColumnType("TEXT"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("TEXT"); + + b.Property("Value") + .HasColumnType("TEXT"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.AlertConfiguration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("AllowReplay") + .HasColumnType("INTEGER"); + + b.Property("CompleteTag") + .HasColumnType("TEXT"); + + b.Property("CompletionText") + .HasColumnType("TEXT"); + + b.Property("Completions") + .HasColumnType("INTEGER"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("Difficulty") + .HasColumnType("REAL"); + + b.Property("EndDate") + .HasColumnType("TEXT"); + + b.Property("EnemySpec") + .HasColumnType("TEXT"); + + b.Property("Faction") + .HasColumnType("TEXT"); + + b.Property("Icon") + .HasColumnType("TEXT"); + + b.Property("IntroText") + .HasColumnType("TEXT"); + + b.Property("IsActive") + .HasColumnType("INTEGER"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("LevelOverride") + .HasColumnType("TEXT"); + + b.Property("Location") + .HasColumnType("TEXT"); + + b.Property("MaxEnemyLevel") + .HasColumnType("INTEGER"); + + b.Property("MinEnemyLevel") + .HasColumnType("INTEGER"); + + b.Property("MissionType") + .HasColumnType("TEXT"); + + b.Property("Seed") + .HasColumnType("INTEGER"); + + b.Property("StartDate") + .HasColumnType("TEXT"); + + b.Property("UniqueName") + .HasColumnType("TEXT"); + + b.Property("Unlocked") + .HasColumnType("INTEGER"); + + b.Property("VIPAgent") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("AlertConfigurations"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.AlertEnemyConfiguration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("AlertConfigurationId") + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("EnemyId") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("MaxSimultaneous") + .HasColumnType("INTEGER"); + + b.Property("Probability") + .HasColumnType("REAL"); + + b.Property("Tier") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("AlertConfigurationId"); + + b.ToTable("AlertEnemyConfigurations"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.AlertRewardConfiguration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("AlertConfigurationId") + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("Credits") + .HasColumnType("INTEGER"); + + b.Property("ItemsArray") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("RandomizedItems") + .HasColumnType("TEXT"); + + b.Property("RewardProvidedAtLocation") + .HasColumnType("INTEGER"); + + b.Property("Xp") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("AlertConfigurationId"); + + b.ToTable("AlertRewardConfigurations"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.ApplicationUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("AccessFailedCount") + .HasColumnType("INTEGER"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("TEXT"); + + b.Property("CurrentNonce") + .HasColumnType("INTEGER"); + + b.Property("CurrentlyLoggedIn") + .HasColumnType("INTEGER"); + + b.Property("DisplayName") + .HasColumnType("TEXT"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.Property("EmailConfirmed") + .HasColumnType("INTEGER"); + + b.Property("LastLoginTimestamp") + .HasColumnType("TEXT"); + + b.Property("LockoutEnabled") + .HasColumnType("INTEGER"); + + b.Property("LockoutEnd") + .HasColumnType("TEXT"); + + b.Property("LoginStreak") + .HasColumnType("INTEGER"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.Property("PasswordHash") + .HasColumnType("TEXT"); + + b.Property("PhoneNumber") + .HasColumnType("TEXT"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("INTEGER"); + + b.Property("SecurityStamp") + .HasColumnType("TEXT"); + + b.Property("SteamId") + .HasColumnType("TEXT"); + + b.Property("TotalNumberOfDaysLoginCount") + .HasColumnType("INTEGER"); + + b.Property("TwoFactorEnabled") + .HasColumnType("INTEGER"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.BankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("BankAccountType") + .HasColumnType("INTEGER"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("CurrentBalance") + .HasColumnType("INTEGER"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("PlayerId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("PlayerId"); + + b.ToTable("BankAccounts"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.BankAccountTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Amount") + .HasColumnType("INTEGER"); + + b.Property("BankAccountId") + .HasColumnType("TEXT"); + + b.Property("BankAccountTransactionType") + .HasColumnType("INTEGER"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("MemoCode") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("BankAccountId"); + + b.ToTable("BankAccountsTransaction"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.DailyRewardDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Amount") + .HasColumnType("INTEGER"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasColumnType("TEXT"); + + b.Property("Icon") + .HasColumnType("TEXT"); + + b.Property("ItemType") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("ProductCategory") + .HasColumnType("TEXT"); + + b.Property("RandLowerBound") + .HasColumnType("INTEGER"); + + b.Property("RandUpperBound") + .HasColumnType("INTEGER"); + + b.Property("Rarity") + .HasColumnType("TEXT"); + + b.Property("RewardType") + .HasColumnType("TEXT"); + + b.Property("StreakEndDate") + .HasColumnType("INTEGER"); + + b.Property("StreakStartDate") + .HasColumnType("INTEGER"); + + b.Property("Tier") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("DailyRewardDefinitions"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.FriendshipRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("FriendId") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("RequestAcceptedOrDeclinedOn") + .HasColumnType("TEXT"); + + b.Property("RequestStatus") + .HasColumnType("INTEGER"); + + b.Property("RequestorId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("FriendId"); + + b.HasIndex("RequestorId"); + + b.ToTable("FriendshipRequests"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.InventoryBin", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("Extra") + .HasColumnType("INTEGER"); + + b.Property("InventoryBinType") + .HasColumnType("INTEGER"); + + b.Property("InventoryId") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("Slots") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("InventoryId"); + + b.ToTable("InventoryBins"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.InventoryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Charge") + .HasColumnType("INTEGER"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("ExpiryDate") + .HasColumnType("TEXT"); + + b.Property("ExtraCapacity") + .HasColumnType("INTEGER"); + + b.Property("ExtraRemaining") + .HasColumnType("INTEGER"); + + b.Property("InternalInventoryItemType") + .HasColumnType("INTEGER"); + + b.Property("ItemCount") + .HasColumnType("INTEGER"); + + b.Property("ItemName") + .HasColumnType("TEXT"); + + b.Property("ItemType") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("PlayerId") + .HasColumnType("TEXT"); + + b.Property("UnlockLevel") + .HasColumnType("INTEGER"); + + b.Property("UpgradeFingerprint") + .HasColumnType("TEXT"); + + b.Property("UpgradeVer") + .HasColumnType("INTEGER"); + + b.Property("XP") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("PlayerId"); + + b.ToTable("InventoryItems"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.InventoryItemAttachment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("AttachedInventoryItemId") + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("ParentInventoryItemId") + .HasColumnType("TEXT"); + + b.Property("Slot") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("AttachedInventoryItemId"); + + b.HasIndex("ParentInventoryItemId"); + + b.ToTable("InventoryItemAttachments"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.LoginTrackingItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("ApplicationUserId") + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("IPAddress") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("LoginTimestamp") + .HasColumnType("TEXT"); + + b.Property("LogoutTimestamp") + .HasColumnType("TEXT"); + + b.Property("Nonce") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationUserId"); + + b.ToTable("LoginTrackingItems"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.MarketPackageDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CanBePurchasedMultipleTimes") + .HasColumnType("INTEGER"); + + b.Property("CanBePurchasedWithCredits") + .HasColumnType("INTEGER"); + + b.Property("CanBePurchasedWithPlat") + .HasColumnType("INTEGER"); + + b.Property("CostInCredits") + .HasColumnType("INTEGER"); + + b.Property("CostInPlat") + .HasColumnType("INTEGER"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("ItemType") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("MarketPackageDefinitions"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.MarketPackageItemDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("AddInventoryBin") + .HasColumnType("INTEGER"); + + b.Property("CanBeAddedRepeatedly") + .HasColumnType("INTEGER"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("ExtraCapacity") + .HasColumnType("INTEGER"); + + b.Property("InternalInventoryItemType") + .HasColumnType("INTEGER"); + + b.Property("InventoryBinTypeToAdd") + .HasColumnType("INTEGER"); + + b.Property("IsUniqueItem") + .HasColumnType("INTEGER"); + + b.Property("ItemCountToBeAdded") + .HasColumnType("INTEGER"); + + b.Property("ItemName") + .HasColumnType("TEXT"); + + b.Property("ItemType") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("MarketPackageDefinitionId") + .HasColumnType("TEXT"); + + b.Property("NumberOfBinsToAdd") + .HasColumnType("INTEGER"); + + b.Property("UnlockLevel") + .HasColumnType("INTEGER"); + + b.Property("UpgradeFingerprint") + .HasColumnType("TEXT"); + + b.Property("UpgradeVer") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("MarketPackageDefinitionId"); + + b.ToTable("MarketPackageItemDefintions"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.MetricItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("ApplicationUserId") + .HasColumnType("TEXT"); + + b.Property("AssociatedNonce") + .HasColumnType("INTEGER"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasColumnType("TEXT"); + + b.Property("EventName") + .HasColumnType("TEXT"); + + b.Property("ItemCount") + .HasColumnType("INTEGER"); + + b.Property("ItemName") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("MetricType") + .HasColumnType("INTEGER"); + + b.Property("Seconds") + .HasColumnType("REAL"); + + b.Property("Set") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationUserId"); + + b.ToTable("MetricItems"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.Mission", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("BestRatings") + .HasColumnType("REAL"); + + b.Property("Completes") + .HasColumnType("INTEGER"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("PlayerId") + .HasColumnType("TEXT"); + + b.Property("Tag") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("PlayerId"); + + b.ToTable("Missions"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.MissionReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("FullReport") + .HasColumnType("INTEGER"); + + b.Property("HostId") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("MissionName") + .HasColumnType("TEXT"); + + b.Property("MissionStartTime") + .HasColumnType("TEXT"); + + b.Property("Nonce") + .HasColumnType("INTEGER"); + + b.Property("PlayerId") + .HasColumnType("TEXT"); + + b.Property("ReporterId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("PlayerId"); + + b.ToTable("MissionReports"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.PendingRecipe", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("EndingTime") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("PlayerId") + .HasColumnType("TEXT"); + + b.Property("RecipeId") + .HasColumnType("TEXT"); + + b.Property("StartingTime") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("PlayerId"); + + b.HasIndex("RecipeId"); + + b.ToTable("PendingRecipes"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.PersonRelationship", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("FriendId") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("PersonRelationshipType") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("FriendId"); + + b.HasIndex("UserId"); + + b.ToTable("PersonRelationships"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.Player", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("ActiveAvatarImageType") + .HasColumnType("TEXT"); + + b.Property("AdditionalPlayerXP") + .HasColumnType("INTEGER"); + + b.Property("ApplicationUserId") + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("CurrentLoadout") + .HasColumnType("TEXT"); + + b.Property("Founder") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("PlayerLevel") + .HasColumnType("INTEGER"); + + b.Property("PlayerXP") + .HasColumnType("INTEGER"); + + b.Property("Rating") + .HasColumnType("INTEGER"); + + b.Property("ReceivedStartingGear") + .HasColumnType("INTEGER"); + + b.Property("SubscribedToEmails") + .HasColumnType("INTEGER"); + + b.Property("TrainingDate") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationUserId"); + + b.ToTable("Players"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.PlayerPurchaseRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("CurrencyType") + .HasColumnType("INTEGER"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("MarketPackageDefinitionId") + .HasColumnType("TEXT"); + + b.Property("PlayerID") + .HasColumnType("TEXT"); + + b.Property("PurchaseAmount") + .HasColumnType("INTEGER"); + + b.Property("PurchaseDate") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("MarketPackageDefinitionId"); + + b.HasIndex("PlayerID"); + + b.ToTable("PlayerPurchaseRecord"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.PlayerReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("AssociatedAccountId") + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("Credits") + .HasColumnType("INTEGER"); + + b.Property("CredtBonus") + .HasColumnType("INTEGER"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("MeleeXpBonus") + .HasColumnType("INTEGER"); + + b.Property("MissionReportId") + .HasColumnType("TEXT"); + + b.Property("PistolXpBonus") + .HasColumnType("INTEGER"); + + b.Property("Rating") + .HasColumnType("REAL"); + + b.Property("RifleXpBonus") + .HasColumnType("INTEGER"); + + b.Property("SentinelWeaponXpBonus") + .HasColumnType("INTEGER"); + + b.Property("SentinelXPBonus") + .HasColumnType("INTEGER"); + + b.Property("SuitXpBonus") + .HasColumnType("INTEGER"); + + b.Property("Upgrades") + .HasColumnType("TEXT"); + + b.Property("Xp") + .HasColumnType("INTEGER"); + + b.Property("XpBonus") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("MissionReportId"); + + b.ToTable("PlayerReports"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.Recipe", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("BuildTimeInSeconds") + .HasColumnType("INTEGER"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("InternalInventoryItemType") + .HasColumnType("INTEGER"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("PriceInStandardCredits") + .HasColumnType("INTEGER"); + + b.Property("RecipeItemName") + .HasColumnType("TEXT"); + + b.Property("RecipeItemPrettyName") + .HasColumnType("TEXT"); + + b.Property("ResultItemName") + .HasColumnType("TEXT"); + + b.Property("ResultItemPrettyName") + .HasColumnType("TEXT"); + + b.Property("SkipBuildPriceInPlatinum") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("Recipes"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.RecipeItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("ItemCountNeeded") + .HasColumnType("INTEGER"); + + b.Property("ItemName") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("PrettyName") + .HasColumnType("TEXT"); + + b.Property("RecipeId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("RecipeId"); + + b.ToTable("RecipeItems"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.SystemTaskHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("ReasonForTaskExecution") + .HasColumnType("TEXT"); + + b.Property("SystemTaskType") + .HasColumnType("INTEGER"); + + b.Property("TaskExecutionTimestamp") + .HasColumnType("TEXT"); + + b.Property("TaskWasSuccessful") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("SystemTaskHistory"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.TauntHistoryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("Node") + .HasColumnType("TEXT"); + + b.Property("PlayerId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("PlayerId"); + + b.ToTable("TauntHistoryItems"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.WorldStateEventMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreationTimestamp") + .HasColumnType("TEXT"); + + b.Property("IsActive") + .HasColumnType("INTEGER"); + + b.Property("LastModificationTimestamp") + .HasColumnType("TEXT"); + + b.Property("Message") + .HasColumnType("TEXT"); + + b.Property("MessageDate") + .HasColumnType("TEXT"); + + b.Property("MessageExpirationDate") + .HasColumnType("TEXT"); + + b.Property("MessageType") + .HasColumnType("INTEGER"); + + b.Property("Property") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("WorldStateEventMessages"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("WFClassic.Web.Data.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("WFClassic.Web.Data.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("WFClassic.Web.Data.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("WFClassic.Web.Data.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.AlertEnemyConfiguration", b => + { + b.HasOne("WFClassic.Web.Data.Models.AlertConfiguration", "AlertConfiguration") + .WithMany("AlertEnemyConfigurations") + .HasForeignKey("AlertConfigurationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AlertConfiguration"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.AlertRewardConfiguration", b => + { + b.HasOne("WFClassic.Web.Data.Models.AlertConfiguration", "AlertConfiguration") + .WithMany("AlertRewardConfigurations") + .HasForeignKey("AlertConfigurationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AlertConfiguration"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.BankAccount", b => + { + b.HasOne("WFClassic.Web.Data.Models.Player", "Player") + .WithMany("BankAccounts") + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.BankAccountTransaction", b => + { + b.HasOne("WFClassic.Web.Data.Models.BankAccount", "BankAccount") + .WithMany("BankAccountTransactions") + .HasForeignKey("BankAccountId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BankAccount"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.FriendshipRequest", b => + { + b.HasOne("WFClassic.Web.Data.Models.ApplicationUser", "Friend") + .WithMany() + .HasForeignKey("FriendId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("WFClassic.Web.Data.Models.ApplicationUser", "Requestor") + .WithMany() + .HasForeignKey("RequestorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Friend"); + + b.Navigation("Requestor"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.InventoryBin", b => + { + b.HasOne("WFClassic.Web.Data.Models.Player", "Inventory") + .WithMany("InventoryBins") + .HasForeignKey("InventoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Inventory"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.InventoryItem", b => + { + b.HasOne("WFClassic.Web.Data.Models.Player", "Player") + .WithMany("InventoryItems") + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.InventoryItemAttachment", b => + { + b.HasOne("WFClassic.Web.Data.Models.InventoryItem", "AttachedInventoryItem") + .WithMany() + .HasForeignKey("AttachedInventoryItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("WFClassic.Web.Data.Models.InventoryItem", "ParentInventoryItem") + .WithMany() + .HasForeignKey("ParentInventoryItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AttachedInventoryItem"); + + b.Navigation("ParentInventoryItem"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.LoginTrackingItem", b => + { + b.HasOne("WFClassic.Web.Data.Models.ApplicationUser", "ApplicationUser") + .WithMany("LoginTrackingItems") + .HasForeignKey("ApplicationUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ApplicationUser"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.MarketPackageItemDefinition", b => + { + b.HasOne("WFClassic.Web.Data.Models.MarketPackageDefinition", "MarketPackageDefinition") + .WithMany("MarketPackageItemDefinitions") + .HasForeignKey("MarketPackageDefinitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("MarketPackageDefinition"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.MetricItem", b => + { + b.HasOne("WFClassic.Web.Data.Models.ApplicationUser", "ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ApplicationUser"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.Mission", b => + { + b.HasOne("WFClassic.Web.Data.Models.Player", "Player") + .WithMany("Missions") + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.MissionReport", b => + { + b.HasOne("WFClassic.Web.Data.Models.Player", "Player") + .WithMany("MissionReports") + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.PendingRecipe", b => + { + b.HasOne("WFClassic.Web.Data.Models.Player", "Player") + .WithMany("PendingRecipes") + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("WFClassic.Web.Data.Models.Recipe", "Recipe") + .WithMany() + .HasForeignKey("RecipeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Player"); + + b.Navigation("Recipe"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.PersonRelationship", b => + { + b.HasOne("WFClassic.Web.Data.Models.ApplicationUser", "Friend") + .WithMany() + .HasForeignKey("FriendId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("WFClassic.Web.Data.Models.ApplicationUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Friend"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.Player", b => + { + b.HasOne("WFClassic.Web.Data.Models.ApplicationUser", "ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ApplicationUser"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.PlayerPurchaseRecord", b => + { + b.HasOne("WFClassic.Web.Data.Models.MarketPackageDefinition", "MarketPackageDefinition") + .WithMany() + .HasForeignKey("MarketPackageDefinitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("WFClassic.Web.Data.Models.Player", "Player") + .WithMany("PlayerPurchaseRecords") + .HasForeignKey("PlayerID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("MarketPackageDefinition"); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.PlayerReport", b => + { + b.HasOne("WFClassic.Web.Data.Models.MissionReport", "MissionReport") + .WithMany("PlayerReports") + .HasForeignKey("MissionReportId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("MissionReport"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.RecipeItem", b => + { + b.HasOne("WFClassic.Web.Data.Models.Recipe", "Recipe") + .WithMany("RecipeComponentItems") + .HasForeignKey("RecipeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Recipe"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.TauntHistoryItem", b => + { + b.HasOne("WFClassic.Web.Data.Models.Player", "Player") + .WithMany("TauntHistoryItems") + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.AlertConfiguration", b => + { + b.Navigation("AlertEnemyConfigurations"); + + b.Navigation("AlertRewardConfigurations"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.ApplicationUser", b => + { + b.Navigation("LoginTrackingItems"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.BankAccount", b => + { + b.Navigation("BankAccountTransactions"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.MarketPackageDefinition", b => + { + b.Navigation("MarketPackageItemDefinitions"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.MissionReport", b => + { + b.Navigation("PlayerReports"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.Player", b => + { + b.Navigation("BankAccounts"); + + b.Navigation("InventoryBins"); + + b.Navigation("InventoryItems"); + + b.Navigation("MissionReports"); + + b.Navigation("Missions"); + + b.Navigation("PendingRecipes"); + + b.Navigation("PlayerPurchaseRecords"); + + b.Navigation("TauntHistoryItems"); + }); + + modelBuilder.Entity("WFClassic.Web.Data.Models.Recipe", b => + { + b.Navigation("RecipeComponentItems"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/WFClassic.Web/Data/Migrations/20250526203641_AddRewardsSeedData.cs b/src/WFClassic.Web/Data/Migrations/20250526203641_AddRewardsSeedData.cs new file mode 100644 index 0000000..3af6cf9 --- /dev/null +++ b/src/WFClassic.Web/Data/Migrations/20250526203641_AddRewardsSeedData.cs @@ -0,0 +1,107 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace WFClassic.Web.Data.Migrations +{ + /// + public partial class AddRewardsSeedData : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.Sql("Delete from DailyRewardDefinitions"); + + migrationBuilder.Sql(@" +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('879649ed-e3f5-48e7-854a-6a2234cb0dce', 'RT_CREDITS', '/Lotus/Interface/Icons/Store/CreditBooster.png', '', 'Pistols', 2500, 1, '', 'COMMON', 0, 2, 1, 25, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('08ddf7a6-6ab8-48f2-9bf8-f905097ad8e3', 'RT_ITEM_XP', '/Lotus/Interface/Icons/Store/PistolB.png', '', 'Pistols', 600, 1, '', 'COMMON', 0, 2, 26, 50, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('91133d6c-be85-449a-b90e-42aced6c3684', 'RT_ITEM_XP', '/Lotus/Interface/Icons/Store/CorpusAutoRifle.png', '', 'LongGuns', 600, 1, '', 'COMMON', 0, 2, 51, 75, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('fe2cbc8b-a5d2-4e70-a83b-30c68dc717b0', 'RT_ITEM_XP', '/Lotus/Interface/Icons/Store/Excalibur.png', '', 'Suits', 600, 1, '', 'UNCOMMON', 0, 2, 76, 85, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('863a216e-d8fb-4c52-bc68-48d44a406bbd', 'RT_ITEM_XP', '/Lotus/Interface/Icons/Store/Skana.png', '', 'Melee', 600, 1, '', 'UNCOMMON', 0, 2, 86, 95, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('f5640b9c-3022-4118-9d84-72015a874ab5', 'RT_CREDITS', '/Lotus/Interface/Icons/Store/CreditBooster.png', '', 'Pistols', 5000, 2, '', 'COMMON', 3, 6, 84, 100, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('37a67ad3-f349-4d8b-9fd2-04844a26fb77', 'RT_ITEM_XP', '/Lotus/Interface/Icons/Store/PistolE.png', '', 'Pistols', 1200, 2, '', 'COMMON', 3, 6, 67, 83, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('e248b4bb-fbe2-4548-bbae-8aeafc60a2bd', 'RT_ITEM_XP', '/Lotus/Interface/Icons/Store/CorpusAutoRifle.png', '', 'LongGuns', 1200, 2, '', 'COMMON', 3, 6, 51, 66, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('42c7db14-8da7-4df9-b46a-2753dfb95430', 'RT_ITEM_XP', '/Lotus/Interface/Icons/Store/Excalibur.png', '', 'Suits', 1200, 2, '', 'COMMON', 3, 6, 34, 50, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('ec0e4077-e7ef-4e71-9cde-777feafead79', 'RT_ITEM_XP', '/Lotus/Interface/Icons/Store/Skana.png', '', 'Melee', 1200, 2, '', 'COMMON', 3, 6, 16, 33, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('36eca8a3-b64a-4f43-9a3b-7677869ce9d1', 'RT_RECIPE', '/Lotus/Interface/Icons/Store/Axe.png', '/Lotus/Types/Recipes/Weapons/AxeBlueprint', 'Pistols', 1, 2, '', 'UNCOMMON', 3, 6, 11, 15, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('7e380399-1eea-4fa7-94f3-5389bbe89dc7', 'RT_RECIPE', '/Lotus/Interface/Icons/Store/Furis.png', '/Lotus/Types/Recipes/Weapons/FurisBlueprint', 'Pistols', 1, 2, '', 'UNCOMMON', 3, 6, 6, 10, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('858726dd-8ddc-474c-9417-22be33875ee8', 'RT_RECIPE', '/Lotus/Interface/Icons/Store/GrineerAssaultRifle.png', '/Lotus/Types/Recipes/Weapons/GrnAssaultRifleBlueprint', 'Pistols', 1, 2, '', 'UNCOMMON', 3, 6, 1, 5, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('40e1145e-1c5c-4815-b7c7-548913a0a04e', 'RT_CREDITS', '/Lotus/Interface/Icons/Store/CreditBooster.png', '', 'Pistols', 10000, 3, '', 'COMMON', 7, 99999, 30, 69, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('05da91f2-c9a8-4d17-a1fb-fb28f477d7ef', 'RT_ITEM_XP', '/Lotus/Interface/Icons/Store/PistolE.png', '', 'Pistols', 2400, 3, '', 'COMMON', 7, 99999, 70, 79, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('2615e1ad-499b-4d66-9298-9cb0c9029553', 'RT_ITEM_XP', '/Lotus/Interface/Icons/Store/CorpusAutoRifle.png', '', 'LongGuns', 2400, 3, '', 'COMMON', 7, 99999, 80, 89, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('f66d6d4c-735f-46a5-9510-65df9590c2bc', 'RT_ITEM_XP', '/Lotus/Interface/Icons/Store/Excalibur.png', '', 'Suits', 2400, 3, '', 'COMMON', 7, 99999, 90, 100, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('ecd67078-e9eb-4d24-a6f2-e122bb910930', 'RT_RECIPE', '/Lotus/Interface/Icons/Store/Banshee.png', '/Lotus/Types/Recipes/WarframeRecipes/BansheeBlueprint', 'Pistols', 1, 3, '', 'UNCOMMON', 7, 99999, 25, 29, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('45fc6b91-1d6f-4c1e-9503-a3b888c0c9ca', 'RT_RECIPE', '/Lotus/Interface/Icons/Store/Engineer.png', '/Lotus/Types/Recipes/WarframeRecipes/TrapperBlueprint', 'Pistols', 1, 3, '', 'UNCOMMON', 7, 99999, 20, 24, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('7b3f9f51-a9c9-4bac-9ff3-d5fc1ac66090', 'RT_RECIPE', '/Lotus/Interface/Icons/Store/AxeSmall.png', '/Lotus/Types/Recipes/Weapons/DualAxeBlueprint', 'Pistols', 1, 3, '', 'UNCOMMON', 7, 99999, 15, 19, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('0b409b98-1184-476c-b718-535a78cd6202', 'RT_RECIPE', '/Lotus/Interface/Icons/Store/GlaiveLight.png', '/Lotus/Types/Recipes/Weapons/GlaiveBlueprint', 'Pistols', 1, 3, '', 'UNCOMMON', 7, 99999, 10, 14, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('91d6c17c-f526-4710-ab98-31c1cf5371b0', 'RT_RECIPE', '/Lotus/Interface/Icons/Store/Gorgon.png', '/Lotus/Types/Recipes/Weapons/GorgonBlueprint', 'Pistols', 1, 3, '', 'UNCOMMON', 7, 99999, 5, 9, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('07cd870f-9f88-4c6e-9931-3c8cb2e9a800', 'RT_RECIPE', '/Lotus/Interface/Icons/Store/ComponentCatalyst.png', '/Lotus/Types/Recipes/Components/OrokinCatalystBlueprint', 'Recipes', 1, 3, '', 'RARE', 7, 99999, 4, 4, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('8bdff07b-cd64-403c-973c-8c3ad85cf3a6', 'RT_RECIPE', '/Lotus/Interface/Icons/Store/ComponentReactor.png', '/Lotus/Types/Recipes/Components/OrokinReactorBlueprint', 'Recipes', 1, 3, '', 'RARE', 7, 99999, 3, 3, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('4b8de189-1c62-487d-984d-6c9cca97dd4d', 'RT_RECIPE', '/Lotus/Interface/Icons/Store/Ninja.png', '/Lotus/Types/Recipes/WarframeRecipes/AshBlueprint', 'Recipes', 1, 3, '', 'RARE', 7, 99999, 2, 2, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('e6cc2e11-a407-44ae-8ccb-102dd563ac33', 'RT_RECIPE', '/Lotus/Interface/Icons/Store/Ember.png', '/Lotus/Types/Recipes/WarframeRecipes/EmberBlueprint', 'Recipes', 1, 3, '', 'RARE', 7, 99999, 1, 1, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +INSERT INTO DailyRewardDefinitions +(Id, RewardType, Icon, ItemType, ProductCategory, Amount, Tier, DisplayName, Rarity, StreakStartDate, StreakEndDate, RandLowerBound, RandUpperBound, CreationTimestamp, LastModificationTimestamp) +VALUES('31F6109C-D511-4FD2-A7EF-6874B72A4416', 'RT_ITEM_XP', '/Lotus/Interface/Icons/Store/Skana.png', '', 'Melee', 2400, 1, '', 'RARE', 0, 2, 96, 100, '2025-05-08 21:00:23.1978374-05:00', '2025-05-08 21:00:23.1978374-05:00'); +"); + + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + + } + } +} diff --git a/src/WFClassic.Web/Logic/WFAuth/WFLogin/WarframeLoginHandler.cs b/src/WFClassic.Web/Logic/WFAuth/WFLogin/WarframeLoginHandler.cs index 3f022ae..7e96fac 100644 --- a/src/WFClassic.Web/Logic/WFAuth/WFLogin/WarframeLoginHandler.cs +++ b/src/WFClassic.Web/Logic/WFAuth/WFLogin/WarframeLoginHandler.cs @@ -16,11 +16,12 @@ namespace WFClassic.Web.Logic.WFAuth.WFLogin private readonly IConfiguration _configuration; private readonly CreatePlayerHandler _createPlayerHandler; private readonly IUserStore _userStore; + private readonly IUserEmailStore _emailStore; public WarframeLoginHandler(ILogger logger, ApplicationDbContext applicationDbContext, SignInManager signInManager, UserManager userManager, IConfiguration configuration, - CreatePlayerHandler createPlayerHandler, IUserStore userStore) + CreatePlayerHandler createPlayerHandler, IUserStore userStore ) { this._logger = logger; this._applicationDbContext = applicationDbContext; @@ -28,7 +29,8 @@ namespace WFClassic.Web.Logic.WFAuth.WFLogin this._userManager = userManager; this._configuration = configuration; this._createPlayerHandler = createPlayerHandler; - _userStore = userStore; + this._userStore = userStore; + this._emailStore = (IUserEmailStore)_userStore; } public async Task Handle(WarframeLoginRequest warframeLoginRequest) @@ -68,6 +70,7 @@ namespace WFClassic.Web.Logic.WFAuth.WFLogin user.SteamId = "0"; user.EmailConfirmed = true; await _userStore.SetUserNameAsync(user, warframeLoginRequest.email, CancellationToken.None); + await _emailStore.SetEmailAsync(user, warframeLoginRequest.email, CancellationToken.None); await _userManager.CreateAsync(user, upperPassword); _createPlayerHandler.Handle(new CreatePlayer() { ApplicationUserId = user.Id, PlatinumGiftAmount = 50 }); _logger.LogInformation("WarframeLoginHandler => email {email} => new user created ", warframeLoginRequest.email); diff --git a/src/WFClassic.Web/Program.cs b/src/WFClassic.Web/Program.cs index fd2cd84..1d37dc2 100644 --- a/src/WFClassic.Web/Program.cs +++ b/src/WFClassic.Web/Program.cs @@ -129,21 +129,26 @@ app.MapControllerRoute( pattern: "{controller=Home}/{action=Index}/{id?}"); app.MapRazorPages(); - - - using (var serviceScope = app.Services.CreateScope()) { + // this will either create or migrate the db, depending on whether or not it exists. + var dbContext = serviceScope.ServiceProvider.GetRequiredService(); + if (dbContext.Database.GetPendingMigrations().Any()) + { + dbContext.Database.Migrate(); + } + serviceScope.ServiceProvider.GetRequiredService().Handle(); - serviceScope.ServiceProvider.GetRequiredService().Handle(new ResetWarframeRevives() {ResetReason ="System Startup", ResetRegardless =false }); + serviceScope.ServiceProvider.GetRequiredService().Handle(new ResetWarframeRevives() { ResetReason = "System Startup", ResetRegardless = false }); } app.Services.UseScheduler( - scheduler => { + scheduler => + { scheduler.Schedule().DailyAtHour(0); scheduler.ScheduleWithParams(new ResetWarframeRevives() { ResetReason = "System Startup", ResetRegardless = false }).DailyAtHour(0); }); -app.Run(); +app.Run(); diff --git a/src/WFClassic.Web/WFClassic.Web.csproj b/src/WFClassic.Web/WFClassic.Web.csproj index adbf5b2..ea6c78d 100644 --- a/src/WFClassic.Web/WFClassic.Web.csproj +++ b/src/WFClassic.Web/WFClassic.Web.csproj @@ -27,9 +27,7 @@ - - Always - +