From a809e0db7634e9cec0aa332e54bc29a3959d67ab Mon Sep 17 00:00:00 2001 From: Ryan Peters Date: Fri, 7 Apr 2023 15:02:25 -0400 Subject: [PATCH] able to create a match --- Controllers/HomeController.cs | 57 +- DbContext.cs | 10 +- Entities/DeckCard.cs | 1 + Migrations/20230407190009_initial.Designer.cs | 1349 +++++++++++++++++ Migrations/20230407190009_initial.cs | 578 +++++++ Migrations/DbContextModelSnapshot.cs | 1346 ++++++++++++++++ 6 files changed, 3300 insertions(+), 41 deletions(-) create mode 100644 Migrations/20230407190009_initial.Designer.cs create mode 100644 Migrations/20230407190009_initial.cs create mode 100644 Migrations/DbContextModelSnapshot.cs diff --git a/Controllers/HomeController.cs b/Controllers/HomeController.cs index 7aa8327..3730e87 100644 --- a/Controllers/HomeController.cs +++ b/Controllers/HomeController.cs @@ -22,60 +22,47 @@ public class HomeController : Controller return View(); } - public async Task CreateMatch([FromServices] UserManager userManager) + public async Task CreateMatch([FromServices] UserManager userManager, Guid userOneGuid, Guid userTwoGuid) { - var userOne = new User - { - Name = "Krystle", - UserName = "krystle", - Email = "krystle@allwillynilly.com" - }; - - var userTwo = new User - { - Name = "Ryan", - UserName = "ryan", - Email = "ryan@binarydad.com" - }; - - var resultKrystle = await userManager.CreateAsync(userOne, "C0urtY@rd"); - var resultRyan = await userManager.CreateAsync(userTwo, "C0urtY@rd"); - + //var userOne = userManager.FindByIdAsync(userOneGuid.ToString()); + //var userOne = userManager.FindByIdAsync(userOneGuid.ToString()); + var playerOne = new Player { - Id = Guid.NewGuid(), Alias = "SwiggitySwooty", - UserId = resultKrystle + UserId = userOneGuid }; var playerTwo = new Player { - Id = Guid.NewGuid(), Alias = "BabeFoy", - UserId = Guid.Parse("08db3712-7c5f-430b-882e-44abd63b5324") + UserId = userTwoGuid }; - var players = new[] { playerOne, playerTwo }; + dbContext.Add(playerOne); + dbContext.Add(playerTwo); var match = new Match { - Id = Guid.NewGuid(), Created = DateTime.Now, CurrentTurnPlayerId = playerOne.Id, PlayerOneId = playerOne.Id, PlayerTwoId = playerTwo.Id }; - var deck = cards + dbContext.Add(match); + + var deck = dbContext.Cards .OrderBy(c => Guid.NewGuid()) .Select(c => new DeckCard { CardId = c.Id, - MatchId = match.Id, - Id = Guid.NewGuid() + MatchId = match.Id }) .ToList(); + dbContext.AddRange(deck); + var handCards = new List(); for (var i = 1; i <= 14; i += 2) @@ -83,24 +70,28 @@ public class HomeController : Controller var deckCard = deck[i]; var deckCard2 = deck[i + 1]; - deck.Remove(deckCard); + deckCard.Dealt = true; handCards.Add(new HandCard { DeckCardId = deckCard.Id, - PlayerId = playerOne.Id, - Id = Guid.NewGuid() + PlayerId = playerOne.Id }); - deck.Remove(deckCard2); + deckCard2.Dealt = true; handCards.Add(new HandCard { DeckCardId = deckCard2.Id, - PlayerId = playerTwo.Id, - Id = Guid.NewGuid() + PlayerId = playerTwo.Id }); } + + dbContext.AddRange(handCards); + + dbContext.SaveChanges(); + + throw new NotImplementedException(); } [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] diff --git a/DbContext.cs b/DbContext.cs index fa6cde9..63870b0 100644 --- a/DbContext.cs +++ b/DbContext.cs @@ -11,25 +11,19 @@ public class DbContext : IdentityDbContext, Guid> { base.OnModelCreating(modelBuilder); - //return; - // generate two source decks var deck1 = CardUtility.GenerateCards(); var deck2 = CardUtility.GenerateCards(); var cards = deck1.Concat(deck2); - - modelBuilder.Entity().HasData(cards); - modelBuilder.Entity().HasData(players); - modelBuilder.Entity().HasData(match); - modelBuilder.Entity().HasData(deck); - modelBuilder.Entity().HasData(handCards); } public DbSet Cards { get; set; } public DbSet PlayerCards { get; set; } + public DbSet DeckCards { get; set; } + public DbSet HandCards { get; set; } public DbSet Matches { get; set; } public DbSet Players { get; set; } diff --git a/Entities/DeckCard.cs b/Entities/DeckCard.cs index 26cbe56..8fec766 100644 --- a/Entities/DeckCard.cs +++ b/Entities/DeckCard.cs @@ -7,5 +7,6 @@ public class DeckCard public Match Match { get; set; } public Guid CardId { get; set; } public Card Card { get; set; } + public bool Dealt { get; set; } public int Order { get; set; } } \ No newline at end of file diff --git a/Migrations/20230407190009_initial.Designer.cs b/Migrations/20230407190009_initial.Designer.cs new file mode 100644 index 0000000..2cab138 --- /dev/null +++ b/Migrations/20230407190009_initial.Designer.cs @@ -0,0 +1,1349 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Sequence.Migrations +{ + [DbContext(typeof(DbContext))] + [Migration("20230407190009_initial")] + partial class initial + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "7.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClaimType") + .HasColumnType("longtext"); + + b.Property("ClaimValue") + .HasColumnType("longtext"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClaimType") + .HasColumnType("longtext"); + + b.Property("ClaimValue") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderDisplayName") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("Sequence.Entities.Card", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("PositionX") + .HasColumnType("int"); + + b.Property("PositionY") + .HasColumnType("int"); + + b.Property("Suit") + .HasColumnType("int"); + + b.Property("Value") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.ToTable("Cards"); + + b.HasData( + new + { + Id = new Guid("a8f3f9c0-9a56-4d9b-b667-0e30786a5960"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "1" + }, + new + { + Id = new Guid("04c32ba8-7f41-43c1-8a2e-a15b867adc78"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "2" + }, + new + { + Id = new Guid("17b29679-4234-4d3f-bfad-04533aa54342"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "3" + }, + new + { + Id = new Guid("1e866ad1-fbb8-42ce-aad2-d83afb874249"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "4" + }, + new + { + Id = new Guid("e636a707-7ac2-4f4c-b5aa-31e6adaccf0c"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "5" + }, + new + { + Id = new Guid("a405ac49-4d1f-4fb1-a9d6-b2cbdc9be0e6"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "6" + }, + new + { + Id = new Guid("411ebcae-4eb1-41a8-bb4a-4edf75fff236"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "7" + }, + new + { + Id = new Guid("7fbefe8f-ee4c-4c8a-a58d-4883d8dc9b77"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "8" + }, + new + { + Id = new Guid("a6db77ff-dd24-43fb-b77f-c7491f1180a0"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "9" + }, + new + { + Id = new Guid("e22a362f-73de-43a4-9b94-4f8c02913723"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "10" + }, + new + { + Id = new Guid("0c0748c2-c078-40da-a1b2-db4230e6b143"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "J" + }, + new + { + Id = new Guid("cd3a137a-10eb-483c-bcb8-b4403d93e08b"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "Q" + }, + new + { + Id = new Guid("3443b8bc-07eb-40f2-a2a5-dbafd5eebe4a"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "K" + }, + new + { + Id = new Guid("4b9983d5-124e-4eb8-a425-d6dc5f76062e"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "1" + }, + new + { + Id = new Guid("a72e423e-a425-4e06-9d04-b762f9feb49e"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "2" + }, + new + { + Id = new Guid("688e851d-148c-403c-94b3-e629ec9f9005"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "3" + }, + new + { + Id = new Guid("b3c0da5f-bce3-46b9-923a-aa54a6e8c1d3"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "4" + }, + new + { + Id = new Guid("e0c2b5f7-9bd5-4caf-96a3-99462ee0ad1d"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "5" + }, + new + { + Id = new Guid("8cf7541b-751d-4e71-8c5e-b430b840ada3"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "6" + }, + new + { + Id = new Guid("7b089dc2-629a-427a-aadf-13740b4cd519"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "7" + }, + new + { + Id = new Guid("3f75fce4-8b81-4f60-86d1-c7bb501f1986"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "8" + }, + new + { + Id = new Guid("94a0fddc-d169-4c49-a053-5ba7772375ca"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "9" + }, + new + { + Id = new Guid("659b91b7-b689-43c3-ae84-7e4c58b9bf8f"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "10" + }, + new + { + Id = new Guid("00fbacbf-5f4b-4be6-a026-9e28e1943b82"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "J" + }, + new + { + Id = new Guid("3ae71eec-67ed-4f85-95d7-864743ba2db1"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "Q" + }, + new + { + Id = new Guid("e388446c-bcdd-4d97-9bd7-fc8967a970b8"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "K" + }, + new + { + Id = new Guid("2da9f226-02e7-48db-a055-c23aeee94e9d"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "1" + }, + new + { + Id = new Guid("8b322db9-b520-4807-98f0-971b51a5ca45"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "2" + }, + new + { + Id = new Guid("9ee21eee-ebc3-4d1e-965b-1779e79fc615"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "3" + }, + new + { + Id = new Guid("7f66ba82-ab08-4991-9364-c766522d159e"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "4" + }, + new + { + Id = new Guid("24c0ba84-badc-4d99-b441-1dc6846dd4b3"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "5" + }, + new + { + Id = new Guid("d6c9b402-3a12-4162-9a02-775bc16f2339"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "6" + }, + new + { + Id = new Guid("707b60e2-10ba-4a96-b430-8a60cc373361"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "7" + }, + new + { + Id = new Guid("1aa17695-15c8-4496-b040-7c2ac0e9f60b"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "8" + }, + new + { + Id = new Guid("afd63b01-25b5-4aa9-a167-31f54c4d8caa"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "9" + }, + new + { + Id = new Guid("bbc87958-3d44-4b19-a161-75b6ad5bdb90"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "10" + }, + new + { + Id = new Guid("a784a174-df9b-4415-b539-d097177b3355"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "J" + }, + new + { + Id = new Guid("e2d5262d-10ee-458f-b751-b26971a36e77"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "Q" + }, + new + { + Id = new Guid("2f3d2fa6-3b6b-43c7-8197-a6b88c98571f"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "K" + }, + new + { + Id = new Guid("fc19d235-4a60-4ae3-ae35-6e8c9b143401"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "1" + }, + new + { + Id = new Guid("76f065dc-99f4-4761-9494-243365fc8d65"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "2" + }, + new + { + Id = new Guid("466e60c5-7427-41f6-9ce0-78f93c71b1da"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "3" + }, + new + { + Id = new Guid("c19999f2-8821-4831-a9dd-818018c47302"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "4" + }, + new + { + Id = new Guid("bb57dbd6-e33d-4120-975b-d62d46f96011"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "5" + }, + new + { + Id = new Guid("4f15ccb4-a213-4bff-a349-6237c404a181"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "6" + }, + new + { + Id = new Guid("fcd681be-fb37-41e6-8bf1-38f567b3e44a"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "7" + }, + new + { + Id = new Guid("6202ee80-0374-4b1d-a5ba-b0b990fb940f"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "8" + }, + new + { + Id = new Guid("e0cd0a2e-ac3f-4a3c-b967-cdd2f9255f42"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "9" + }, + new + { + Id = new Guid("15736c7c-d2b0-4b3e-b182-f1718c410bc7"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "10" + }, + new + { + Id = new Guid("87810d1f-1b3d-4bab-a40a-d2338e27c559"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "J" + }, + new + { + Id = new Guid("b4e83980-0a93-4c3e-90e6-5411fef3b1a3"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "Q" + }, + new + { + Id = new Guid("abcd1bd2-a904-4a4c-ad20-387cb7b72023"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "K" + }, + new + { + Id = new Guid("534738d0-3059-4d19-bc4e-69c63445a5e6"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "1" + }, + new + { + Id = new Guid("f626f981-9d4d-4334-ae25-1a4427661060"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "2" + }, + new + { + Id = new Guid("a630f594-3371-4c91-97c1-df0b28d03191"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "3" + }, + new + { + Id = new Guid("7e88e9e0-9ec3-490c-9bb9-ca9b83b67641"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "4" + }, + new + { + Id = new Guid("369440e7-7a7d-4229-8e1c-f493f63c2c28"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "5" + }, + new + { + Id = new Guid("aeb16cff-97ac-4e22-b460-0213a84cc0c5"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "6" + }, + new + { + Id = new Guid("3d4f9a38-c302-448e-ab29-6757c7d11b29"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "7" + }, + new + { + Id = new Guid("ee256eec-5826-4684-9985-406ae3ac9b32"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "8" + }, + new + { + Id = new Guid("380a72e2-d9fc-4c82-9982-dfb5a401533b"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "9" + }, + new + { + Id = new Guid("8d1aed6e-6f7b-477a-8862-86c8dd7f05ef"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "10" + }, + new + { + Id = new Guid("94ca0b08-fa48-428e-b0dd-e2a3a73d196f"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "J" + }, + new + { + Id = new Guid("40fae9fb-1327-4eb2-a26e-7cec21c50b87"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "Q" + }, + new + { + Id = new Guid("b6792e49-7585-410f-958e-296aaa79a426"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "K" + }, + new + { + Id = new Guid("78752484-f7b4-4584-a5b5-c5c3ba52c18d"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "1" + }, + new + { + Id = new Guid("e64378af-8e6c-46d3-9a56-49947579eca7"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "2" + }, + new + { + Id = new Guid("de47e43b-ecbd-49f5-b168-f0a3dfcef879"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "3" + }, + new + { + Id = new Guid("6333c8b4-b5c0-4023-aaf1-4c0e33eb884c"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "4" + }, + new + { + Id = new Guid("79afbe72-5fb1-49f1-b7f5-15e90d675692"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "5" + }, + new + { + Id = new Guid("230229bb-54dc-4a5f-9da3-e1a18b8a77b5"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "6" + }, + new + { + Id = new Guid("82c24b2f-77cf-4cc9-a572-1f12665516e0"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "7" + }, + new + { + Id = new Guid("6080b1fa-36b6-495d-a42c-d85b5cbb3050"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "8" + }, + new + { + Id = new Guid("87413764-0217-46ab-ba66-16aa5703b1d6"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "9" + }, + new + { + Id = new Guid("4451e515-b011-48fb-843b-7af1c4ad5447"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "10" + }, + new + { + Id = new Guid("60daa440-6b3c-4b99-ba84-51f58be74956"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "J" + }, + new + { + Id = new Guid("d6fddb98-c3ab-4af6-a3fb-66fa8c98ae50"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "Q" + }, + new + { + Id = new Guid("3b1274a3-b157-4d25-b9dc-74b724764e36"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "K" + }, + new + { + Id = new Guid("fafdb5af-44ef-4a7d-b35e-59bbdef46ffc"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "1" + }, + new + { + Id = new Guid("5c08d140-3101-4ac4-aebb-d526d2b66a41"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "2" + }, + new + { + Id = new Guid("5386f8e6-e54b-4a92-9a78-7591ca7e72f2"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "3" + }, + new + { + Id = new Guid("c5931746-958f-4028-9225-9ec90e1c3991"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "4" + }, + new + { + Id = new Guid("7b493a4c-3f31-42dc-9ccc-f49486d703c9"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "5" + }, + new + { + Id = new Guid("4606eb3b-45c8-42ef-b0f7-742366f9edb3"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "6" + }, + new + { + Id = new Guid("59256dda-eab5-4747-b519-6f3b89d100e0"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "7" + }, + new + { + Id = new Guid("be1f7ad7-3acf-4c7a-94b8-b5bf595698b3"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "8" + }, + new + { + Id = new Guid("7c19c024-3daf-4f31-afec-1335cae4a892"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "9" + }, + new + { + Id = new Guid("f94c64ff-0d6a-4cb2-b075-b3a33916236f"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "10" + }, + new + { + Id = new Guid("39d6e762-fcfa-484c-bb7f-0f299cd79c4c"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "J" + }, + new + { + Id = new Guid("f1de527d-6c6a-47f6-8ec6-307b45e043d2"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "Q" + }, + new + { + Id = new Guid("dff7ee16-3127-40bb-970f-74afdc2b434b"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "K" + }, + new + { + Id = new Guid("a9e1b1e7-126b-45a7-b742-4a920daa7fad"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "1" + }, + new + { + Id = new Guid("ee7eac08-14b1-411a-8f66-e105d867222e"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "2" + }, + new + { + Id = new Guid("49030225-83e8-4008-855e-37a5a93b61bf"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "3" + }, + new + { + Id = new Guid("8f00a428-564d-4989-8a15-06863fa52a25"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "4" + }, + new + { + Id = new Guid("fe6afd37-7b07-4630-a717-f6bcbdcac2dd"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "5" + }, + new + { + Id = new Guid("28a50673-74c8-4796-876c-a856a5d09bc9"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "6" + }, + new + { + Id = new Guid("0ec58b04-8b16-4749-ac90-9c7d6d564cf9"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "7" + }, + new + { + Id = new Guid("2a14d58d-77b2-4ef2-aa31-c465d817f6f7"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "8" + }, + new + { + Id = new Guid("6949b2d2-41ab-45ed-a242-c30450592087"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "9" + }, + new + { + Id = new Guid("9e9525c9-b059-4a26-b894-4689895cd77c"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "10" + }, + new + { + Id = new Guid("9c56a504-c6d4-43df-9ab3-e52be9e6f26f"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "J" + }, + new + { + Id = new Guid("dd944dba-2157-49e2-812f-64c7f9a7739f"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "Q" + }, + new + { + Id = new Guid("e1e8e8a1-fc5d-4117-aaa9-cf639834cb7c"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "K" + }); + }); + + modelBuilder.Entity("Sequence.Entities.DeckCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CardId") + .HasColumnType("char(36)"); + + b.Property("Dealt") + .HasColumnType("tinyint(1)"); + + b.Property("MatchId") + .HasColumnType("char(36)"); + + b.Property("Order") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CardId"); + + b.HasIndex("MatchId"); + + b.ToTable("DeckCards"); + }); + + modelBuilder.Entity("Sequence.Entities.HandCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DeckCardId") + .HasColumnType("char(36)"); + + b.Property("PlayerId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DeckCardId"); + + b.HasIndex("PlayerId"); + + b.ToTable("HandCards"); + }); + + modelBuilder.Entity("Sequence.Entities.Match", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("CurrentTurnPlayerId") + .HasColumnType("char(36)"); + + b.Property("PlayerOneId") + .HasColumnType("char(36)"); + + b.Property("PlayerTwoId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PlayerOneId"); + + b.HasIndex("PlayerTwoId"); + + b.ToTable("Matches"); + }); + + modelBuilder.Entity("Sequence.Entities.Player", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Alias") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Players"); + }); + + modelBuilder.Entity("Sequence.Entities.PlayerCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DeckCardId") + .HasColumnType("char(36)"); + + b.Property("PlayerId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DeckCardId"); + + b.HasIndex("PlayerId"); + + b.ToTable("PlayerCards"); + }); + + modelBuilder.Entity("Sequence.Entities.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("LockoutEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("longtext"); + + b.Property("PhoneNumber") + .HasColumnType("longtext"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("SecurityStamp") + .HasColumnType("longtext"); + + b.Property("TwoFactorEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Sequence.Entities.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Sequence.Entities.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Sequence.Entities.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Sequence.Entities.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Sequence.Entities.DeckCard", b => + { + b.HasOne("Sequence.Entities.Card", "Card") + .WithMany() + .HasForeignKey("CardId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Sequence.Entities.Match", "Match") + .WithMany("Deck") + .HasForeignKey("MatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Card"); + + b.Navigation("Match"); + }); + + modelBuilder.Entity("Sequence.Entities.HandCard", b => + { + b.HasOne("Sequence.Entities.DeckCard", "DeckCard") + .WithMany() + .HasForeignKey("DeckCardId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Sequence.Entities.Player", "Player") + .WithMany("HandCards") + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeckCard"); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("Sequence.Entities.Match", b => + { + b.HasOne("Sequence.Entities.Player", "PlayerOne") + .WithMany() + .HasForeignKey("PlayerOneId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Sequence.Entities.Player", "PlayerTwo") + .WithMany() + .HasForeignKey("PlayerTwoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlayerOne"); + + b.Navigation("PlayerTwo"); + }); + + modelBuilder.Entity("Sequence.Entities.Player", b => + { + b.HasOne("Sequence.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Sequence.Entities.PlayerCard", b => + { + b.HasOne("Sequence.Entities.DeckCard", "DeckCard") + .WithMany() + .HasForeignKey("DeckCardId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Sequence.Entities.Player", "Player") + .WithMany("PlayerCards") + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeckCard"); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("Sequence.Entities.Match", b => + { + b.Navigation("Deck"); + }); + + modelBuilder.Entity("Sequence.Entities.Player", b => + { + b.Navigation("HandCards"); + + b.Navigation("PlayerCards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/20230407190009_initial.cs b/Migrations/20230407190009_initial.cs new file mode 100644 index 0000000..4fc9668 --- /dev/null +++ b/Migrations/20230407190009_initial.cs @@ -0,0 +1,578 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional + +namespace Sequence.Migrations +{ + /// + public partial class initial : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AspNetRoles", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + NormalizedName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetRoles", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AspNetUsers", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + UserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + NormalizedUserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Email = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + NormalizedEmail = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + EmailConfirmed = table.Column(type: "tinyint(1)", nullable: false), + PasswordHash = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + SecurityStamp = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + PhoneNumber = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + PhoneNumberConfirmed = table.Column(type: "tinyint(1)", nullable: false), + TwoFactorEnabled = table.Column(type: "tinyint(1)", nullable: false), + LockoutEnd = table.Column(type: "datetime(6)", nullable: true), + LockoutEnabled = table.Column(type: "tinyint(1)", nullable: false), + AccessFailedCount = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUsers", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "Cards", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Suit = table.Column(type: "int", nullable: false), + Value = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + PositionX = table.Column(type: "int", nullable: false), + PositionY = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Cards", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AspNetRoleClaims", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + RoleId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + ClaimType = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ClaimValue = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", + column: x => x.RoleId, + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AspNetUserClaims", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + ClaimType = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ClaimValue = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AspNetUserClaims_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AspNetUserLogins", + columns: table => new + { + LoginProvider = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProviderKey = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProviderDisplayName = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); + table.ForeignKey( + name: "FK_AspNetUserLogins_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AspNetUserRoles", + columns: table => new + { + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + RoleId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AspNetUserRoles_AspNetRoles_RoleId", + column: x => x.RoleId, + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AspNetUserRoles_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AspNetUserTokens", + columns: table => new + { + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + LoginProvider = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Value = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AspNetUserTokens_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "Players", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Alias = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_Players", x => x.Id); + table.ForeignKey( + name: "FK_Players_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "Matches", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Created = table.Column(type: "datetime(6)", nullable: false), + PlayerOneId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + PlayerTwoId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + CurrentTurnPlayerId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_Matches", x => x.Id); + table.ForeignKey( + name: "FK_Matches_Players_PlayerOneId", + column: x => x.PlayerOneId, + principalTable: "Players", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Matches_Players_PlayerTwoId", + column: x => x.PlayerTwoId, + principalTable: "Players", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "DeckCards", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + MatchId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + CardId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Dealt = table.Column(type: "tinyint(1)", nullable: false), + Order = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_DeckCards", x => x.Id); + table.ForeignKey( + name: "FK_DeckCards_Cards_CardId", + column: x => x.CardId, + principalTable: "Cards", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_DeckCards_Matches_MatchId", + column: x => x.MatchId, + principalTable: "Matches", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "HandCards", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + PlayerId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + DeckCardId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_HandCards", x => x.Id); + table.ForeignKey( + name: "FK_HandCards_DeckCards_DeckCardId", + column: x => x.DeckCardId, + principalTable: "DeckCards", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_HandCards_Players_PlayerId", + column: x => x.PlayerId, + principalTable: "Players", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "PlayerCards", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + PlayerId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + DeckCardId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_PlayerCards", x => x.Id); + table.ForeignKey( + name: "FK_PlayerCards_DeckCards_DeckCardId", + column: x => x.DeckCardId, + principalTable: "DeckCards", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_PlayerCards_Players_PlayerId", + column: x => x.PlayerId, + principalTable: "Players", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.InsertData( + table: "Cards", + columns: new[] { "Id", "PositionX", "PositionY", "Suit", "Value" }, + values: new object[,] + { + { new Guid("00fbacbf-5f4b-4be6-a026-9e28e1943b82"), 0, 0, 1, "J" }, + { new Guid("04c32ba8-7f41-43c1-8a2e-a15b867adc78"), 0, 0, 0, "2" }, + { new Guid("0c0748c2-c078-40da-a1b2-db4230e6b143"), 0, 0, 0, "J" }, + { new Guid("0ec58b04-8b16-4749-ac90-9c7d6d564cf9"), 0, 0, 3, "7" }, + { new Guid("15736c7c-d2b0-4b3e-b182-f1718c410bc7"), 0, 0, 3, "10" }, + { new Guid("17b29679-4234-4d3f-bfad-04533aa54342"), 0, 0, 0, "3" }, + { new Guid("1aa17695-15c8-4496-b040-7c2ac0e9f60b"), 0, 0, 2, "8" }, + { new Guid("1e866ad1-fbb8-42ce-aad2-d83afb874249"), 0, 0, 0, "4" }, + { new Guid("230229bb-54dc-4a5f-9da3-e1a18b8a77b5"), 0, 0, 1, "6" }, + { new Guid("24c0ba84-badc-4d99-b441-1dc6846dd4b3"), 0, 0, 2, "5" }, + { new Guid("28a50673-74c8-4796-876c-a856a5d09bc9"), 0, 0, 3, "6" }, + { new Guid("2a14d58d-77b2-4ef2-aa31-c465d817f6f7"), 0, 0, 3, "8" }, + { new Guid("2da9f226-02e7-48db-a055-c23aeee94e9d"), 0, 0, 2, "1" }, + { new Guid("2f3d2fa6-3b6b-43c7-8197-a6b88c98571f"), 0, 0, 2, "K" }, + { new Guid("3443b8bc-07eb-40f2-a2a5-dbafd5eebe4a"), 0, 0, 0, "K" }, + { new Guid("369440e7-7a7d-4229-8e1c-f493f63c2c28"), 0, 0, 0, "5" }, + { new Guid("380a72e2-d9fc-4c82-9982-dfb5a401533b"), 0, 0, 0, "9" }, + { new Guid("39d6e762-fcfa-484c-bb7f-0f299cd79c4c"), 0, 0, 2, "J" }, + { new Guid("3ae71eec-67ed-4f85-95d7-864743ba2db1"), 0, 0, 1, "Q" }, + { new Guid("3b1274a3-b157-4d25-b9dc-74b724764e36"), 0, 0, 1, "K" }, + { new Guid("3d4f9a38-c302-448e-ab29-6757c7d11b29"), 0, 0, 0, "7" }, + { new Guid("3f75fce4-8b81-4f60-86d1-c7bb501f1986"), 0, 0, 1, "8" }, + { new Guid("40fae9fb-1327-4eb2-a26e-7cec21c50b87"), 0, 0, 0, "Q" }, + { new Guid("411ebcae-4eb1-41a8-bb4a-4edf75fff236"), 0, 0, 0, "7" }, + { new Guid("4451e515-b011-48fb-843b-7af1c4ad5447"), 0, 0, 1, "10" }, + { new Guid("4606eb3b-45c8-42ef-b0f7-742366f9edb3"), 0, 0, 2, "6" }, + { new Guid("466e60c5-7427-41f6-9ce0-78f93c71b1da"), 0, 0, 3, "3" }, + { new Guid("49030225-83e8-4008-855e-37a5a93b61bf"), 0, 0, 3, "3" }, + { new Guid("4b9983d5-124e-4eb8-a425-d6dc5f76062e"), 0, 0, 1, "1" }, + { new Guid("4f15ccb4-a213-4bff-a349-6237c404a181"), 0, 0, 3, "6" }, + { new Guid("534738d0-3059-4d19-bc4e-69c63445a5e6"), 0, 0, 0, "1" }, + { new Guid("5386f8e6-e54b-4a92-9a78-7591ca7e72f2"), 0, 0, 2, "3" }, + { new Guid("59256dda-eab5-4747-b519-6f3b89d100e0"), 0, 0, 2, "7" }, + { new Guid("5c08d140-3101-4ac4-aebb-d526d2b66a41"), 0, 0, 2, "2" }, + { new Guid("6080b1fa-36b6-495d-a42c-d85b5cbb3050"), 0, 0, 1, "8" }, + { new Guid("60daa440-6b3c-4b99-ba84-51f58be74956"), 0, 0, 1, "J" }, + { new Guid("6202ee80-0374-4b1d-a5ba-b0b990fb940f"), 0, 0, 3, "8" }, + { new Guid("6333c8b4-b5c0-4023-aaf1-4c0e33eb884c"), 0, 0, 1, "4" }, + { new Guid("659b91b7-b689-43c3-ae84-7e4c58b9bf8f"), 0, 0, 1, "10" }, + { new Guid("688e851d-148c-403c-94b3-e629ec9f9005"), 0, 0, 1, "3" }, + { new Guid("6949b2d2-41ab-45ed-a242-c30450592087"), 0, 0, 3, "9" }, + { new Guid("707b60e2-10ba-4a96-b430-8a60cc373361"), 0, 0, 2, "7" }, + { new Guid("76f065dc-99f4-4761-9494-243365fc8d65"), 0, 0, 3, "2" }, + { new Guid("78752484-f7b4-4584-a5b5-c5c3ba52c18d"), 0, 0, 1, "1" }, + { new Guid("79afbe72-5fb1-49f1-b7f5-15e90d675692"), 0, 0, 1, "5" }, + { new Guid("7b089dc2-629a-427a-aadf-13740b4cd519"), 0, 0, 1, "7" }, + { new Guid("7b493a4c-3f31-42dc-9ccc-f49486d703c9"), 0, 0, 2, "5" }, + { new Guid("7c19c024-3daf-4f31-afec-1335cae4a892"), 0, 0, 2, "9" }, + { new Guid("7e88e9e0-9ec3-490c-9bb9-ca9b83b67641"), 0, 0, 0, "4" }, + { new Guid("7f66ba82-ab08-4991-9364-c766522d159e"), 0, 0, 2, "4" }, + { new Guid("7fbefe8f-ee4c-4c8a-a58d-4883d8dc9b77"), 0, 0, 0, "8" }, + { new Guid("82c24b2f-77cf-4cc9-a572-1f12665516e0"), 0, 0, 1, "7" }, + { new Guid("87413764-0217-46ab-ba66-16aa5703b1d6"), 0, 0, 1, "9" }, + { new Guid("87810d1f-1b3d-4bab-a40a-d2338e27c559"), 0, 0, 3, "J" }, + { new Guid("8b322db9-b520-4807-98f0-971b51a5ca45"), 0, 0, 2, "2" }, + { new Guid("8cf7541b-751d-4e71-8c5e-b430b840ada3"), 0, 0, 1, "6" }, + { new Guid("8d1aed6e-6f7b-477a-8862-86c8dd7f05ef"), 0, 0, 0, "10" }, + { new Guid("8f00a428-564d-4989-8a15-06863fa52a25"), 0, 0, 3, "4" }, + { new Guid("94a0fddc-d169-4c49-a053-5ba7772375ca"), 0, 0, 1, "9" }, + { new Guid("94ca0b08-fa48-428e-b0dd-e2a3a73d196f"), 0, 0, 0, "J" }, + { new Guid("9c56a504-c6d4-43df-9ab3-e52be9e6f26f"), 0, 0, 3, "J" }, + { new Guid("9e9525c9-b059-4a26-b894-4689895cd77c"), 0, 0, 3, "10" }, + { new Guid("9ee21eee-ebc3-4d1e-965b-1779e79fc615"), 0, 0, 2, "3" }, + { new Guid("a405ac49-4d1f-4fb1-a9d6-b2cbdc9be0e6"), 0, 0, 0, "6" }, + { new Guid("a630f594-3371-4c91-97c1-df0b28d03191"), 0, 0, 0, "3" }, + { new Guid("a6db77ff-dd24-43fb-b77f-c7491f1180a0"), 0, 0, 0, "9" }, + { new Guid("a72e423e-a425-4e06-9d04-b762f9feb49e"), 0, 0, 1, "2" }, + { new Guid("a784a174-df9b-4415-b539-d097177b3355"), 0, 0, 2, "J" }, + { new Guid("a8f3f9c0-9a56-4d9b-b667-0e30786a5960"), 0, 0, 0, "1" }, + { new Guid("a9e1b1e7-126b-45a7-b742-4a920daa7fad"), 0, 0, 3, "1" }, + { new Guid("abcd1bd2-a904-4a4c-ad20-387cb7b72023"), 0, 0, 3, "K" }, + { new Guid("aeb16cff-97ac-4e22-b460-0213a84cc0c5"), 0, 0, 0, "6" }, + { new Guid("afd63b01-25b5-4aa9-a167-31f54c4d8caa"), 0, 0, 2, "9" }, + { new Guid("b3c0da5f-bce3-46b9-923a-aa54a6e8c1d3"), 0, 0, 1, "4" }, + { new Guid("b4e83980-0a93-4c3e-90e6-5411fef3b1a3"), 0, 0, 3, "Q" }, + { new Guid("b6792e49-7585-410f-958e-296aaa79a426"), 0, 0, 0, "K" }, + { new Guid("bb57dbd6-e33d-4120-975b-d62d46f96011"), 0, 0, 3, "5" }, + { new Guid("bbc87958-3d44-4b19-a161-75b6ad5bdb90"), 0, 0, 2, "10" }, + { new Guid("be1f7ad7-3acf-4c7a-94b8-b5bf595698b3"), 0, 0, 2, "8" }, + { new Guid("c19999f2-8821-4831-a9dd-818018c47302"), 0, 0, 3, "4" }, + { new Guid("c5931746-958f-4028-9225-9ec90e1c3991"), 0, 0, 2, "4" }, + { new Guid("cd3a137a-10eb-483c-bcb8-b4403d93e08b"), 0, 0, 0, "Q" }, + { new Guid("d6c9b402-3a12-4162-9a02-775bc16f2339"), 0, 0, 2, "6" }, + { new Guid("d6fddb98-c3ab-4af6-a3fb-66fa8c98ae50"), 0, 0, 1, "Q" }, + { new Guid("dd944dba-2157-49e2-812f-64c7f9a7739f"), 0, 0, 3, "Q" }, + { new Guid("de47e43b-ecbd-49f5-b168-f0a3dfcef879"), 0, 0, 1, "3" }, + { new Guid("dff7ee16-3127-40bb-970f-74afdc2b434b"), 0, 0, 2, "K" }, + { new Guid("e0c2b5f7-9bd5-4caf-96a3-99462ee0ad1d"), 0, 0, 1, "5" }, + { new Guid("e0cd0a2e-ac3f-4a3c-b967-cdd2f9255f42"), 0, 0, 3, "9" }, + { new Guid("e1e8e8a1-fc5d-4117-aaa9-cf639834cb7c"), 0, 0, 3, "K" }, + { new Guid("e22a362f-73de-43a4-9b94-4f8c02913723"), 0, 0, 0, "10" }, + { new Guid("e2d5262d-10ee-458f-b751-b26971a36e77"), 0, 0, 2, "Q" }, + { new Guid("e388446c-bcdd-4d97-9bd7-fc8967a970b8"), 0, 0, 1, "K" }, + { new Guid("e636a707-7ac2-4f4c-b5aa-31e6adaccf0c"), 0, 0, 0, "5" }, + { new Guid("e64378af-8e6c-46d3-9a56-49947579eca7"), 0, 0, 1, "2" }, + { new Guid("ee256eec-5826-4684-9985-406ae3ac9b32"), 0, 0, 0, "8" }, + { new Guid("ee7eac08-14b1-411a-8f66-e105d867222e"), 0, 0, 3, "2" }, + { new Guid("f1de527d-6c6a-47f6-8ec6-307b45e043d2"), 0, 0, 2, "Q" }, + { new Guid("f626f981-9d4d-4334-ae25-1a4427661060"), 0, 0, 0, "2" }, + { new Guid("f94c64ff-0d6a-4cb2-b075-b3a33916236f"), 0, 0, 2, "10" }, + { new Guid("fafdb5af-44ef-4a7d-b35e-59bbdef46ffc"), 0, 0, 2, "1" }, + { new Guid("fc19d235-4a60-4ae3-ae35-6e8c9b143401"), 0, 0, 3, "1" }, + { new Guid("fcd681be-fb37-41e6-8bf1-38f567b3e44a"), 0, 0, 3, "7" }, + { new Guid("fe6afd37-7b07-4630-a717-f6bcbdcac2dd"), 0, 0, 3, "5" } + }); + + migrationBuilder.CreateIndex( + name: "IX_AspNetRoleClaims_RoleId", + table: "AspNetRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "RoleNameIndex", + table: "AspNetRoles", + column: "NormalizedName", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserClaims_UserId", + table: "AspNetUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserLogins_UserId", + table: "AspNetUserLogins", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserRoles_RoleId", + table: "AspNetUserRoles", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "EmailIndex", + table: "AspNetUsers", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "UserNameIndex", + table: "AspNetUsers", + column: "NormalizedUserName", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_DeckCards_CardId", + table: "DeckCards", + column: "CardId"); + + migrationBuilder.CreateIndex( + name: "IX_DeckCards_MatchId", + table: "DeckCards", + column: "MatchId"); + + migrationBuilder.CreateIndex( + name: "IX_HandCards_DeckCardId", + table: "HandCards", + column: "DeckCardId"); + + migrationBuilder.CreateIndex( + name: "IX_HandCards_PlayerId", + table: "HandCards", + column: "PlayerId"); + + migrationBuilder.CreateIndex( + name: "IX_Matches_PlayerOneId", + table: "Matches", + column: "PlayerOneId"); + + migrationBuilder.CreateIndex( + name: "IX_Matches_PlayerTwoId", + table: "Matches", + column: "PlayerTwoId"); + + migrationBuilder.CreateIndex( + name: "IX_PlayerCards_DeckCardId", + table: "PlayerCards", + column: "DeckCardId"); + + migrationBuilder.CreateIndex( + name: "IX_PlayerCards_PlayerId", + table: "PlayerCards", + column: "PlayerId"); + + migrationBuilder.CreateIndex( + name: "IX_Players_UserId", + table: "Players", + column: "UserId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AspNetRoleClaims"); + + migrationBuilder.DropTable( + name: "AspNetUserClaims"); + + migrationBuilder.DropTable( + name: "AspNetUserLogins"); + + migrationBuilder.DropTable( + name: "AspNetUserRoles"); + + migrationBuilder.DropTable( + name: "AspNetUserTokens"); + + migrationBuilder.DropTable( + name: "HandCards"); + + migrationBuilder.DropTable( + name: "PlayerCards"); + + migrationBuilder.DropTable( + name: "AspNetRoles"); + + migrationBuilder.DropTable( + name: "DeckCards"); + + migrationBuilder.DropTable( + name: "Cards"); + + migrationBuilder.DropTable( + name: "Matches"); + + migrationBuilder.DropTable( + name: "Players"); + + migrationBuilder.DropTable( + name: "AspNetUsers"); + } + } +} diff --git a/Migrations/DbContextModelSnapshot.cs b/Migrations/DbContextModelSnapshot.cs new file mode 100644 index 0000000..f48480e --- /dev/null +++ b/Migrations/DbContextModelSnapshot.cs @@ -0,0 +1,1346 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Sequence.Migrations +{ + [DbContext(typeof(DbContext))] + partial class DbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "7.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClaimType") + .HasColumnType("longtext"); + + b.Property("ClaimValue") + .HasColumnType("longtext"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClaimType") + .HasColumnType("longtext"); + + b.Property("ClaimValue") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderDisplayName") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("Sequence.Entities.Card", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("PositionX") + .HasColumnType("int"); + + b.Property("PositionY") + .HasColumnType("int"); + + b.Property("Suit") + .HasColumnType("int"); + + b.Property("Value") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.ToTable("Cards"); + + b.HasData( + new + { + Id = new Guid("a8f3f9c0-9a56-4d9b-b667-0e30786a5960"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "1" + }, + new + { + Id = new Guid("04c32ba8-7f41-43c1-8a2e-a15b867adc78"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "2" + }, + new + { + Id = new Guid("17b29679-4234-4d3f-bfad-04533aa54342"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "3" + }, + new + { + Id = new Guid("1e866ad1-fbb8-42ce-aad2-d83afb874249"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "4" + }, + new + { + Id = new Guid("e636a707-7ac2-4f4c-b5aa-31e6adaccf0c"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "5" + }, + new + { + Id = new Guid("a405ac49-4d1f-4fb1-a9d6-b2cbdc9be0e6"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "6" + }, + new + { + Id = new Guid("411ebcae-4eb1-41a8-bb4a-4edf75fff236"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "7" + }, + new + { + Id = new Guid("7fbefe8f-ee4c-4c8a-a58d-4883d8dc9b77"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "8" + }, + new + { + Id = new Guid("a6db77ff-dd24-43fb-b77f-c7491f1180a0"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "9" + }, + new + { + Id = new Guid("e22a362f-73de-43a4-9b94-4f8c02913723"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "10" + }, + new + { + Id = new Guid("0c0748c2-c078-40da-a1b2-db4230e6b143"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "J" + }, + new + { + Id = new Guid("cd3a137a-10eb-483c-bcb8-b4403d93e08b"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "Q" + }, + new + { + Id = new Guid("3443b8bc-07eb-40f2-a2a5-dbafd5eebe4a"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "K" + }, + new + { + Id = new Guid("4b9983d5-124e-4eb8-a425-d6dc5f76062e"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "1" + }, + new + { + Id = new Guid("a72e423e-a425-4e06-9d04-b762f9feb49e"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "2" + }, + new + { + Id = new Guid("688e851d-148c-403c-94b3-e629ec9f9005"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "3" + }, + new + { + Id = new Guid("b3c0da5f-bce3-46b9-923a-aa54a6e8c1d3"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "4" + }, + new + { + Id = new Guid("e0c2b5f7-9bd5-4caf-96a3-99462ee0ad1d"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "5" + }, + new + { + Id = new Guid("8cf7541b-751d-4e71-8c5e-b430b840ada3"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "6" + }, + new + { + Id = new Guid("7b089dc2-629a-427a-aadf-13740b4cd519"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "7" + }, + new + { + Id = new Guid("3f75fce4-8b81-4f60-86d1-c7bb501f1986"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "8" + }, + new + { + Id = new Guid("94a0fddc-d169-4c49-a053-5ba7772375ca"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "9" + }, + new + { + Id = new Guid("659b91b7-b689-43c3-ae84-7e4c58b9bf8f"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "10" + }, + new + { + Id = new Guid("00fbacbf-5f4b-4be6-a026-9e28e1943b82"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "J" + }, + new + { + Id = new Guid("3ae71eec-67ed-4f85-95d7-864743ba2db1"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "Q" + }, + new + { + Id = new Guid("e388446c-bcdd-4d97-9bd7-fc8967a970b8"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "K" + }, + new + { + Id = new Guid("2da9f226-02e7-48db-a055-c23aeee94e9d"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "1" + }, + new + { + Id = new Guid("8b322db9-b520-4807-98f0-971b51a5ca45"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "2" + }, + new + { + Id = new Guid("9ee21eee-ebc3-4d1e-965b-1779e79fc615"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "3" + }, + new + { + Id = new Guid("7f66ba82-ab08-4991-9364-c766522d159e"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "4" + }, + new + { + Id = new Guid("24c0ba84-badc-4d99-b441-1dc6846dd4b3"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "5" + }, + new + { + Id = new Guid("d6c9b402-3a12-4162-9a02-775bc16f2339"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "6" + }, + new + { + Id = new Guid("707b60e2-10ba-4a96-b430-8a60cc373361"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "7" + }, + new + { + Id = new Guid("1aa17695-15c8-4496-b040-7c2ac0e9f60b"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "8" + }, + new + { + Id = new Guid("afd63b01-25b5-4aa9-a167-31f54c4d8caa"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "9" + }, + new + { + Id = new Guid("bbc87958-3d44-4b19-a161-75b6ad5bdb90"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "10" + }, + new + { + Id = new Guid("a784a174-df9b-4415-b539-d097177b3355"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "J" + }, + new + { + Id = new Guid("e2d5262d-10ee-458f-b751-b26971a36e77"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "Q" + }, + new + { + Id = new Guid("2f3d2fa6-3b6b-43c7-8197-a6b88c98571f"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "K" + }, + new + { + Id = new Guid("fc19d235-4a60-4ae3-ae35-6e8c9b143401"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "1" + }, + new + { + Id = new Guid("76f065dc-99f4-4761-9494-243365fc8d65"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "2" + }, + new + { + Id = new Guid("466e60c5-7427-41f6-9ce0-78f93c71b1da"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "3" + }, + new + { + Id = new Guid("c19999f2-8821-4831-a9dd-818018c47302"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "4" + }, + new + { + Id = new Guid("bb57dbd6-e33d-4120-975b-d62d46f96011"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "5" + }, + new + { + Id = new Guid("4f15ccb4-a213-4bff-a349-6237c404a181"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "6" + }, + new + { + Id = new Guid("fcd681be-fb37-41e6-8bf1-38f567b3e44a"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "7" + }, + new + { + Id = new Guid("6202ee80-0374-4b1d-a5ba-b0b990fb940f"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "8" + }, + new + { + Id = new Guid("e0cd0a2e-ac3f-4a3c-b967-cdd2f9255f42"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "9" + }, + new + { + Id = new Guid("15736c7c-d2b0-4b3e-b182-f1718c410bc7"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "10" + }, + new + { + Id = new Guid("87810d1f-1b3d-4bab-a40a-d2338e27c559"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "J" + }, + new + { + Id = new Guid("b4e83980-0a93-4c3e-90e6-5411fef3b1a3"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "Q" + }, + new + { + Id = new Guid("abcd1bd2-a904-4a4c-ad20-387cb7b72023"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "K" + }, + new + { + Id = new Guid("534738d0-3059-4d19-bc4e-69c63445a5e6"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "1" + }, + new + { + Id = new Guid("f626f981-9d4d-4334-ae25-1a4427661060"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "2" + }, + new + { + Id = new Guid("a630f594-3371-4c91-97c1-df0b28d03191"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "3" + }, + new + { + Id = new Guid("7e88e9e0-9ec3-490c-9bb9-ca9b83b67641"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "4" + }, + new + { + Id = new Guid("369440e7-7a7d-4229-8e1c-f493f63c2c28"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "5" + }, + new + { + Id = new Guid("aeb16cff-97ac-4e22-b460-0213a84cc0c5"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "6" + }, + new + { + Id = new Guid("3d4f9a38-c302-448e-ab29-6757c7d11b29"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "7" + }, + new + { + Id = new Guid("ee256eec-5826-4684-9985-406ae3ac9b32"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "8" + }, + new + { + Id = new Guid("380a72e2-d9fc-4c82-9982-dfb5a401533b"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "9" + }, + new + { + Id = new Guid("8d1aed6e-6f7b-477a-8862-86c8dd7f05ef"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "10" + }, + new + { + Id = new Guid("94ca0b08-fa48-428e-b0dd-e2a3a73d196f"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "J" + }, + new + { + Id = new Guid("40fae9fb-1327-4eb2-a26e-7cec21c50b87"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "Q" + }, + new + { + Id = new Guid("b6792e49-7585-410f-958e-296aaa79a426"), + PositionX = 0, + PositionY = 0, + Suit = 0, + Value = "K" + }, + new + { + Id = new Guid("78752484-f7b4-4584-a5b5-c5c3ba52c18d"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "1" + }, + new + { + Id = new Guid("e64378af-8e6c-46d3-9a56-49947579eca7"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "2" + }, + new + { + Id = new Guid("de47e43b-ecbd-49f5-b168-f0a3dfcef879"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "3" + }, + new + { + Id = new Guid("6333c8b4-b5c0-4023-aaf1-4c0e33eb884c"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "4" + }, + new + { + Id = new Guid("79afbe72-5fb1-49f1-b7f5-15e90d675692"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "5" + }, + new + { + Id = new Guid("230229bb-54dc-4a5f-9da3-e1a18b8a77b5"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "6" + }, + new + { + Id = new Guid("82c24b2f-77cf-4cc9-a572-1f12665516e0"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "7" + }, + new + { + Id = new Guid("6080b1fa-36b6-495d-a42c-d85b5cbb3050"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "8" + }, + new + { + Id = new Guid("87413764-0217-46ab-ba66-16aa5703b1d6"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "9" + }, + new + { + Id = new Guid("4451e515-b011-48fb-843b-7af1c4ad5447"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "10" + }, + new + { + Id = new Guid("60daa440-6b3c-4b99-ba84-51f58be74956"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "J" + }, + new + { + Id = new Guid("d6fddb98-c3ab-4af6-a3fb-66fa8c98ae50"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "Q" + }, + new + { + Id = new Guid("3b1274a3-b157-4d25-b9dc-74b724764e36"), + PositionX = 0, + PositionY = 0, + Suit = 1, + Value = "K" + }, + new + { + Id = new Guid("fafdb5af-44ef-4a7d-b35e-59bbdef46ffc"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "1" + }, + new + { + Id = new Guid("5c08d140-3101-4ac4-aebb-d526d2b66a41"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "2" + }, + new + { + Id = new Guid("5386f8e6-e54b-4a92-9a78-7591ca7e72f2"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "3" + }, + new + { + Id = new Guid("c5931746-958f-4028-9225-9ec90e1c3991"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "4" + }, + new + { + Id = new Guid("7b493a4c-3f31-42dc-9ccc-f49486d703c9"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "5" + }, + new + { + Id = new Guid("4606eb3b-45c8-42ef-b0f7-742366f9edb3"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "6" + }, + new + { + Id = new Guid("59256dda-eab5-4747-b519-6f3b89d100e0"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "7" + }, + new + { + Id = new Guid("be1f7ad7-3acf-4c7a-94b8-b5bf595698b3"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "8" + }, + new + { + Id = new Guid("7c19c024-3daf-4f31-afec-1335cae4a892"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "9" + }, + new + { + Id = new Guid("f94c64ff-0d6a-4cb2-b075-b3a33916236f"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "10" + }, + new + { + Id = new Guid("39d6e762-fcfa-484c-bb7f-0f299cd79c4c"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "J" + }, + new + { + Id = new Guid("f1de527d-6c6a-47f6-8ec6-307b45e043d2"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "Q" + }, + new + { + Id = new Guid("dff7ee16-3127-40bb-970f-74afdc2b434b"), + PositionX = 0, + PositionY = 0, + Suit = 2, + Value = "K" + }, + new + { + Id = new Guid("a9e1b1e7-126b-45a7-b742-4a920daa7fad"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "1" + }, + new + { + Id = new Guid("ee7eac08-14b1-411a-8f66-e105d867222e"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "2" + }, + new + { + Id = new Guid("49030225-83e8-4008-855e-37a5a93b61bf"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "3" + }, + new + { + Id = new Guid("8f00a428-564d-4989-8a15-06863fa52a25"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "4" + }, + new + { + Id = new Guid("fe6afd37-7b07-4630-a717-f6bcbdcac2dd"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "5" + }, + new + { + Id = new Guid("28a50673-74c8-4796-876c-a856a5d09bc9"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "6" + }, + new + { + Id = new Guid("0ec58b04-8b16-4749-ac90-9c7d6d564cf9"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "7" + }, + new + { + Id = new Guid("2a14d58d-77b2-4ef2-aa31-c465d817f6f7"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "8" + }, + new + { + Id = new Guid("6949b2d2-41ab-45ed-a242-c30450592087"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "9" + }, + new + { + Id = new Guid("9e9525c9-b059-4a26-b894-4689895cd77c"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "10" + }, + new + { + Id = new Guid("9c56a504-c6d4-43df-9ab3-e52be9e6f26f"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "J" + }, + new + { + Id = new Guid("dd944dba-2157-49e2-812f-64c7f9a7739f"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "Q" + }, + new + { + Id = new Guid("e1e8e8a1-fc5d-4117-aaa9-cf639834cb7c"), + PositionX = 0, + PositionY = 0, + Suit = 3, + Value = "K" + }); + }); + + modelBuilder.Entity("Sequence.Entities.DeckCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CardId") + .HasColumnType("char(36)"); + + b.Property("Dealt") + .HasColumnType("tinyint(1)"); + + b.Property("MatchId") + .HasColumnType("char(36)"); + + b.Property("Order") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CardId"); + + b.HasIndex("MatchId"); + + b.ToTable("DeckCards"); + }); + + modelBuilder.Entity("Sequence.Entities.HandCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DeckCardId") + .HasColumnType("char(36)"); + + b.Property("PlayerId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DeckCardId"); + + b.HasIndex("PlayerId"); + + b.ToTable("HandCards"); + }); + + modelBuilder.Entity("Sequence.Entities.Match", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("CurrentTurnPlayerId") + .HasColumnType("char(36)"); + + b.Property("PlayerOneId") + .HasColumnType("char(36)"); + + b.Property("PlayerTwoId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PlayerOneId"); + + b.HasIndex("PlayerTwoId"); + + b.ToTable("Matches"); + }); + + modelBuilder.Entity("Sequence.Entities.Player", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Alias") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Players"); + }); + + modelBuilder.Entity("Sequence.Entities.PlayerCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DeckCardId") + .HasColumnType("char(36)"); + + b.Property("PlayerId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DeckCardId"); + + b.HasIndex("PlayerId"); + + b.ToTable("PlayerCards"); + }); + + modelBuilder.Entity("Sequence.Entities.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("LockoutEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("longtext"); + + b.Property("PhoneNumber") + .HasColumnType("longtext"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("SecurityStamp") + .HasColumnType("longtext"); + + b.Property("TwoFactorEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Sequence.Entities.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Sequence.Entities.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Sequence.Entities.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Sequence.Entities.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Sequence.Entities.DeckCard", b => + { + b.HasOne("Sequence.Entities.Card", "Card") + .WithMany() + .HasForeignKey("CardId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Sequence.Entities.Match", "Match") + .WithMany("Deck") + .HasForeignKey("MatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Card"); + + b.Navigation("Match"); + }); + + modelBuilder.Entity("Sequence.Entities.HandCard", b => + { + b.HasOne("Sequence.Entities.DeckCard", "DeckCard") + .WithMany() + .HasForeignKey("DeckCardId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Sequence.Entities.Player", "Player") + .WithMany("HandCards") + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeckCard"); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("Sequence.Entities.Match", b => + { + b.HasOne("Sequence.Entities.Player", "PlayerOne") + .WithMany() + .HasForeignKey("PlayerOneId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Sequence.Entities.Player", "PlayerTwo") + .WithMany() + .HasForeignKey("PlayerTwoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlayerOne"); + + b.Navigation("PlayerTwo"); + }); + + modelBuilder.Entity("Sequence.Entities.Player", b => + { + b.HasOne("Sequence.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Sequence.Entities.PlayerCard", b => + { + b.HasOne("Sequence.Entities.DeckCard", "DeckCard") + .WithMany() + .HasForeignKey("DeckCardId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Sequence.Entities.Player", "Player") + .WithMany("PlayerCards") + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeckCard"); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("Sequence.Entities.Match", b => + { + b.Navigation("Deck"); + }); + + modelBuilder.Entity("Sequence.Entities.Player", b => + { + b.Navigation("HandCards"); + + b.Navigation("PlayerCards"); + }); +#pragma warning restore 612, 618 + } + } +}