diff --git a/TOOHUCardAPI/Controllers/GameConfigController.cs b/TOOHUCardAPI/Controllers/GameConfigController.cs index 9561500..429128d 100644 --- a/TOOHUCardAPI/Controllers/GameConfigController.cs +++ b/TOOHUCardAPI/Controllers/GameConfigController.cs @@ -4,6 +4,8 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using TOOHUCardAPI.Data.Services; using TOOHUCardAPI.DTO; namespace TOOHUCardAPI.Controllers @@ -12,10 +14,21 @@ namespace TOOHUCardAPI.Controllers [ApiController] public class GameConfigController : ControllerBase { + private readonly GameConfigurationService _gameConfigurationService; + private readonly ILogger _logger; + + public GameConfigController(GameConfigurationService gameConfigurationService, ILogger logger) + { + _gameConfigurationService = gameConfigurationService; + _logger = logger; + } + [HttpGet] public async Task GetGameConfig() { - return new GameConfigResponse(); + var response = await _gameConfigurationService.GetGameConfiguration(); + _logger.LogInformation("Game config fetched"); + return response; } } } \ No newline at end of file diff --git a/TOOHUCardAPI/Controllers/PlayerBaseDataController.cs b/TOOHUCardAPI/Controllers/PlayerBaseDataController.cs index 44a442c..1d4679f 100644 --- a/TOOHUCardAPI/Controllers/PlayerBaseDataController.cs +++ b/TOOHUCardAPI/Controllers/PlayerBaseDataController.cs @@ -28,7 +28,7 @@ namespace TOOHUCardAPI.Controllers } [HttpGet] - public async Task Get(string id) + public async Task Get(long id) { User user = await _userRepository.GetUser(id); diff --git a/TOOHUCardAPI/Controllers/PlayerDataController.cs b/TOOHUCardAPI/Controllers/PlayerDataController.cs index 87e298b..9b2bac4 100644 --- a/TOOHUCardAPI/Controllers/PlayerDataController.cs +++ b/TOOHUCardAPI/Controllers/PlayerDataController.cs @@ -115,15 +115,15 @@ namespace TOOHUCardAPI.Controllers { PlayerDataGetRequestObject requestObject = JsonConvert.DeserializeObject(body); IEnumerable users = await Task.WhenAll(requestObject.Ids.Values.Select(val => _userService.LoginUser(val))); - IEnumerable queriedUserSteamIds = requestObject.Ids.Select(i => i.Value); + IEnumerable queriedUserSteamIds = requestObject.Ids.Select(i => i.Value); IEnumerable responsePlayers = users .Where(user => queriedUserSteamIds.Contains(user.SteamId)) .Select(user => user.ToGetResponse(_mapper)); - Dictionary playersStatic = requestObject.Ids + Dictionary playersStatic = requestObject.Ids .Select(pair => KeyValuePair.Create(pair.Key, responsePlayers.FirstOrDefault(resp => resp.SteamId == pair.Value))) .ToDictionary(kv => kv.Key, kv => kv.Value); - Dictionary> dynamicResponses = playersStatic + Dictionary> dynamicResponses = playersStatic .Select(kv => { var obj = JsonConvert.DeserializeObject>(JsonConvert.SerializeObject(kv.Value)); diff --git a/TOOHUCardAPI/Controllers/RankDataController.cs b/TOOHUCardAPI/Controllers/RankDataController.cs index e0f605d..a2dc727 100644 --- a/TOOHUCardAPI/Controllers/RankDataController.cs +++ b/TOOHUCardAPI/Controllers/RankDataController.cs @@ -4,6 +4,10 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using TOOHUCardAPI.Data.Enums; +using TOOHUCardAPI.Data.Services; +using TOOHUCardAPI.DTO; namespace TOOHUCardAPI.Controllers { @@ -11,8 +15,46 @@ namespace TOOHUCardAPI.Controllers [ApiController] public class RankDataController : MethodBasedController { - public RankDataController() + private readonly ILogger _logger; + private readonly RankService _rankService; + private readonly StoreService _storeService; + private readonly UserService _userService; + + public RankDataController(ILogger logger, RankService rankService, StoreService storeService, UserService userService) { + _logger = logger; + _rankService = rankService; + _storeService = storeService; + _userService = userService; + } + + private RankType ParseRankType(string rankType) + { + if (rankType == null || rankType.Length > 1) + { + return RankType.All; + } + + char identifier = rankType.ToCharArray()[0]; + if (identifier == (char) RankType.Single) + { + return RankType.Single; + } + + if (identifier == (char) RankType.Team) + { + return RankType.Team; + } + + return RankType.All; + } + + [HttpGet] + public async Task GetRankData(string rank_type) + { + RankType parsedRankType = ParseRankType(rank_type); + + return Ok(new OkResponse()); } } } \ No newline at end of file diff --git a/TOOHUCardAPI/DTO/AbstractPlayerTargetedRequest.cs b/TOOHUCardAPI/DTO/AbstractPlayerTargetedRequest.cs index 7497b63..0dafb6a 100644 --- a/TOOHUCardAPI/DTO/AbstractPlayerTargetedRequest.cs +++ b/TOOHUCardAPI/DTO/AbstractPlayerTargetedRequest.cs @@ -2,7 +2,7 @@ namespace TOOHUCardAPI.DTO { public abstract class AbstractPlayerTargetedRequest : AbstractRequest { - public string SteamId { get; set; } - public string UserId { get; set; } + public long SteamId { get; set; } + public long UserId { get; set; } } } \ No newline at end of file diff --git a/TOOHUCardAPI/DTO/GameConfigResponse.cs b/TOOHUCardAPI/DTO/GameConfigResponse.cs index 232c092..194a01a 100644 --- a/TOOHUCardAPI/DTO/GameConfigResponse.cs +++ b/TOOHUCardAPI/DTO/GameConfigResponse.cs @@ -1,6 +1,7 @@ using System; using System.Text.Json.Serialization; using Newtonsoft.Json; +using TOOHUCardAPI.Data.Repositories; namespace TOOHUCardAPI.DTO { @@ -25,11 +26,15 @@ namespace TOOHUCardAPI.DTO [JsonProperty("game_code")] public string GameCode { get; set; } = string.Empty; [JsonProperty("game_msg")] public string GameMessage { get; set; } = DEFAULT_GAME_MESSAGE; [JsonProperty("luck_card")] public string LuckCard { get; set; } = string.Empty; - [JsonProperty("luck_crit")] public float LuckCrit { get; set; } + [JsonProperty("luck_crit")] public float LuckCrit { get; set; } = .25f; [JsonProperty("new_card_list")] public string NewCardList { get; set; } = string.Empty; [JsonProperty("open_day_list")] public string OpenDayList { get; set; } = string.Empty; [JsonProperty("is_open_day")] public int IsOpenDay { get; set; } = 1; [JsonProperty("server_time")] public string ServerTime { get; set; } = string.Empty; - + + public GameConfigResponse() + { + } + } } \ No newline at end of file diff --git a/TOOHUCardAPI/DTO/PlayerData/PlayerDataGetRequest.cs b/TOOHUCardAPI/DTO/PlayerData/PlayerDataGetRequest.cs index 2a6d6bc..0347c87 100644 --- a/TOOHUCardAPI/DTO/PlayerData/PlayerDataGetRequest.cs +++ b/TOOHUCardAPI/DTO/PlayerData/PlayerDataGetRequest.cs @@ -4,6 +4,6 @@ namespace TOOHUCardAPI.DTO.PlayerData { public class PlayerDataGetRequestObject : AbstractRequest { - public Dictionary Ids; + public Dictionary Ids; } } \ No newline at end of file diff --git a/TOOHUCardAPI/DTO/PlayerData/PlayerDataGetResponseObject.cs b/TOOHUCardAPI/DTO/PlayerData/PlayerDataGetResponseObject.cs index 54cece3..072cd0b 100644 --- a/TOOHUCardAPI/DTO/PlayerData/PlayerDataGetResponseObject.cs +++ b/TOOHUCardAPI/DTO/PlayerData/PlayerDataGetResponseObject.cs @@ -12,7 +12,7 @@ namespace TOOHUCardAPI.DTO.PlayerData { // Instead of using a defined object, use a dictionary so we can add the necessary cardgroup items. I dont want to make 20 of them in the class [JsonProperty("bo")] - public Dictionary> Players { get; set; } + public Dictionary> Players { get; set; } } /** @@ -22,7 +22,7 @@ namespace TOOHUCardAPI.DTO.PlayerData public class PlayerDataGetResponseObjectPlayer: OkResponse { [JsonProperty("steamid")] - public string SteamId { get; set; } + public long SteamId { get; set; } [JsonProperty("max_wave")] public int MaxWave { get; set; } = 0; [JsonProperty("max_team_wave")] public int MaxTeamWave { get; set; } = 0; [JsonProperty("pet_level")] public int PetLevel { get; set; } = 1; diff --git a/TOOHUCardAPI/DTO/RankData/RankDataGetResponse.cs b/TOOHUCardAPI/DTO/RankData/RankDataGetResponse.cs new file mode 100644 index 0000000..303ecee --- /dev/null +++ b/TOOHUCardAPI/DTO/RankData/RankDataGetResponse.cs @@ -0,0 +1,7 @@ +namespace TOOHUCardAPI.DTO.RankData +{ + public class RankDataGetResponse : OkResponse + { + + } +} \ No newline at end of file diff --git a/TOOHUCardAPI/DTO/RankData/RankDataResetRequest.cs b/TOOHUCardAPI/DTO/RankData/RankDataResetRequest.cs new file mode 100644 index 0000000..195b3f4 --- /dev/null +++ b/TOOHUCardAPI/DTO/RankData/RankDataResetRequest.cs @@ -0,0 +1,7 @@ +namespace TOOHUCardAPI.DTO.RankData +{ + public class RankDataResetRequest: AbstractPlayerTargetedRequest + { + + } +} \ No newline at end of file diff --git a/TOOHUCardAPI/DTO/RankData/RankDataResetResponse.cs b/TOOHUCardAPI/DTO/RankData/RankDataResetResponse.cs new file mode 100644 index 0000000..882731e --- /dev/null +++ b/TOOHUCardAPI/DTO/RankData/RankDataResetResponse.cs @@ -0,0 +1,7 @@ +namespace TOOHUCardAPI.DTO.RankData +{ + public class RankDataResetResponse : OkResponse + { + + } +} \ No newline at end of file diff --git a/TOOHUCardAPI/DTO/RankData/RankDataUploadRequest.cs b/TOOHUCardAPI/DTO/RankData/RankDataUploadRequest.cs new file mode 100644 index 0000000..cea821b --- /dev/null +++ b/TOOHUCardAPI/DTO/RankData/RankDataUploadRequest.cs @@ -0,0 +1,7 @@ +namespace TOOHUCardAPI.DTO.RankData +{ + public class RankDataUploadRequest : AbstractPlayerTargetedRequest + { + + } +} \ No newline at end of file diff --git a/TOOHUCardAPI/DTO/RankData/RankDataUploadResponse.cs b/TOOHUCardAPI/DTO/RankData/RankDataUploadResponse.cs new file mode 100644 index 0000000..cfc5a63 --- /dev/null +++ b/TOOHUCardAPI/DTO/RankData/RankDataUploadResponse.cs @@ -0,0 +1,7 @@ +namespace TOOHUCardAPI.DTO.RankData +{ + public class RankDataUploadResponse : OkResponse + { + + } +} \ No newline at end of file diff --git a/TOOHUCardAPI/Data/AppDbContext.cs b/TOOHUCardAPI/Data/AppDbContext.cs index e0b11d8..aba5786 100644 --- a/TOOHUCardAPI/Data/AppDbContext.cs +++ b/TOOHUCardAPI/Data/AppDbContext.cs @@ -12,6 +12,7 @@ namespace TOOHUCardAPI.Data { public DbSet Users { get; set; } public DbSet Cards { get; set; } + public DbSet RankEntries { get; set; } private readonly IEnumerable _seeders = new List { diff --git a/TOOHUCardAPI/Data/Enums/RankType.cs b/TOOHUCardAPI/Data/Enums/RankType.cs new file mode 100644 index 0000000..a7f7608 --- /dev/null +++ b/TOOHUCardAPI/Data/Enums/RankType.cs @@ -0,0 +1,9 @@ +namespace TOOHUCardAPI.Data.Enums +{ + public enum RankType + { + Single = 'S', + Team = 'D', + All = 'T' + } +} \ No newline at end of file diff --git a/TOOHUCardAPI/Data/Enums/Rarity.cs b/TOOHUCardAPI/Data/Enums/Rarity.cs index 194cbed..93f53fa 100644 --- a/TOOHUCardAPI/Data/Enums/Rarity.cs +++ b/TOOHUCardAPI/Data/Enums/Rarity.cs @@ -2,9 +2,9 @@ namespace TOOHUCardAPI.Data.Enums { public enum Rarity { - NORMAL = 1, - RARE = 2, - SUPER_RARE = 3, - SUPER_SECRET_RARE = 4 + Normal = 1, + Rare = 2, + SuperRare = 3, + SuperSecretRare = 4 } } \ No newline at end of file diff --git a/TOOHUCardAPI/Data/Models/CardLevel.cs b/TOOHUCardAPI/Data/Models/CardLevel.cs index c8dac6b..0f3b383 100644 --- a/TOOHUCardAPI/Data/Models/CardLevel.cs +++ b/TOOHUCardAPI/Data/Models/CardLevel.cs @@ -2,7 +2,7 @@ namespace TOOHUCardAPI.Data.Models { public class CardLevel { - public string UserSteamId { get; set; } + public long UserSteamId { get; set; } public string CardItemCode { get; set; } public Card Card { get; set; } public int Level { get; set; } diff --git a/TOOHUCardAPI/Data/Models/RankEntry.cs b/TOOHUCardAPI/Data/Models/RankEntry.cs new file mode 100644 index 0000000..50153d7 --- /dev/null +++ b/TOOHUCardAPI/Data/Models/RankEntry.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using TOOHUCardAPI.Data.Enums; + +namespace TOOHUCardAPI.Data.Models +{ + public class RankEntry + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int Id { get; set; } + public RankType RankType { get; set; } + public User User { get; set; } + public string Version { get; set; } + public int Wave { get; set; } + public long Damage { get; set; } + public List TowersUsed { get; set; } + } +} \ No newline at end of file diff --git a/TOOHUCardAPI/Data/Models/RankTowerEntry.cs b/TOOHUCardAPI/Data/Models/RankTowerEntry.cs new file mode 100644 index 0000000..5d97197 --- /dev/null +++ b/TOOHUCardAPI/Data/Models/RankTowerEntry.cs @@ -0,0 +1,19 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace TOOHUCardAPI.Data.Models +{ + public class RankTowerEntry + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int Id { get; set; } + public Card BaseUnit { get; set; } + public int Star { get; set; } + public int Damage { get; set; } + public int Attack { get; set; } + public int Power { get; set; } + public List Equipment { get; set; } + } +} \ No newline at end of file diff --git a/TOOHUCardAPI/Data/Models/User.cs b/TOOHUCardAPI/Data/Models/User.cs index a9f56ef..8ba0a31 100644 --- a/TOOHUCardAPI/Data/Models/User.cs +++ b/TOOHUCardAPI/Data/Models/User.cs @@ -7,7 +7,7 @@ namespace TOOHUCardAPI.Data.Models public class User { [Key] - public string SteamId { get; set; } + public long SteamId { get; set; } public int MaxWave { get; set; } public int MaxTeamWave { get; set; } public int PetLevel { get; set; } diff --git a/TOOHUCardAPI/Data/Repositories/CardRepository.cs b/TOOHUCardAPI/Data/Repositories/CardRepository.cs index 5688a8c..328b204 100644 --- a/TOOHUCardAPI/Data/Repositories/CardRepository.cs +++ b/TOOHUCardAPI/Data/Repositories/CardRepository.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using TOOHUCardAPI.Data.Models; @@ -23,5 +24,10 @@ namespace TOOHUCardAPI.Data.Repositories return card; } + + public async Task> GetAllCards() + { + return await _context.Cards.ToListAsync(); + } } } \ No newline at end of file diff --git a/TOOHUCardAPI/Data/Repositories/UserRepository.cs b/TOOHUCardAPI/Data/Repositories/UserRepository.cs index 6e23660..2187395 100644 --- a/TOOHUCardAPI/Data/Repositories/UserRepository.cs +++ b/TOOHUCardAPI/Data/Repositories/UserRepository.cs @@ -29,7 +29,7 @@ namespace TOOHUCardAPI.Data.Repositories .AsQueryable(); } - public async Task GetUser(string steamId, bool allowNull = false) + public async Task GetUser(long steamId, bool allowNull = false) { User user = await GetAllUsersQuery().FirstOrDefaultAsync(user => user.SteamId.Equals(steamId)); if (user == null && !allowNull) @@ -40,7 +40,7 @@ namespace TOOHUCardAPI.Data.Repositories return user; } - public async Task CreateUser(string steamId) + public async Task CreateUser(long steamId) { User user = new User { @@ -77,7 +77,7 @@ namespace TOOHUCardAPI.Data.Repositories return user; } - public async Task GetOrCreateUser(string steamId) + public async Task GetOrCreateUser(long steamId) { User user = await GetUser(steamId, true) ?? await CreateUser(steamId); return user; diff --git a/TOOHUCardAPI/Data/Services/GameConfigurationService.cs b/TOOHUCardAPI/Data/Services/GameConfigurationService.cs new file mode 100644 index 0000000..745e934 --- /dev/null +++ b/TOOHUCardAPI/Data/Services/GameConfigurationService.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using TOOHUCardAPI.Data.Repositories; +using TOOHUCardAPI.DTO; + +namespace TOOHUCardAPI.Data.Services +{ + public class GameConfigurationService + { + private readonly ILogger _logger; + private readonly CardRepository _cardRepository; + + private List _cardBlacklist = new() + { + "_", + "BonusEgg" + }; + + public GameConfigurationService(ILogger logger, CardRepository cardRepository) + { + _logger = logger; + _cardRepository = cardRepository; + } + + public async Task GetGameConfiguration() + { + var random = new Random(DateTime.Now.Date.GetHashCode()); + GameConfigResponse response = new GameConfigResponse(); + var cards = await _cardRepository.GetAllCards(); + var validCards = + cards.Where(card => _cardBlacklist.Select(bl => !card.CardName.Contains(bl)).All(res => res)) + .Select(card => card.CardName).Append("all"); + var enumerable = validCards as string[] ?? validCards.ToArray(); + var index = random.Next(0, enumerable.Length); + response.LuckCard = enumerable.ElementAt(index); + return response; + } + } +} \ No newline at end of file diff --git a/TOOHUCardAPI/Data/Services/RankService.cs b/TOOHUCardAPI/Data/Services/RankService.cs new file mode 100644 index 0000000..0ec6cc4 --- /dev/null +++ b/TOOHUCardAPI/Data/Services/RankService.cs @@ -0,0 +1,10 @@ +using Microsoft.Extensions.Logging; + +namespace TOOHUCardAPI.Data.Services +{ + public class RankService + { + private readonly ILogger _logger; + + } +} \ No newline at end of file diff --git a/TOOHUCardAPI/Data/Services/StoreService.cs b/TOOHUCardAPI/Data/Services/StoreService.cs index 84aad81..8a92b02 100644 --- a/TOOHUCardAPI/Data/Services/StoreService.cs +++ b/TOOHUCardAPI/Data/Services/StoreService.cs @@ -26,28 +26,29 @@ namespace TOOHUCardAPI.Data.Services { user.Point = Math.Max(0, user.Point + points); await _userRepository.UpdateUser(user); - _logger.LogInformation($"User with steamid {user.SteamId} was given {points} points. New total: {user.Point}"); + _logger.LogInformation("User with steamid {SteamId} was given {PointsGiven} points. New total: {PointsTotal}", user.SteamId, points, user.Point); } - public async Task SaveKeyTotal(string steamId, int keyTotal, int keyUseCount) + public async Task SaveKeyTotal(long steamId, int keyTotal, int keyUseCount) { User user = await _userRepository.GetUser(steamId); - _logger.LogInformation($"User {user.SteamId} just stored some key total data, previous total and use: ({user.KeyTotal},{user.KeyUseCount}). new ({keyTotal},{keyUseCount})"); + _logger.LogInformation("User {SteamId} just stored some key total data, previous total and use: ({OldKeyTotal},{OldKeyUseCount}). new ({NewKeyTotal},{NewKeyUseCount})", user.SteamId, user.KeyTotal, user.KeyUseCount, keyTotal, keyUseCount); user.KeyTotal = keyTotal; user.KeyUseCount = keyUseCount; await _userRepository.UpdateUser(user); return user; } - public async Task ChangePowerMaxTotal(string steamId, int amt) + public async Task ChangePowerMaxTotal(long steamId, int amt) { User user = await _userRepository.GetUser(steamId); user.PowerMaxTotal = Math.Clamp(user.PowerMaxTotal + amt, 0, int.MaxValue); await _userRepository.UpdateUser(user); + _logger.LogInformation("User {SteamId} changed the number of MaxPower items they had by {Amount}", user.SteamId, amt); return user.PowerMaxTotal; } - public async Task LevelUpCard(string steamId, string itemName, int levelIncrease) + public async Task LevelUpCard(long steamId, string itemName, int levelIncrease) { User user = await _userRepository.GetUser(steamId); Card card = await _cardRepository.GetCardByItemCode(itemName); @@ -57,7 +58,7 @@ namespace TOOHUCardAPI.Data.Services Level = 0 }; int totalCost = - (card.Quality == Rarity.NORMAL ? AppSettings.PointsPerLevelNormal : AppSettings.PointsPerLevel) * + (card.Quality == Rarity.Normal ? AppSettings.PointsPerLevelNormal : AppSettings.PointsPerLevel) * levelIncrease; if (user.Point < totalCost) { @@ -70,11 +71,11 @@ namespace TOOHUCardAPI.Data.Services await AddPoints(-totalCost, user); userCardLevel.Level += levelIncrease; await _userRepository.UpdateUser(user); - _logger.LogInformation($"User with steamid {user.SteamId} leveled up card {card.CardName} to level {userCardLevel.Level}"); + _logger.LogInformation("User with steamid {SteamId} leveled up card {CardName} to level {Level}", user.SteamId, card.CardName, userCardLevel.Level); return totalCost; } - public async Task PurchaseMagicKey(int amt, string steamId) + public async Task PurchaseMagicKey(int amt, long steamId) { int totalCost = AppSettings.PointsPerKey * amt; amt = Math.Clamp(amt, 0, AppSettings.MaxKeyPurchaseAmount); @@ -87,11 +88,11 @@ namespace TOOHUCardAPI.Data.Services await AddPoints(-totalCost, user); user.KeyTotal += amt; await _userRepository.UpdateUser(user); - _logger.LogInformation($"User with steamid {user.SteamId} purchased {amt} keys for {totalCost} points. New point value is {user.Point}"); + _logger.LogInformation("User with steamid {SteamId} purchased {NumberKeys} keys for {TotalCost} points. New point value is {NewPoints}", user.SteamId, amt, totalCost, user.Point); return totalCost; } - public async Task GiveFirstWinBonus(string steamId) + public async Task GiveFirstWinBonus(long steamId) { User user = await _userRepository.GetUser(steamId); @@ -104,7 +105,7 @@ namespace TOOHUCardAPI.Data.Services 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 {points} points. New value: {user.Point}"); + _logger.LogInformation("User with steamid {SteamId} received first win of the day bonus, earning {BonusPoints} points. New value: {UserPoints}", user.SteamId, points, user.Point); return points; } } diff --git a/TOOHUCardAPI/Data/Services/UserService.cs b/TOOHUCardAPI/Data/Services/UserService.cs index ea34389..17f2f56 100644 --- a/TOOHUCardAPI/Data/Services/UserService.cs +++ b/TOOHUCardAPI/Data/Services/UserService.cs @@ -18,9 +18,9 @@ namespace TOOHUCardAPI.Data.Services _userRepository = userRepository; } - public async Task LoginUser(string steamId) + public async Task LoginUser(long steamId) { - _logger.LogInformation($"User {steamId} just logged in"); + _logger.LogInformation("User {SteamId} just logged in", steamId); User user = await _userRepository.GetOrCreateUser(steamId); if (user.LastDailyLoginBonus.AddDays(1) <= DateTime.Now) { @@ -35,11 +35,11 @@ namespace TOOHUCardAPI.Data.Services user.KeyTotal += AppSettings.DailyKeyBonus; user.LastDailyLoginBonus = DateTime.Now;; await _userRepository.UpdateUser(user); - _logger.LogInformation($"User {user.SteamId} received a daily login bonus. Keys earned: {AppSettings.DailyKeyBonus}. New Key total: {user.KeyTotal}"); + _logger.LogInformation("User {SteamId} received a daily login bonus. Keys earned: {DailyKeyBonus}. New Key total: {KeyTotal}", user.SteamId, AppSettings.DailyKeyBonus, user.KeyTotal); return user; } - public async Task SaveCardGroup(string steamId, string groupKey, string groupData) + public async Task SaveCardGroup(long steamId, string groupKey, string groupData) { User user = await _userRepository.GetUser(steamId); @@ -49,17 +49,17 @@ namespace TOOHUCardAPI.Data.Services }; group.EncodedString = groupData; user.EncodedCardGroups = user.EncodedCardGroups.Where(group2 => group.Id != group2.Id).Append(group).ToList(); - _logger.LogInformation($"{user.SteamId} just stored a card group"); + _logger.LogInformation("{SteamId} just stored a card group", user.SteamId); await _userRepository.UpdateUser(user); } - public async Task SavePetData(string steamId, string petModel, string petEffect) + public async Task SavePetData(long steamId, string petModel, string petEffect) { User user = await _userRepository.GetUser(steamId); user.PetModel = petModel; user.PetEffect = petEffect; await _userRepository.UpdateUser(user); - _logger.LogInformation($"User {user.SteamId} saved new pet data with model: {petModel} and effect {petEffect}"); + _logger.LogInformation("User {SteamId} saved new pet data with model: {PetModel} and effect {PetEffect}", user.SteamId, petModel, petEffect); } } } \ No newline at end of file diff --git a/TOOHUCardAPI/Migrations/20211028202203_initial.Designer.cs b/TOOHUCardAPI/Migrations/20211028202203_initial.Designer.cs deleted file mode 100644 index 6c69f3b..0000000 --- a/TOOHUCardAPI/Migrations/20211028202203_initial.Designer.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -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("20211028202203_initial")] - partial class initial - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "5.0.11"); - - modelBuilder.Entity("TOOHUCardAPI.Data.Models.EncodedCardGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("EncodedString") - .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("EndTime") - .HasColumnType("TEXT"); - - b.Property("KeySaveDate") - .HasColumnType("TEXT"); - - b.Property("KeyTotal") - .HasColumnType("INTEGER"); - - b.Property("LevelList") - .HasColumnType("TEXT"); - - b.Property("MaxTeamWave") - .HasColumnType("INTEGER"); - - b.Property("MaxWave") - .HasColumnType("INTEGER"); - - b.Property("PetLevel") - .HasColumnType("INTEGER"); - - b.Property("Point") - .HasColumnType("INTEGER"); - - b.Property("Vip") - .HasColumnType("INTEGER"); - - b.HasKey("SteamId"); - - b.ToTable("Users"); - }); - - 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("EncodedCardGroups"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/TOOHUCardAPI/Migrations/20211028202203_initial.cs b/TOOHUCardAPI/Migrations/20211028202203_initial.cs deleted file mode 100644 index cb81b7e..0000000 --- a/TOOHUCardAPI/Migrations/20211028202203_initial.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace TOOHUCardAPI.Migrations -{ - public partial class initial : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Users", - columns: table => new - { - SteamId = table.Column(type: "TEXT", nullable: false), - MaxWave = table.Column(type: "INTEGER", nullable: false), - MaxTeamWave = table.Column(type: "INTEGER", nullable: false), - PetLevel = table.Column(type: "INTEGER", nullable: false), - EndTime = table.Column(type: "TEXT", nullable: false), - KeyTotal = table.Column(type: "INTEGER", nullable: false), - KeySaveDate = table.Column(type: "TEXT", nullable: false), - Vip = table.Column(type: "INTEGER", nullable: false), - Point = table.Column(type: "INTEGER", nullable: false), - LevelList = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Users", x => x.SteamId); - }); - - migrationBuilder.CreateTable( - name: "EncodedCardGroup", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - EncodedString = table.Column(type: "TEXT", nullable: true), - UserSteamId = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_EncodedCardGroup", x => x.Id); - table.ForeignKey( - name: "FK_EncodedCardGroup_Users_UserSteamId", - column: x => x.UserSteamId, - principalTable: "Users", - principalColumn: "SteamId", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateIndex( - name: "IX_EncodedCardGroup_UserSteamId", - table: "EncodedCardGroup", - column: "UserSteamId"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "EncodedCardGroup"); - - migrationBuilder.DropTable( - name: "Users"); - } - } -} diff --git a/TOOHUCardAPI/Migrations/20211029035809_groupid for encoded card group.Designer.cs b/TOOHUCardAPI/Migrations/20211029035809_groupid for encoded card group.Designer.cs deleted file mode 100644 index 71f0782..0000000 --- a/TOOHUCardAPI/Migrations/20211029035809_groupid for encoded card group.Designer.cs +++ /dev/null @@ -1,97 +0,0 @@ -// -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("20211029035809_groupid for encoded card group")] - partial class groupidforencodedcardgroup - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "5.0.11"); - - modelBuilder.Entity("TOOHUCardAPI.Data.Models.EncodedCardGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CardGroupNumber") - .HasColumnType("INTEGER"); - - b.Property("EncodedString") - .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("LevelList") - .HasColumnType("TEXT"); - - b.Property("MaxTeamWave") - .HasColumnType("INTEGER"); - - b.Property("MaxWave") - .HasColumnType("INTEGER"); - - b.Property("PetLevel") - .HasColumnType("INTEGER"); - - b.Property("Point") - .HasColumnType("INTEGER"); - - b.Property("Vip") - .HasColumnType("INTEGER"); - - b.HasKey("SteamId"); - - b.ToTable("Users"); - }); - - 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("EncodedCardGroups"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/TOOHUCardAPI/Migrations/20211029035809_groupid for encoded card group.cs b/TOOHUCardAPI/Migrations/20211029035809_groupid for encoded card group.cs deleted file mode 100644 index d787ee5..0000000 --- a/TOOHUCardAPI/Migrations/20211029035809_groupid for encoded card group.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace TOOHUCardAPI.Migrations -{ - public partial class groupidforencodedcardgroup : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Ban", - table: "Users", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "CardGroupNumber", - table: "EncodedCardGroup", - type: "INTEGER", - nullable: false, - defaultValue: 0); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Ban", - table: "Users"); - - migrationBuilder.DropColumn( - name: "CardGroupNumber", - table: "EncodedCardGroup"); - } - } -} diff --git a/TOOHUCardAPI/Migrations/20211029043842_fix groupkey, they send full string.Designer.cs b/TOOHUCardAPI/Migrations/20211029043842_fix groupkey, they send full string.Designer.cs deleted file mode 100644 index 478dc6e..0000000 --- a/TOOHUCardAPI/Migrations/20211029043842_fix groupkey, they send full string.Designer.cs +++ /dev/null @@ -1,97 +0,0 @@ -// -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("20211029043842_fix groupkey, they send full string")] - partial class fixgroupkeytheysendfullstring - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "5.0.11"); - - 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("LevelList") - .HasColumnType("TEXT"); - - b.Property("MaxTeamWave") - .HasColumnType("INTEGER"); - - b.Property("MaxWave") - .HasColumnType("INTEGER"); - - b.Property("PetLevel") - .HasColumnType("INTEGER"); - - b.Property("Point") - .HasColumnType("INTEGER"); - - b.Property("Vip") - .HasColumnType("INTEGER"); - - b.HasKey("SteamId"); - - b.ToTable("Users"); - }); - - 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("EncodedCardGroups"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/TOOHUCardAPI/Migrations/20211029043842_fix groupkey, they send full string.cs b/TOOHUCardAPI/Migrations/20211029043842_fix groupkey, they send full string.cs deleted file mode 100644 index 3de1191..0000000 --- a/TOOHUCardAPI/Migrations/20211029043842_fix groupkey, they send full string.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace TOOHUCardAPI.Migrations -{ - public partial class fixgroupkeytheysendfullstring : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "CardGroupNumber", - table: "EncodedCardGroup"); - - migrationBuilder.AddColumn( - name: "GroupKey", - table: "EncodedCardGroup", - type: "TEXT", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "GroupKey", - table: "EncodedCardGroup"); - - migrationBuilder.AddColumn( - name: "CardGroupNumber", - table: "EncodedCardGroup", - type: "INTEGER", - nullable: false, - defaultValue: 0); - } - } -} diff --git a/TOOHUCardAPI/Migrations/20211030045834_more columns.Designer.cs b/TOOHUCardAPI/Migrations/20211030045834_more columns.Designer.cs deleted file mode 100644 index d3ea945..0000000 --- a/TOOHUCardAPI/Migrations/20211030045834_more columns.Designer.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -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("20211030045834_more columns")] - partial class morecolumns - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "5.0.11"); - - 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("LevelList") - .HasColumnType("TEXT"); - - b.Property("MaxTeamWave") - .HasColumnType("INTEGER"); - - b.Property("MaxWave") - .HasColumnType("INTEGER"); - - b.Property("PetLevel") - .HasColumnType("INTEGER"); - - b.Property("Point") - .HasColumnType("INTEGER"); - - b.Property("Vip") - .HasColumnType("INTEGER"); - - b.HasKey("SteamId"); - - b.ToTable("Users"); - }); - - 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("EncodedCardGroups"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/TOOHUCardAPI/Migrations/20211030045834_more columns.cs b/TOOHUCardAPI/Migrations/20211030045834_more columns.cs deleted file mode 100644 index 95b908e..0000000 --- a/TOOHUCardAPI/Migrations/20211030045834_more columns.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace TOOHUCardAPI.Migrations -{ - public partial class morecolumns : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "KeyUseCount", - table: "Users", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "LastFirstWin", - table: "Users", - type: "TEXT", - nullable: false, - defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "KeyUseCount", - table: "Users"); - - migrationBuilder.DropColumn( - name: "LastFirstWin", - table: "Users"); - } - } -} diff --git a/TOOHUCardAPI/Migrations/20211030200856_more fields and seeder.Designer.cs b/TOOHUCardAPI/Migrations/20211030200856_more fields and seeder.Designer.cs deleted file mode 100644 index d0e5926..0000000 --- a/TOOHUCardAPI/Migrations/20211030200856_more fields and seeder.Designer.cs +++ /dev/null @@ -1,983 +0,0 @@ -// -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("20211030200856_more fields and seeder")] - partial class morefieldsandseeder - { - 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.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("LevelList") - .HasColumnType("TEXT"); - - b.Property("MaxTeamWave") - .HasColumnType("INTEGER"); - - b.Property("MaxWave") - .HasColumnType("INTEGER"); - - b.Property("PetLevel") - .HasColumnType("INTEGER"); - - b.Property("Point") - .HasColumnType("INTEGER"); - - b.Property("Vip") - .HasColumnType("INTEGER"); - - b.HasKey("SteamId"); - - b.ToTable("Users"); - }); - - 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("EncodedCardGroups"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/TOOHUCardAPI/Migrations/20211030200856_more fields and seeder.cs b/TOOHUCardAPI/Migrations/20211030200856_more fields and seeder.cs deleted file mode 100644 index c75306f..0000000 --- a/TOOHUCardAPI/Migrations/20211030200856_more fields and seeder.cs +++ /dev/null @@ -1,566 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace TOOHUCardAPI.Migrations -{ - public partial class morefieldsandseeder : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Cards", - columns: table => new - { - ItemCode = table.Column(type: "TEXT", nullable: false), - CardName = table.Column(type: "TEXT", nullable: true), - Quality = table.Column(type: "INTEGER", nullable: false), - HasVoice = table.Column(type: "INTEGER", nullable: false), - HasPortrait = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Cards", x => x.ItemCode); - }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0026", "rin", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0017", "iku", true, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0092", "medicine", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0064", "shikieiki", true, false, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_1006", "BonusEgg", false, false, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0005", "shanghainingyou", false, false, 1 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0093", "kyouko", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0024", "yuyuko", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2013", "item_2013", false, false, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0058", "luna", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0047", "kanako", true, true, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0068", "komachi", true, false, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0027", "utsuho", true, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0097", "yoshika", true, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_1013", "BonusEgg", false, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2001", "item_2001", false, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0095", "futo", true, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0057", "sunny", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0006", "hourainingyou", false, false, 1 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0056", "star", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2003", "item_2003", false, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2004", "item_2004", false, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0049", "minamitsu", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0023", "reisen", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0013", "lunasa", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0052", "miko", true, true, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0091", "hina", true, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0040", "mokou", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0021", "patchouli", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0094", "soga", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0031", "koishi", true, true, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0012", "lyrica", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0008", "maidyousei", false, false, 1 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0053", "kokoro", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0016", "satori", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0048", "suwako", true, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0035", "yuuka", true, true, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0037", "ran", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0039", "eirin", true, true, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0041", "kaguya", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0033", "koakuma", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0032", "flandre", true, true, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0054", "yuugi", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0059", "alice", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0060", "wriggle", true, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_1005", "BonusEgg", false, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0001", "lily", true, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0062", "inaba", true, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0010", "kogasa", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2012", "item_2012", false, false, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0088", "sizuha", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_1004", "BonusEgg", false, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0020", "tenshi", true, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2005", "item_2005", false, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0046", "sanae", true, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2022", "item_2022", false, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0003", "minoriko", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0022", "sakuya", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_1003", "BonusEgg", false, false, 1 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0011", "letty", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0044", "momiji", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0050", "nue", true, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0075", "clownpiece", true, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0019", "marisa", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0045", "kagerou", true, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0028", "reimu", true, true, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0030", "remilia", true, false, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0015", "rumia", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_1011", "BonusEgg", false, false, 1 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0042", "aya", true, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0069", "toramaru", true, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0061", "keine", true, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0002", "nazrin", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0055", "suika", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2002", "item_2002", false, false, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0007", "hanadayousei", false, false, 1 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0014", "merlin", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0043", "hatate", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2020", "item_2020", false, false, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2017", "item_2017", false, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2016", "item_2016", false, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2006", "item_2006", false, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2009", "item_2009", false, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0018", "mystia", true, true, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0036", "yukari", true, false, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2008", "item_2008", false, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2010", "item_2010", false, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2011", "item_2011", false, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0034", "meirin", true, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0096", "seiga", true, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0004", "mugiyousei", false, false, 1 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0025", "youmu", true, true, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2007", "item_2007", false, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0063", "kisume", true, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0073", "junko", true, false, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0029", "daiyousei", true, true, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_1012", "BonusEgg", false, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0051", "byakuren", true, false, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0080", "shinki", true, false, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0074", "hecatia", true, false, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0038", "chen", true, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_0009", "cirno", true, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2014", "item_2014", false, false, 4 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2015", "item_2015", false, false, 3 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2019", "item_2019", false, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_2018", "item_2018", false, false, 2 }); - - migrationBuilder.InsertData( - table: "Cards", - columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality" }, - values: new object[] { "item_1014", "BonusEgg", false, false, 4 }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Cards"); - } - } -} diff --git a/TOOHUCardAPI/Migrations/20211031004851_cardlevel.Designer.cs b/TOOHUCardAPI/Migrations/20211031004851_cardlevel.Designer.cs deleted file mode 100644 index 0817349..0000000 --- a/TOOHUCardAPI/Migrations/20211031004851_cardlevel.Designer.cs +++ /dev/null @@ -1,1017 +0,0 @@ -// -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("20211031004851_cardlevel")] - partial class cardlevel - { - 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("PetLevel") - .HasColumnType("INTEGER"); - - b.Property("Point") - .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/20211031004851_cardlevel.cs b/TOOHUCardAPI/Migrations/20211031004851_cardlevel.cs deleted file mode 100644 index e37ca30..0000000 --- a/TOOHUCardAPI/Migrations/20211031004851_cardlevel.cs +++ /dev/null @@ -1,56 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace TOOHUCardAPI.Migrations -{ - public partial class cardlevel : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "LevelList", - table: "Users"); - - migrationBuilder.CreateTable( - name: "CardLevel", - columns: table => new - { - UserSteamId = table.Column(type: "TEXT", nullable: false), - CardItemCode = table.Column(type: "TEXT", nullable: false), - Level = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_CardLevel", x => new { x.UserSteamId, x.CardItemCode }); - table.ForeignKey( - name: "FK_CardLevel_Cards_CardItemCode", - column: x => x.CardItemCode, - principalTable: "Cards", - principalColumn: "ItemCode", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_CardLevel_Users_UserSteamId", - column: x => x.UserSteamId, - principalTable: "Users", - principalColumn: "SteamId", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_CardLevel_CardItemCode", - table: "CardLevel", - column: "CardItemCode"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "CardLevel"); - - migrationBuilder.AddColumn( - name: "LevelList", - table: "Users", - type: "TEXT", - nullable: true); - } - } -} diff --git a/TOOHUCardAPI/Migrations/20211031065641_maxpower stuff.Designer.cs b/TOOHUCardAPI/Migrations/20211031065641_maxpower stuff.Designer.cs deleted file mode 100644 index 1df5c20..0000000 --- a/TOOHUCardAPI/Migrations/20211031065641_maxpower stuff.Designer.cs +++ /dev/null @@ -1,1020 +0,0 @@ -// -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("20211031065641_maxpower stuff")] - partial class maxpowerstuff - { - 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("PetLevel") - .HasColumnType("INTEGER"); - - 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/20211031065641_maxpower stuff.cs b/TOOHUCardAPI/Migrations/20211031065641_maxpower stuff.cs deleted file mode 100644 index cfaa40a..0000000 --- a/TOOHUCardAPI/Migrations/20211031065641_maxpower stuff.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace TOOHUCardAPI.Migrations -{ - public partial class maxpowerstuff : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "PowerMaxTotal", - table: "Users", - type: "INTEGER", - nullable: false, - defaultValue: 0); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "PowerMaxTotal", - table: "Users"); - } - } -} diff --git a/TOOHUCardAPI/Migrations/20211031154114_playerdata done for front facing.Designer.cs b/TOOHUCardAPI/Migrations/20211031154114_playerdata done for front facing.Designer.cs deleted file mode 100644 index 061891c..0000000 --- a/TOOHUCardAPI/Migrations/20211031154114_playerdata done for front facing.Designer.cs +++ /dev/null @@ -1,1026 +0,0 @@ -// -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 deleted file mode 100644 index c84e511..0000000 --- a/TOOHUCardAPI/Migrations/20211031154114_playerdata done for front facing.cs +++ /dev/null @@ -1,33 +0,0 @@ -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/20211031180730_daily login change.Designer.cs b/TOOHUCardAPI/Migrations/20211031180730_daily login change.Designer.cs deleted file mode 100644 index 113a4c0..0000000 --- a/TOOHUCardAPI/Migrations/20211031180730_daily login change.Designer.cs +++ /dev/null @@ -1,1029 +0,0 @@ -// -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("20211031180730_daily login change")] - partial class dailyloginchange - { - 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("LastDailyLoginBonus") - .HasColumnType("TEXT"); - - 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/20211031180730_daily login change.cs b/TOOHUCardAPI/Migrations/20211031180730_daily login change.cs deleted file mode 100644 index 064b8cd..0000000 --- a/TOOHUCardAPI/Migrations/20211031180730_daily login change.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace TOOHUCardAPI.Migrations -{ - public partial class dailyloginchange : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "LastDailyLoginBonus", - table: "Users", - type: "TEXT", - nullable: false, - defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "LastDailyLoginBonus", - table: "Users"); - } - } -} diff --git a/TOOHUCardAPI/Migrations/AppDbContextModelSnapshot.cs b/TOOHUCardAPI/Migrations/AppDbContextModelSnapshot.cs deleted file mode 100644 index 964924c..0000000 --- a/TOOHUCardAPI/Migrations/AppDbContextModelSnapshot.cs +++ /dev/null @@ -1,1027 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using TOOHUCardAPI.Data; - -namespace TOOHUCardAPI.Migrations -{ - [DbContext(typeof(AppDbContext))] - partial class AppDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(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("LastDailyLoginBonus") - .HasColumnType("TEXT"); - - 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/Startup.cs b/TOOHUCardAPI/Startup.cs index 58fb9f9..0b688e6 100644 --- a/TOOHUCardAPI/Startup.cs +++ b/TOOHUCardAPI/Startup.cs @@ -12,6 +12,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Microsoft.OpenApi.Models; +using NLog.Extensions.Logging; using TOOHUCardAPI.Data; using TOOHUCardAPI.Data.Repositories; using TOOHUCardAPI.Data.Services; @@ -40,6 +41,14 @@ namespace TOOHUCardAPI services.AddScoped(); services.AddScoped(); services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddLogging(opt => + { + opt.ClearProviders(); + opt.AddNLog(); + }); + services.AddAutoMapper(typeof(AutomapProfile)); services.AddSwaggerGen(c => { diff --git a/TOOHUCardAPI/TOOHUCardAPI.csproj b/TOOHUCardAPI/TOOHUCardAPI.csproj index 4094e3c..95d5f27 100644 --- a/TOOHUCardAPI/TOOHUCardAPI.csproj +++ b/TOOHUCardAPI/TOOHUCardAPI.csproj @@ -15,6 +15,9 @@ + + + diff --git a/TOOHUCardAPI/nlog.config b/TOOHUCardAPI/nlog.config new file mode 100644 index 0000000..aaf415e --- /dev/null +++ b/TOOHUCardAPI/nlog.config @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file