diff --git a/TOOHUCardAPI/Data/AppSettings.cs b/TOOHUCardAPI/Data/AppSettings.cs index 684f9e9..dc01f7d 100644 --- a/TOOHUCardAPI/Data/AppSettings.cs +++ b/TOOHUCardAPI/Data/AppSettings.cs @@ -7,7 +7,9 @@ namespace TOOHUCardAPI.Data { public static int PointsPerLevel { get; set; } public static int PointsPerLevelNormal { get; set; } - public static int FirstWinBonusPoints { get; set; } + public static int FirstWinBonusPointsMin { get; set; } + public static int FirstWinBonusPointsMax { get; set; } + public static int DailyKeyBonus { get; set; } public static int PointsPerKey { get; set; } public static int MaxKeyPurchaseAmount { get; set; } public static void Init(IConfiguration configuration) diff --git a/TOOHUCardAPI/Data/Models/User.cs b/TOOHUCardAPI/Data/Models/User.cs index b10360a..a9f56ef 100644 --- a/TOOHUCardAPI/Data/Models/User.cs +++ b/TOOHUCardAPI/Data/Models/User.cs @@ -19,6 +19,7 @@ namespace TOOHUCardAPI.Data.Models public bool Ban { get; set; } public int Point { get; set; } public DateTime LastFirstWin { get; set; } + public DateTime LastDailyLoginBonus { get; set; } public int PowerMaxTotal { get; set; } public string PetModel { get; set; } public string PetEffect { get; set; } diff --git a/TOOHUCardAPI/Data/Services/StoreService.cs b/TOOHUCardAPI/Data/Services/StoreService.cs index 9cf6331..84aad81 100644 --- a/TOOHUCardAPI/Data/Services/StoreService.cs +++ b/TOOHUCardAPI/Data/Services/StoreService.cs @@ -99,11 +99,13 @@ namespace TOOHUCardAPI.Data.Services { throw new NotFirstWinException(); } - await AddPoints(AppSettings.FirstWinBonusPoints, user); + + int points = new Random().Next(AppSettings.FirstWinBonusPointsMin, AppSettings.FirstWinBonusPointsMax + 1); + await AddPoints(points, user); user.LastFirstWin = DateTime.Now; await _userRepository.UpdateUser(user); - _logger.LogInformation($"User with steamid {user.SteamId} received first win of the day bonus, earning {AppSettings.FirstWinBonusPoints} points. New value: {user.Point}"); - return AppSettings.FirstWinBonusPoints; + _logger.LogInformation($"User with steamid {user.SteamId} received first win of the day bonus, earning {points} points. New value: {user.Point}"); + return points; } } diff --git a/TOOHUCardAPI/Data/Services/UserService.cs b/TOOHUCardAPI/Data/Services/UserService.cs index 88a540f..3d10cf6 100644 --- a/TOOHUCardAPI/Data/Services/UserService.cs +++ b/TOOHUCardAPI/Data/Services/UserService.cs @@ -1,3 +1,4 @@ +using System; using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Logging; @@ -20,7 +21,20 @@ namespace TOOHUCardAPI.Data.Services public async Task LoginUser(string steamId) { _logger.LogInformation($"User {steamId} just logged in"); - return await _userRepository.GetOrCreateUser(steamId); + User user = await _userRepository.GetOrCreateUser(steamId); + if (user.LastDailyLoginBonus.AddDays(1) <= DateTime.Now) + { + user = await HandleDailyLoginBonus(user); + } + + return user; + } + + private async Task HandleDailyLoginBonus(User user) + { + user.KeyTotal += AppSettings.DailyKeyBonus; + await _userRepository.UpdateUser(user); + return user; } public async Task SaveCardGroup(string steamId, string groupKey, string groupData) diff --git a/TOOHUCardAPI/Migrations/20211031154114_playerdata done for front facing.Designer.cs b/TOOHUCardAPI/Migrations/20211031154114_playerdata done for front facing.Designer.cs new file mode 100644 index 0000000..061891c --- /dev/null +++ b/TOOHUCardAPI/Migrations/20211031154114_playerdata done for front facing.Designer.cs @@ -0,0 +1,1026 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using TOOHUCardAPI.Data; + +namespace TOOHUCardAPI.Migrations +{ + [DbContext(typeof(AppDbContext))] + [Migration("20211031154114_playerdata done for front facing")] + partial class playerdatadoneforfrontfacing + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "5.0.11"); + + modelBuilder.Entity("TOOHUCardAPI.Data.Models.Card", b => + { + b.Property("ItemCode") + .HasColumnType("TEXT"); + + b.Property("CardName") + .HasColumnType("TEXT"); + + b.Property("HasPortrait") + .HasColumnType("INTEGER"); + + b.Property("HasVoice") + .HasColumnType("INTEGER"); + + b.Property("Quality") + .HasColumnType("INTEGER"); + + b.HasKey("ItemCode"); + + b.ToTable("Cards"); + + b.HasData( + new + { + ItemCode = "item_0026", + CardName = "rin", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0043", + CardName = "hatate", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_0014", + CardName = "merlin", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_0007", + CardName = "hanadayousei", + HasPortrait = false, + HasVoice = false, + Quality = 1 + }, + new + { + ItemCode = "item_2002", + CardName = "item_2002", + HasPortrait = false, + HasVoice = false, + Quality = 4 + }, + new + { + ItemCode = "item_0055", + CardName = "suika", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0002", + CardName = "nazrin", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_0061", + CardName = "keine", + HasPortrait = true, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_0069", + CardName = "toramaru", + HasPortrait = true, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_0042", + CardName = "aya", + HasPortrait = true, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_1011", + CardName = "BonusEgg", + HasPortrait = false, + HasVoice = false, + Quality = 1 + }, + new + { + ItemCode = "item_0015", + CardName = "rumia", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_0030", + CardName = "remilia", + HasPortrait = true, + HasVoice = false, + Quality = 4 + }, + new + { + ItemCode = "item_0028", + CardName = "reimu", + HasPortrait = true, + HasVoice = true, + Quality = 4 + }, + new + { + ItemCode = "item_0045", + CardName = "kagerou", + HasPortrait = true, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_0019", + CardName = "marisa", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0075", + CardName = "clownpiece", + HasPortrait = true, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_0050", + CardName = "nue", + HasPortrait = true, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_0044", + CardName = "momiji", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_0011", + CardName = "letty", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_1003", + CardName = "BonusEgg", + HasPortrait = false, + HasVoice = false, + Quality = 1 + }, + new + { + ItemCode = "item_0022", + CardName = "sakuya", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0003", + CardName = "minoriko", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_2022", + CardName = "item_2022", + HasPortrait = false, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_2020", + CardName = "item_2020", + HasPortrait = false, + HasVoice = false, + Quality = 4 + }, + new + { + ItemCode = "item_2016", + CardName = "item_2016", + HasPortrait = false, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_2018", + CardName = "item_2018", + HasPortrait = false, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_2006", + CardName = "item_2006", + HasPortrait = false, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_2019", + CardName = "item_2019", + HasPortrait = false, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_2015", + CardName = "item_2015", + HasPortrait = false, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_2014", + CardName = "item_2014", + HasPortrait = false, + HasVoice = false, + Quality = 4 + }, + new + { + ItemCode = "item_0009", + CardName = "cirno", + HasPortrait = true, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_0038", + CardName = "chen", + HasPortrait = true, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_0074", + CardName = "hecatia", + HasPortrait = true, + HasVoice = false, + Quality = 4 + }, + new + { + ItemCode = "item_0080", + CardName = "shinki", + HasPortrait = true, + HasVoice = false, + Quality = 4 + }, + new + { + ItemCode = "item_0051", + CardName = "byakuren", + HasPortrait = true, + HasVoice = false, + Quality = 4 + }, + new + { + ItemCode = "item_1012", + CardName = "BonusEgg", + HasPortrait = false, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_0029", + CardName = "daiyousei", + HasPortrait = true, + HasVoice = true, + Quality = 4 + }, + new + { + ItemCode = "item_0073", + CardName = "junko", + HasPortrait = true, + HasVoice = false, + Quality = 4 + }, + new + { + ItemCode = "item_0063", + CardName = "kisume", + HasPortrait = true, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_2007", + CardName = "item_2007", + HasPortrait = false, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_0025", + CardName = "youmu", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0004", + CardName = "mugiyousei", + HasPortrait = false, + HasVoice = false, + Quality = 1 + }, + new + { + ItemCode = "item_0096", + CardName = "seiga", + HasPortrait = true, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_0034", + CardName = "meirin", + HasPortrait = true, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_2011", + CardName = "item_2011", + HasPortrait = false, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_2010", + CardName = "item_2010", + HasPortrait = false, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_2008", + CardName = "item_2008", + HasPortrait = false, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_0036", + CardName = "yukari", + HasPortrait = true, + HasVoice = false, + Quality = 4 + }, + new + { + ItemCode = "item_0018", + CardName = "mystia", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_2009", + CardName = "item_2009", + HasPortrait = false, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_0046", + CardName = "sanae", + HasPortrait = true, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_2017", + CardName = "item_2017", + HasPortrait = false, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_2005", + CardName = "item_2005", + HasPortrait = false, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_0052", + CardName = "miko", + HasPortrait = true, + HasVoice = true, + Quality = 4 + }, + new + { + ItemCode = "item_0023", + CardName = "reisen", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0049", + CardName = "minamitsu", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_2004", + CardName = "item_2004", + HasPortrait = false, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_2003", + CardName = "item_2003", + HasPortrait = false, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_0056", + CardName = "star", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_0006", + CardName = "hourainingyou", + HasPortrait = false, + HasVoice = false, + Quality = 1 + }, + new + { + ItemCode = "item_0057", + CardName = "sunny", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_0095", + CardName = "futo", + HasPortrait = true, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_2001", + CardName = "item_2001", + HasPortrait = false, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_1013", + CardName = "BonusEgg", + HasPortrait = false, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_0097", + CardName = "yoshika", + HasPortrait = true, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_0027", + CardName = "utsuho", + HasPortrait = true, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_0068", + CardName = "komachi", + HasPortrait = true, + HasVoice = false, + Quality = 4 + }, + new + { + ItemCode = "item_0047", + CardName = "kanako", + HasPortrait = true, + HasVoice = true, + Quality = 4 + }, + new + { + ItemCode = "item_0058", + CardName = "luna", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_2013", + CardName = "item_2013", + HasPortrait = false, + HasVoice = false, + Quality = 4 + }, + new + { + ItemCode = "item_0024", + CardName = "yuyuko", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0093", + CardName = "kyouko", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_0005", + CardName = "shanghainingyou", + HasPortrait = false, + HasVoice = false, + Quality = 1 + }, + new + { + ItemCode = "item_1006", + CardName = "BonusEgg", + HasPortrait = false, + HasVoice = false, + Quality = 4 + }, + new + { + ItemCode = "item_0064", + CardName = "shikieiki", + HasPortrait = true, + HasVoice = false, + Quality = 4 + }, + new + { + ItemCode = "item_0092", + CardName = "medicine", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_0017", + CardName = "iku", + HasPortrait = true, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_0013", + CardName = "lunasa", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_0091", + CardName = "hina", + HasPortrait = true, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_1004", + CardName = "BonusEgg", + HasPortrait = false, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_0040", + CardName = "mokou", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0088", + CardName = "sizuha", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_2012", + CardName = "item_2012", + HasPortrait = false, + HasVoice = false, + Quality = 4 + }, + new + { + ItemCode = "item_0010", + CardName = "kogasa", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_0062", + CardName = "inaba", + HasPortrait = true, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_0001", + CardName = "lily", + HasPortrait = true, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_1005", + CardName = "BonusEgg", + HasPortrait = false, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_0060", + CardName = "wriggle", + HasPortrait = true, + HasVoice = false, + Quality = 2 + }, + new + { + ItemCode = "item_0059", + CardName = "alice", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0054", + CardName = "yuugi", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0032", + CardName = "flandre", + HasPortrait = true, + HasVoice = true, + Quality = 4 + }, + new + { + ItemCode = "item_0033", + CardName = "koakuma", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_0041", + CardName = "kaguya", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0039", + CardName = "eirin", + HasPortrait = true, + HasVoice = true, + Quality = 4 + }, + new + { + ItemCode = "item_0037", + CardName = "ran", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0035", + CardName = "yuuka", + HasPortrait = true, + HasVoice = true, + Quality = 4 + }, + new + { + ItemCode = "item_0048", + CardName = "suwako", + HasPortrait = true, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_0016", + CardName = "satori", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_0053", + CardName = "kokoro", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0008", + CardName = "maidyousei", + HasPortrait = false, + HasVoice = false, + Quality = 1 + }, + new + { + ItemCode = "item_0012", + CardName = "lyrica", + HasPortrait = true, + HasVoice = true, + Quality = 2 + }, + new + { + ItemCode = "item_0031", + CardName = "koishi", + HasPortrait = true, + HasVoice = true, + Quality = 4 + }, + new + { + ItemCode = "item_0094", + CardName = "soga", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0021", + CardName = "patchouli", + HasPortrait = true, + HasVoice = true, + Quality = 3 + }, + new + { + ItemCode = "item_0020", + CardName = "tenshi", + HasPortrait = true, + HasVoice = false, + Quality = 3 + }, + new + { + ItemCode = "item_1014", + CardName = "BonusEgg", + HasPortrait = false, + HasVoice = false, + Quality = 4 + }); + }); + + modelBuilder.Entity("TOOHUCardAPI.Data.Models.CardLevel", b => + { + b.Property("UserSteamId") + .HasColumnType("TEXT"); + + b.Property("CardItemCode") + .HasColumnType("TEXT"); + + b.Property("Level") + .HasColumnType("INTEGER"); + + b.HasKey("UserSteamId", "CardItemCode"); + + b.HasIndex("CardItemCode"); + + b.ToTable("CardLevel"); + }); + + modelBuilder.Entity("TOOHUCardAPI.Data.Models.EncodedCardGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("EncodedString") + .HasColumnType("TEXT"); + + b.Property("GroupKey") + .HasColumnType("TEXT"); + + b.Property("UserSteamId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("UserSteamId"); + + b.ToTable("EncodedCardGroup"); + }); + + modelBuilder.Entity("TOOHUCardAPI.Data.Models.User", b => + { + b.Property("SteamId") + .HasColumnType("TEXT"); + + b.Property("Ban") + .HasColumnType("INTEGER"); + + b.Property("EndTime") + .HasColumnType("TEXT"); + + b.Property("KeySaveDate") + .HasColumnType("TEXT"); + + b.Property("KeyTotal") + .HasColumnType("INTEGER"); + + b.Property("KeyUseCount") + .HasColumnType("INTEGER"); + + b.Property("LastFirstWin") + .HasColumnType("TEXT"); + + b.Property("MaxTeamWave") + .HasColumnType("INTEGER"); + + b.Property("MaxWave") + .HasColumnType("INTEGER"); + + b.Property("PetEffect") + .HasColumnType("TEXT"); + + b.Property("PetLevel") + .HasColumnType("INTEGER"); + + b.Property("PetModel") + .HasColumnType("TEXT"); + + b.Property("Point") + .HasColumnType("INTEGER"); + + b.Property("PowerMaxTotal") + .HasColumnType("INTEGER"); + + b.Property("Vip") + .HasColumnType("INTEGER"); + + b.HasKey("SteamId"); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("TOOHUCardAPI.Data.Models.CardLevel", b => + { + b.HasOne("TOOHUCardAPI.Data.Models.Card", "Card") + .WithMany() + .HasForeignKey("CardItemCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("TOOHUCardAPI.Data.Models.User", null) + .WithMany("CardLevels") + .HasForeignKey("UserSteamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Card"); + }); + + modelBuilder.Entity("TOOHUCardAPI.Data.Models.EncodedCardGroup", b => + { + b.HasOne("TOOHUCardAPI.Data.Models.User", null) + .WithMany("EncodedCardGroups") + .HasForeignKey("UserSteamId"); + }); + + modelBuilder.Entity("TOOHUCardAPI.Data.Models.User", b => + { + b.Navigation("CardLevels"); + + b.Navigation("EncodedCardGroups"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/TOOHUCardAPI/Migrations/20211031154114_playerdata done for front facing.cs b/TOOHUCardAPI/Migrations/20211031154114_playerdata done for front facing.cs new file mode 100644 index 0000000..c84e511 --- /dev/null +++ b/TOOHUCardAPI/Migrations/20211031154114_playerdata done for front facing.cs @@ -0,0 +1,33 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace TOOHUCardAPI.Migrations +{ + public partial class playerdatadoneforfrontfacing : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "PetEffect", + table: "Users", + type: "TEXT", + nullable: true); + + migrationBuilder.AddColumn( + name: "PetModel", + table: "Users", + type: "TEXT", + nullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "PetEffect", + table: "Users"); + + migrationBuilder.DropColumn( + name: "PetModel", + table: "Users"); + } + } +} diff --git a/TOOHUCardAPI/Migrations/AppDbContextModelSnapshot.cs b/TOOHUCardAPI/Migrations/AppDbContextModelSnapshot.cs index 73506ae..5fd7bf3 100644 --- a/TOOHUCardAPI/Migrations/AppDbContextModelSnapshot.cs +++ b/TOOHUCardAPI/Migrations/AppDbContextModelSnapshot.cs @@ -965,9 +965,15 @@ namespace TOOHUCardAPI.Migrations b.Property("MaxWave") .HasColumnType("INTEGER"); + b.Property("PetEffect") + .HasColumnType("TEXT"); + b.Property("PetLevel") .HasColumnType("INTEGER"); + b.Property("PetModel") + .HasColumnType("TEXT"); + b.Property("Point") .HasColumnType("INTEGER"); diff --git a/TOOHUCardAPI/appsettings.json b/TOOHUCardAPI/appsettings.json index 0d492c3..2c9c743 100644 --- a/TOOHUCardAPI/appsettings.json +++ b/TOOHUCardAPI/appsettings.json @@ -13,6 +13,8 @@ "PointsPerLevel": "10", "PointsPerLevelNormal": "5", "PointsPerKey": "2", - "FirstWinBonusPoints": "2", + "FirstWinBonusPointsMin": "1", + "FirstWinBonusPointsMax": "5", + "DailyKeyBonus": "2", "MaxKeyPurchaseAmount": "200" }