diff --git a/GrossesMitaines/GrossesMitainesAPI/Data/InventoryContext.cs b/GrossesMitaines/GrossesMitainesAPI/Data/InventoryContext.cs index 8af0e8c..2c38d22 100644 --- a/GrossesMitaines/GrossesMitainesAPI/Data/InventoryContext.cs +++ b/GrossesMitaines/GrossesMitainesAPI/Data/InventoryContext.cs @@ -13,7 +13,7 @@ public class InventoryContext : IdentityDbContext { public InventoryContext(DbContextOptions options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { - + // Pour partir la BD. modelBuilder.Entity().HasData(new ProductModel { @@ -203,20 +203,187 @@ public class InventoryContext : IdentityDbContext { Quantity = 16, ImageName = @"$mitaines2.jpg" }); + modelBuilder.Entity().HasData(new ProductModel { + Id = 18, + Title = @"Longues mitaines pas de doigts", + Category = @"Vêtements d'extérieur", + Description = @"Pour avoir plus l'air thug en hiver.", + Status = ProductModel.States.Discontinued, + Price = 10.45M, + PromoPrice = 9.99M, + Quantity = 10, + ImageName = @"$longmitaines.jpg" + }); + modelBuilder.Entity().HasData(new ProductModel { + Id = 19, + Title = @"Pantalons slacks", + Category = @"Linge", + Description = @"Pour les journées bs", + Status = ProductModel.States.BackOrder, + Price = 69.99M, + PromoPrice = 49.99M, + Quantity = 0, + ImageName = @"$pantalon.jpg" + }); + modelBuilder.Entity().HasData(new ProductModel { + Id = 20, + Title = @"Programmer Socks", + Category = @"Linge", + Description = @"Pour commencer à apprendre rust et utiliser linux", + Status = ProductModel.States.Promotion, + Price = 23.50M, + PromoPrice = 19.99M, + Quantity = 3, + ImageName = @"$thighs.jpg" + }); + modelBuilder.Entity().HasData(new ProductModel { + Id = 21, + Title = @"Col-roulé", + Category = @"Linge", + Description = @"Show off que t'habites su'l plateau", + Status = ProductModel.States.Available, + Price = 149.99M, + PromoPrice = 99.99M, + Quantity = 14, + ImageName = @"$plateau.png" + }); + modelBuilder.Entity().HasData(new ProductModel { + Id = 22, + Title = @"Gros col-roulé", + Category = @"Linge", + Description = @"Ben oui je vais à l'UQAM comment t'as d'viné", + Status = ProductModel.States.Clearance, + Price = 149.99M, + PromoPrice = 99.99M, + Quantity = 4, + ImageName = @"$uqam.jpg" + }); + modelBuilder.Entity().HasData(new ProductModel { + Id = 23, + Title = @"SAQ", + Category = @"Établissement", + Description = @"Oui oui, une SAQ au complete", + Status = ProductModel.States.Available, + Price = 1000000.99M, + PromoPrice = 999999.99M, + Quantity = 1, + ImageName = @"$saq.jpg" + }); + modelBuilder.Entity().HasData(new ProductModel { + Id = 24, + Title = @"Lorem", + Category = @"Texte", + Description = @"Lorem ipsum dolor sit amet, +consectetur adipiscing elit. Vivamus sapien ipsum, +convallis quis justo ac, congue sollicitudin metus. +Vestibulum nec libero nulla. Integer a pretium dolor. +Phasellus vulputate iaculis ligula, sit amet suscipit +diam condimentum eu. Suspendisse blandit ipsum sed porttitor volutpat. +Duis iaculis mauris a dapibus bibendum. Integer sollicitudin nunc et neque +egestas sagittis. Etiam vitae ornare ex.", + Status = ProductModel.States.Promotion, + Price = 0.99M, + PromoPrice = 0.69M, + Quantity = 99, + ImageName = @"$lorem.jpg" + }); + modelBuilder.Entity().HasData(new ProductModel { + Id = 25, + Title = @"Bébé de laine", + Category = @"Homme", + Description = @"Quand un vrai coûte trop cher", + Status = ProductModel.States.Available, + Price = 10.99M, + PromoPrice = 5.99M, + Quantity = 15, + ImageName = @"$bebe.jpg" + }); + modelBuilder.Entity().HasData(new ProductModel { + Id = 26, + Title = @"Kit pour bébé", + Category = @"Linge", + Description = @"Un beau petit kit pas cher quand vous avez oublié le cadeau pour le shower qui s'en vient", + Status = ProductModel.States.Clearance, + Price = 39.99M, + PromoPrice = 29.99M, + Quantity = 10, + ImageName = @"$kitbebe.jpg" + }); + modelBuilder.Entity().HasData(new ProductModel { + Id = 27, + Title = @"TORTUE", + Category = @"Linge", + Description = @"Chris Pratt aime ben sauter dessus", + Status = ProductModel.States.Discontinued, + Price = 29.99M, + PromoPrice = 9.99M, + Quantity = 0, + ImageName = @"$koopa.jpg" + }); + modelBuilder.Entity().HasData(new ProductModel { + Id = 28, + Title = @"Patate de laine", + Category = @"Nourriture", + Description = @"*ne pa manger", + Status = ProductModel.States.Available, + Price = 1.99M, + PromoPrice = 0.99M, + Quantity = 58, + ImageName = @"$potato.jpg" + }); + modelBuilder.Entity().HasData(new ProductModel { + Id = 29, + Title = @"Monke :)", + Category = @"Animal", + Description = @"Les singes sont des mammifères de l'ordre des primates, généralement arboricoles, à la face souvent glabre et caractérisés par un encéphale développé et de longs membres terminés par des doigts. Bien que leur ressemblance avec l'Homme ait toujours frappé les esprits, la science a mis de nombreux siècles à prouver le lien étroit qui existe entre ceux-ci et l'espèce humaine. + +Au sein des primates, les singes forment un infra-ordre monophylétique, si l'on y inclut le genre Homo, nommé Simiiformes et qui se divise entre les Platyrhiniens (singes du Nouveau Monde : Amérique centrale et méridionale) et les Catarhiniens (singes de l'Ancien Monde : Afrique et Asie tropicales). Ces derniers comprennent les hominoïdes, également appelés « grands singes », dont fait partie Homo sapiens et ses ancêtres les plus proches. + +Même s'il ne fait plus de doute aujourd'hui que « l'Homme est un singe comme les autres », l'expression est majoritairement utilisée pour parler des animaux sauvages, et évoque un référentiel culturel, littéraire et artistique qui exclut l'espèce humaine.", + Status = ProductModel.States.Available, + Price = 299.99M, + PromoPrice = 99.99M, + Quantity = 58, + ImageName = @"$monke.png" + }); + modelBuilder.Entity().HasData(new ProductModel { + Id = 30, + Title = @"Phat Pikachu", + Category = @"Pokemon", + Description = @"It evolves from Pichu when leveled up with high friendship and evolves into Raichu when exposed to a Thunder Stone. + +In Alola, Pikachu will evolve into Alolan Raichu when exposed to a Thunder Stone. + +Pikachu has a Gigantamax form. Pikachu with the Gigantamax Factor cannot evolve. + +In Pokémon Yellow, the starter Pikachu will refuse to evolve into Raichu unless it is traded and evolved on another save file. In Pokémon: Let's Go, Pikachu!, the player's starter Pikachu also will not evolve, but cannot be traded to become a Raichu. + +Pikachu is popularly known as the mascot of the Pokémon franchise and one of Nintendo's major mascots. + +It is also the game mascot and starter Pokémon of Pokémon Yellow and Let's Go, Pikachu!. It has made numerous appearances on the boxes of spin-off titles. + +Pikachu is also the starter Pokémon of Pokémon Rumble Blast and Pokémon Rumble World.", + Status = ProductModel.States.Discontinued, + Price = 3.99M, + PromoPrice = 2.99M, + Quantity = 69, + ImageName = @"$pika.png" + }); + // Source: Notre TP Web 4DW. string AdministrateurID = "c9e08b20-d8a5-473f-9f52-572eb23c12af"; string ClientID = "1b7b9c55-c746-493a-a24f-3d5ca937298e"; string AdminID = "ecf7503a-591c-454e-a824-048e10bd0474"; - InventoryUser admin = new InventoryUser() { + InventoryUser admin = new InventoryUser() { FirstName = "Roger", LastName = "Admin", - NormalizedUserName = "ADMIN", - UserName = "Admin", - Id = AdminID, - NormalizedEmail = "ADMIN@ADMIN.COM", - Email = "admin@admin.com" + NormalizedUserName = "ADMIN", + UserName = "Admin", + Id = AdminID, + NormalizedEmail = "ADMIN@ADMIN.COM", + Email = "admin@admin.com" }; //admin.Adresses.Add(new AddressModel() { @@ -228,7 +395,7 @@ public class InventoryContext : IdentityDbContext { // Province = "QC", // Country = "Canada" //}); - + admin.PasswordHash = new PasswordHasher().HashPassword(admin, "Qwerty123!"); modelBuilder.Entity().HasData(admin); diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$bebe.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$bebe.jpg new file mode 100644 index 0000000..c15de5e Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$bebe.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$bebe_thumbnail.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$bebe_thumbnail.jpg new file mode 100644 index 0000000..71ab180 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$bebe_thumbnail.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$kitbebe.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$kitbebe.jpg new file mode 100644 index 0000000..dac6d2e Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$kitbebe.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$kitbebe_thumbnail.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$kitbebe_thumbnail.jpg new file mode 100644 index 0000000..e5812f0 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$kitbebe_thumbnail.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$koopa.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$koopa.jpg new file mode 100644 index 0000000..74cbd63 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$koopa.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$koopa_thumbnail.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$koopa_thumbnail.jpg new file mode 100644 index 0000000..f12bfc8 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$koopa_thumbnail.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$longmitaines.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$longmitaines.jpg new file mode 100644 index 0000000..30ee6dd Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$longmitaines.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$longmitaines_thumbnail.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$longmitaines_thumbnail.jpg new file mode 100644 index 0000000..15b136a Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$longmitaines_thumbnail.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$lorem.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$lorem.jpg new file mode 100644 index 0000000..9a54c4f Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$lorem.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$lorem_thumbnail.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$lorem_thumbnail.jpg new file mode 100644 index 0000000..a6c488e Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$lorem_thumbnail.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$monke.png b/GrossesMitaines/GrossesMitainesAPI/Images/$monke.png new file mode 100644 index 0000000..81f1c98 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$monke.png differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$monke_thumbnail.png b/GrossesMitaines/GrossesMitainesAPI/Images/$monke_thumbnail.png new file mode 100644 index 0000000..074e1d3 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$monke_thumbnail.png differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$pantalon.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$pantalon.jpg new file mode 100644 index 0000000..0825907 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$pantalon.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$pantalon_thumbnail.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$pantalon_thumbnail.jpg new file mode 100644 index 0000000..f9b3dd3 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$pantalon_thumbnail.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$pika.png b/GrossesMitaines/GrossesMitainesAPI/Images/$pika.png new file mode 100644 index 0000000..b45b6c4 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$pika.png differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$pika_thumbnail.png b/GrossesMitaines/GrossesMitainesAPI/Images/$pika_thumbnail.png new file mode 100644 index 0000000..7030882 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$pika_thumbnail.png differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$plateau.png b/GrossesMitaines/GrossesMitainesAPI/Images/$plateau.png new file mode 100644 index 0000000..e0431aa Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$plateau.png differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$plateau_thumbnail.png b/GrossesMitaines/GrossesMitainesAPI/Images/$plateau_thumbnail.png new file mode 100644 index 0000000..c499a79 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$plateau_thumbnail.png differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$potato.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$potato.jpg new file mode 100644 index 0000000..a92020b Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$potato.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$potato_thumbnail.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$potato_thumbnail.jpg new file mode 100644 index 0000000..3284707 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$potato_thumbnail.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$saq.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$saq.jpg new file mode 100644 index 0000000..38f1f59 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$saq.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$saq_thumbnail.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$saq_thumbnail.jpg new file mode 100644 index 0000000..b546ba4 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$saq_thumbnail.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$thighs.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$thighs.jpg new file mode 100644 index 0000000..03741ee Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$thighs.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$thighs_thumbnail.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$thighs_thumbnail.jpg new file mode 100644 index 0000000..3cf4219 Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$thighs_thumbnail.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$uqam.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$uqam.jpg new file mode 100644 index 0000000..78f86ad Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$uqam.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Images/$uqam_thumbnail.jpg b/GrossesMitaines/GrossesMitainesAPI/Images/$uqam_thumbnail.jpg new file mode 100644 index 0000000..652499f Binary files /dev/null and b/GrossesMitaines/GrossesMitainesAPI/Images/$uqam_thumbnail.jpg differ diff --git a/GrossesMitaines/GrossesMitainesAPI/Migrations/20221108012813_30produits.Designer.cs b/GrossesMitaines/GrossesMitainesAPI/Migrations/20221108012813_30produits.Designer.cs new file mode 100644 index 0000000..ef9fedc --- /dev/null +++ b/GrossesMitaines/GrossesMitainesAPI/Migrations/20221108012813_30produits.Designer.cs @@ -0,0 +1,981 @@ +// +using System; +using GrossesMitainesAPI.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace GrossesMitainesAPI.Migrations +{ + [DbContext(typeof(InventoryContext))] + [Migration("20221108012813_30produits")] + partial class _30produits + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + + modelBuilder.Entity("GrossesMitainesAPI.Data.InventoryUser", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("bit"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("LockoutEnabled") + .HasColumnType("bit"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("bit"); + + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("TwoFactorEnabled") + .HasColumnType("bit"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("AspNetUsers", (string)null); + + b.HasData( + new + { + Id = "ecf7503a-591c-454e-a824-048e10bd0474", + AccessFailedCount = 0, + ConcurrencyStamp = "381655f0-b7d5-49c2-b87a-a6e8b563c8b7", + Email = "admin@admin.com", + EmailConfirmed = false, + FirstName = "Roger", + LastName = "Admin", + LockoutEnabled = false, + NormalizedEmail = "ADMIN@ADMIN.COM", + NormalizedUserName = "ADMIN", + PasswordHash = "AQAAAAEAACcQAAAAEBIJf5ELMYpuvPzwGaeS/3/QXeZZvHDGX4kA/mHpGQ0hJ8FYIFV986Y+30S75yupRg==", + PhoneNumberConfirmed = false, + SecurityStamp = "6976eccd-d011-4d96-8ceb-0aefe9454da7", + TwoFactorEnabled = false, + UserName = "Admin" + }); + }); + + modelBuilder.Entity("GrossesMitainesAPI.Models.AddressModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); + + b.Property("Appartment") + .HasColumnType("nvarchar(max)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CivicNumber") + .HasColumnType("int"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("InventoryUserId") + .HasColumnType("nvarchar(450)"); + + b.Property("PostalCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(3) + .HasColumnType("nvarchar(3)"); + + b.Property("Street") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("InventoryUserId"); + + b.ToTable("Addresses"); + }); + + modelBuilder.Entity("GrossesMitainesAPI.Models.InvoiceModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); + + b.Property("EmailAddress") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("LinkedAccountId") + .HasColumnType("nvarchar(450)"); + + b.Property("PhoneNumber") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PurchaseDate") + .HasColumnType("datetime2"); + + b.Property("ShippingAddressId") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("LinkedAccountId"); + + b.HasIndex("ShippingAddressId"); + + b.ToTable("Invoices"); + }); + + modelBuilder.Entity("GrossesMitainesAPI.Models.InvoiceModel+ProductInvoice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); + + b.Property("InvoiceModelId") + .HasColumnType("int"); + + b.Property("ProductId") + .HasColumnType("int"); + + b.Property("Quantity") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceModelId"); + + b.HasIndex("ProductId"); + + b.ToTable("ProductInvoice"); + }); + + modelBuilder.Entity("GrossesMitainesAPI.Models.ProductModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); + + b.Property("Category") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Hits") + .HasColumnType("bigint"); + + b.Property("ImageName") + .HasColumnType("nvarchar(max)"); + + b.Property("LastHit") + .HasColumnType("datetime2"); + + b.Property("LastSale") + .HasColumnType("datetime2"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("PromoPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("Quantity") + .HasColumnType("bigint"); + + b.Property("Sales") + .HasColumnType("bigint"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.HasKey("Id"); + + b.ToTable("Products"); + + b.HasData( + new + { + Id = 1, + Category = "Linge", + Description = "Pour faire votre propre bonhomme de 1837, comme dans le bon vieux temps.", + Hits = 0L, + ImageName = "$ceintureflechee.jpg", + Price = 85.86m, + PromoPrice = 29.99m, + Quantity = 1L, + Sales = 0L, + Status = 4, + Title = "Ceinture flèchée" + }, + new + { + Id = 2, + Category = "Linge", + Description = "Parce que ça sent la coupe!", + Hits = 0L, + ImageName = "$pantouflesCH.jpg", + Price = 15.64m, + PromoPrice = 9.99m, + Quantity = 54L, + Sales = 0L, + Status = 0, + Title = "Pantoufles du Canadien en Phentex" + }, + new + { + Id = 3, + Category = "Homme", + Description = "On ne lui ferait pas mal, en tout cas!!", + Hits = 0L, + ImageName = "$jeanlucmongrain.jpg", + Price = 1453.12m, + PromoPrice = 999.99m, + Quantity = 1L, + Sales = 0L, + Status = 3, + Title = "Jean-Luc Mongrain" + }, + new + { + Id = 4, + Category = "Linge", + Description = "Tellement simple et comfortable.", + Hits = 0L, + ImageName = "$tshirt.jpg", + Price = 12.12m, + PromoPrice = 9.99m, + Quantity = 143L, + Sales = 0L, + Status = 0, + Title = "T-Shirt" + }, + new + { + Id = 5, + Category = "Vêtement d'extérieur", + Description = "Deux pour un!", + Hits = 0L, + ImageName = "$mitaines.jpg", + Price = 8.18m, + PromoPrice = 6.99m, + Quantity = 1423L, + Sales = 0L, + Status = 0, + Title = "Mitaines" + }, + new + { + Id = 6, + Category = "Vêtement d'extérieur", + Description = "Deux pour un!", + Hits = 0L, + ImageName = "$foulard.jpg", + Price = 10.56m, + PromoPrice = 8.99m, + Quantity = 14L, + Sales = 0L, + Status = 4, + Title = "Foulard" + }, + new + { + Id = 7, + Category = "Sous-Vêtement", + Description = "Pour garder le p'tit bout au chaud.", + Hits = 0L, + ImageName = "$kokin.jpg", + Price = 15.45m, + PromoPrice = 12.99m, + Quantity = 144L, + Sales = 0L, + Status = 4, + Title = "Jock-Strap en phentex" + }, + new + { + Id = 8, + Category = "Sous-Vêtement", + Description = "Pour garder l'absence de p'tit bout au chaud.", + Hits = 0L, + ImageName = "$kokinfemme.jpg", + Price = 15.45m, + PromoPrice = 12.99m, + Quantity = 224L, + Sales = 0L, + Status = 4, + Title = "Jock-Strap féminin en phentex" + }, + new + { + Id = 9, + Category = "Alien", + Description = "En chiffon.", + Hits = 0L, + ImageName = "$bibi.jpg", + Price = 1045.45m, + PromoPrice = 1023.99m, + Quantity = 1L, + Sales = 0L, + Status = 3, + Title = "Bibi" + }, + new + { + Id = 10, + Category = "Vêtement d'extérieur", + Description = "En chiffon.", + Hits = 0L, + ImageName = "$tuque.jpg", + Price = 15.45m, + PromoPrice = 12.99m, + Quantity = 1L, + Sales = 0L, + Status = 0, + Title = "Tuque en laine" + }, + new + { + Id = 11, + Category = "Vêtement d'extérieur", + Description = "Pour se faire taper dessus avec une poêle à frire tout en restant au chaud.", + Hits = 0L, + ImageName = "$bonhomme.jpg", + Price = 145.45m, + PromoPrice = 123.99m, + Quantity = 1L, + Sales = 0L, + Status = 4, + Title = "Habit de Bonhomme Carnaval" + }, + new + { + Id = 12, + Category = "Autre", + Description = "Pour se pêter la fiole avec style.", + Hits = 0L, + ImageName = "$gauze.jpg", + Price = 145.45m, + PromoPrice = 123.99m, + Quantity = 0L, + Sales = 0L, + Status = 1, + Title = "Gauze en phentex" + }, + new + { + Id = 13, + Category = "Homme", + Description = "En chiffon.", + Hits = 0L, + ImageName = "$jesus.jpg", + Price = 145.45m, + PromoPrice = 123.99m, + Quantity = 1L, + Sales = 0L, + Status = 3, + Title = "Petit Jésus de plâtre" + }, + new + { + Id = 14, + Category = "Autre", + Description = "À écouter dans l'habit de Bonhomme Carnaval tant que possible.", + Hits = 0L, + ImageName = "$vhs.jpg", + Price = 3.45m, + PromoPrice = 1.99m, + Quantity = 164363L, + Sales = 0L, + Status = 3, + Title = "VHS de la Guerre des Tuques" + }, + new + { + Id = 15, + Category = "Linge", + Description = "(N'est pas réellement pare-balle).", + Hits = 0L, + ImageName = "$chandailquetaine.jpg", + Price = 1435.45m, + PromoPrice = 1223.99m, + Quantity = 18L, + Sales = 0L, + Status = 3, + Title = "Gilet pare-balle en laine" + }, + new + { + Id = 16, + Category = "Autre", + Description = "Pour s'éffoirer le nez dedans.", + Hits = 0L, + ImageName = "$doudou.jpg", + Price = 14.45m, + PromoPrice = 13.99m, + Quantity = 14L, + Sales = 0L, + Status = 0, + Title = "Doudou" + }, + new + { + Id = 17, + Category = "Vêtements d'extérieur", + Description = "Pour avoir l'air thug en hiver.", + Hits = 0L, + ImageName = "$mitaines2.jpg", + Price = 9.45m, + PromoPrice = 8.99m, + Quantity = 16L, + Sales = 0L, + Status = 0, + Title = "Mitaines pas de doigts" + }, + new + { + Id = 18, + Category = "Vêtements d'extérieur", + Description = "Pour avoir plus l'air thug en hiver.", + Hits = 0L, + ImageName = "$longmitaines.jpg", + Price = 10.45m, + PromoPrice = 9.99m, + Quantity = 10L, + Sales = 0L, + Status = 5, + Title = "Longues mitaines pas de doigts" + }, + new + { + Id = 19, + Category = "Linge", + Description = "Pour les journées bs", + Hits = 0L, + ImageName = "$pantalon.jpg", + Price = 69.99m, + PromoPrice = 49.99m, + Quantity = 0L, + Sales = 0L, + Status = 1, + Title = "Pantalons slacks" + }, + new + { + Id = 20, + Category = "Linge", + Description = "Pour commencer à apprendre rust et utiliser linux", + Hits = 0L, + ImageName = "$thighs.jpg", + Price = 23.50m, + PromoPrice = 19.99m, + Quantity = 3L, + Sales = 0L, + Status = 4, + Title = "Programmer Socks" + }, + new + { + Id = 21, + Category = "Linge", + Description = "Show off que t'habites su'l plateau", + Hits = 0L, + ImageName = "$plateau.png", + Price = 149.99m, + PromoPrice = 99.99m, + Quantity = 14L, + Sales = 0L, + Status = 0, + Title = "Col-roulé" + }, + new + { + Id = 22, + Category = "Linge", + Description = "Ben oui je vais à l'UQAM comment t'as d'viné", + Hits = 0L, + ImageName = "$uqam.jpg", + Price = 149.99m, + PromoPrice = 99.99m, + Quantity = 4L, + Sales = 0L, + Status = 3, + Title = "Gros col-roulé" + }, + new + { + Id = 23, + Category = "Établissement", + Description = "Oui oui, une SAQ au complete", + Hits = 0L, + ImageName = "$saq.jpg", + Price = 1000000.99m, + PromoPrice = 999999.99m, + Quantity = 1L, + Sales = 0L, + Status = 0, + Title = "SAQ" + }, + new + { + Id = 24, + Category = "Texte", + Description = "Lorem ipsum dolor sit amet, \r\nconsectetur adipiscing elit. Vivamus sapien ipsum, \r\nconvallis quis justo ac, congue sollicitudin metus. \r\nVestibulum nec libero nulla. Integer a pretium dolor. \r\nPhasellus vulputate iaculis ligula, sit amet suscipit \r\ndiam condimentum eu. Suspendisse blandit ipsum sed porttitor volutpat.\r\nDuis iaculis mauris a dapibus bibendum. Integer sollicitudin nunc et neque\r\negestas sagittis. Etiam vitae ornare ex.", + Hits = 0L, + ImageName = "$lorem.jpg", + Price = 0.99m, + PromoPrice = 0.69m, + Quantity = 99L, + Sales = 0L, + Status = 4, + Title = "Lorem" + }, + new + { + Id = 25, + Category = "Homme", + Description = "Quand un vrai coûte trop cher", + Hits = 0L, + ImageName = "$bebe.jpg", + Price = 10.99m, + PromoPrice = 5.99m, + Quantity = 15L, + Sales = 0L, + Status = 0, + Title = "Bébé de laine" + }, + new + { + Id = 26, + Category = "Linge", + Description = "Un beau petit kit pas cher quand vous avez oublié le cadeau pour le shower qui s'en vient", + Hits = 0L, + ImageName = "$kitbebe.jpg", + Price = 39.99m, + PromoPrice = 29.99m, + Quantity = 10L, + Sales = 0L, + Status = 3, + Title = "Kit pour bébé" + }, + new + { + Id = 27, + Category = "Linge", + Description = "Chris Pratt aime ben sauter dessus", + Hits = 0L, + ImageName = "$koopa.jpg", + Price = 29.99m, + PromoPrice = 9.99m, + Quantity = 0L, + Sales = 0L, + Status = 5, + Title = "TORTUE" + }, + new + { + Id = 28, + Category = "Nourriture", + Description = "*ne pa manger", + Hits = 0L, + ImageName = "$potato.jpg", + Price = 1.99m, + PromoPrice = 0.99m, + Quantity = 58L, + Sales = 0L, + Status = 0, + Title = "Patate de laine" + }, + new + { + Id = 29, + Category = "Animal", + Description = "Les singes sont des mammifères de l'ordre des primates, généralement arboricoles, à la face souvent glabre et caractérisés par un encéphale développé et de longs membres terminés par des doigts. Bien que leur ressemblance avec l'Homme ait toujours frappé les esprits, la science a mis de nombreux siècles à prouver le lien étroit qui existe entre ceux-ci et l'espèce humaine.\r\n\r\nAu sein des primates, les singes forment un infra-ordre monophylétique, si l'on y inclut le genre Homo, nommé Simiiformes et qui se divise entre les Platyrhiniens (singes du Nouveau Monde : Amérique centrale et méridionale) et les Catarhiniens (singes de l'Ancien Monde : Afrique et Asie tropicales). Ces derniers comprennent les hominoïdes, également appelés « grands singes », dont fait partie Homo sapiens et ses ancêtres les plus proches.\r\n\r\nMême s'il ne fait plus de doute aujourd'hui que « l'Homme est un singe comme les autres », l'expression est majoritairement utilisée pour parler des animaux sauvages, et évoque un référentiel culturel, littéraire et artistique qui exclut l'espèce humaine.", + Hits = 0L, + ImageName = "$monke.png", + Price = 299.99m, + PromoPrice = 99.99m, + Quantity = 58L, + Sales = 0L, + Status = 0, + Title = "Monke :)" + }, + new + { + Id = 30, + Category = "Pokemon", + Description = "It evolves from Pichu when leveled up with high friendship and evolves into Raichu when exposed to a Thunder Stone.\r\n\r\nIn Alola, Pikachu will evolve into Alolan Raichu when exposed to a Thunder Stone.\r\n\r\nPikachu has a Gigantamax form. Pikachu with the Gigantamax Factor cannot evolve.\r\n\r\nIn Pokémon Yellow, the starter Pikachu will refuse to evolve into Raichu unless it is traded and evolved on another save file. In Pokémon: Let's Go, Pikachu!, the player's starter Pikachu also will not evolve, but cannot be traded to become a Raichu.\r\n\r\nPikachu is popularly known as the mascot of the Pokémon franchise and one of Nintendo's major mascots.\r\n\r\nIt is also the game mascot and starter Pokémon of Pokémon Yellow and Let's Go, Pikachu!. It has made numerous appearances on the boxes of spin-off titles.\r\n\r\nPikachu is also the starter Pokémon of Pokémon Rumble Blast and Pokémon Rumble World.", + Hits = 0L, + ImageName = "$pika.png", + Price = 3.99m, + PromoPrice = 2.99m, + Quantity = 69L, + Sales = 0L, + Status = 5, + Title = "Phat Pikachu" + }); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); + + b.ToTable("AspNetRoles", (string)null); + + b.HasData( + new + { + Id = "c9e08b20-d8a5-473f-9f52-572eb23c12af", + ConcurrencyStamp = "d78f5f64-28da-4a3e-b3e9-807d96ba6757", + Name = "Administrateur", + NormalizedName = "ADMINISTRATEUR" + }, + new + { + Id = "1b7b9c55-c746-493a-a24f-3d5ca937298e", + ConcurrencyStamp = "1c7a32ec-3bac-416a-9092-e8617bf63da4", + Name = "Client", + NormalizedName = "CLIENT" + }); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property("RoleId") + .HasColumnType("nvarchar(450)"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + + b.HasData( + new + { + UserId = "ecf7503a-591c-454e-a824-048e10bd0474", + RoleId = "c9e08b20-d8a5-473f-9f52-572eb23c12af" + }, + new + { + UserId = "ecf7503a-591c-454e-a824-048e10bd0474", + RoleId = "1b7b9c55-c746-493a-a24f-3d5ca937298e" + }); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("GrossesMitainesAPI.Models.AddressModel", b => + { + b.HasOne("GrossesMitainesAPI.Data.InventoryUser", null) + .WithMany("Adresses") + .HasForeignKey("InventoryUserId"); + }); + + modelBuilder.Entity("GrossesMitainesAPI.Models.InvoiceModel", b => + { + b.HasOne("GrossesMitainesAPI.Data.InventoryUser", "LinkedAccount") + .WithMany() + .HasForeignKey("LinkedAccountId"); + + b.HasOne("GrossesMitainesAPI.Models.AddressModel", "ShippingAddress") + .WithMany() + .HasForeignKey("ShippingAddressId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("LinkedAccount"); + + b.Navigation("ShippingAddress"); + }); + + modelBuilder.Entity("GrossesMitainesAPI.Models.InvoiceModel+ProductInvoice", b => + { + b.HasOne("GrossesMitainesAPI.Models.InvoiceModel", null) + .WithMany("Products") + .HasForeignKey("InvoiceModelId"); + + b.HasOne("GrossesMitainesAPI.Models.ProductModel", "Product") + .WithMany() + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + }); + + 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("GrossesMitainesAPI.Data.InventoryUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("GrossesMitainesAPI.Data.InventoryUser", 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("GrossesMitainesAPI.Data.InventoryUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("GrossesMitainesAPI.Data.InventoryUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("GrossesMitainesAPI.Data.InventoryUser", b => + { + b.Navigation("Adresses"); + }); + + modelBuilder.Entity("GrossesMitainesAPI.Models.InvoiceModel", b => + { + b.Navigation("Products"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/GrossesMitaines/GrossesMitainesAPI/Migrations/20221108012813_30produits.cs b/GrossesMitaines/GrossesMitainesAPI/Migrations/20221108012813_30produits.cs new file mode 100644 index 0000000..dbdf55f --- /dev/null +++ b/GrossesMitaines/GrossesMitainesAPI/Migrations/20221108012813_30produits.cs @@ -0,0 +1,142 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace GrossesMitainesAPI.Migrations +{ + public partial class _30produits : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "AspNetRoles", + keyColumn: "Id", + keyValue: "1b7b9c55-c746-493a-a24f-3d5ca937298e", + column: "ConcurrencyStamp", + value: "1c7a32ec-3bac-416a-9092-e8617bf63da4"); + + migrationBuilder.UpdateData( + table: "AspNetRoles", + keyColumn: "Id", + keyValue: "c9e08b20-d8a5-473f-9f52-572eb23c12af", + column: "ConcurrencyStamp", + value: "d78f5f64-28da-4a3e-b3e9-807d96ba6757"); + + migrationBuilder.UpdateData( + table: "AspNetUsers", + keyColumn: "Id", + keyValue: "ecf7503a-591c-454e-a824-048e10bd0474", + columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, + values: new object[] { "381655f0-b7d5-49c2-b87a-a6e8b563c8b7", "AQAAAAEAACcQAAAAEBIJf5ELMYpuvPzwGaeS/3/QXeZZvHDGX4kA/mHpGQ0hJ8FYIFV986Y+30S75yupRg==", "6976eccd-d011-4d96-8ceb-0aefe9454da7" }); + + migrationBuilder.InsertData( + table: "Products", + columns: new[] { "Id", "Category", "Description", "Hits", "ImageName", "LastHit", "LastSale", "Price", "PromoPrice", "Quantity", "Sales", "Status", "Title" }, + values: new object[,] + { + { 18, "Vêtements d'extérieur", "Pour avoir plus l'air thug en hiver.", 0L, "$longmitaines.jpg", null, null, 10.45m, 9.99m, 10L, 0L, 5, "Longues mitaines pas de doigts" }, + { 19, "Linge", "Pour les journées bs", 0L, "$pantalon.jpg", null, null, 69.99m, 49.99m, 0L, 0L, 1, "Pantalons slacks" }, + { 20, "Linge", "Pour commencer à apprendre rust et utiliser linux", 0L, "$thighs.jpg", null, null, 23.50m, 19.99m, 3L, 0L, 4, "Programmer Socks" }, + { 21, "Linge", "Show off que t'habites su'l plateau", 0L, "$plateau.png", null, null, 149.99m, 99.99m, 14L, 0L, 0, "Col-roulé" }, + { 22, "Linge", "Ben oui je vais à l'UQAM comment t'as d'viné", 0L, "$uqam.jpg", null, null, 149.99m, 99.99m, 4L, 0L, 3, "Gros col-roulé" }, + { 23, "Établissement", "Oui oui, une SAQ au complete", 0L, "$saq.jpg", null, null, 1000000.99m, 999999.99m, 1L, 0L, 0, "SAQ" }, + { 24, "Texte", "Lorem ipsum dolor sit amet, \r\nconsectetur adipiscing elit. Vivamus sapien ipsum, \r\nconvallis quis justo ac, congue sollicitudin metus. \r\nVestibulum nec libero nulla. Integer a pretium dolor. \r\nPhasellus vulputate iaculis ligula, sit amet suscipit \r\ndiam condimentum eu. Suspendisse blandit ipsum sed porttitor volutpat.\r\nDuis iaculis mauris a dapibus bibendum. Integer sollicitudin nunc et neque\r\negestas sagittis. Etiam vitae ornare ex.", 0L, "$lorem.jpg", null, null, 0.99m, 0.69m, 99L, 0L, 4, "Lorem" }, + { 25, "Homme", "Quand un vrai coûte trop cher", 0L, "$bebe.jpg", null, null, 10.99m, 5.99m, 15L, 0L, 0, "Bébé de laine" }, + { 26, "Linge", "Un beau petit kit pas cher quand vous avez oublié le cadeau pour le shower qui s'en vient", 0L, "$kitbebe.jpg", null, null, 39.99m, 29.99m, 10L, 0L, 3, "Kit pour bébé" }, + { 27, "Linge", "Chris Pratt aime ben sauter dessus", 0L, "$koopa.jpg", null, null, 29.99m, 9.99m, 0L, 0L, 5, "TORTUE" }, + { 28, "Nourriture", "*ne pa manger", 0L, "$potato.jpg", null, null, 1.99m, 0.99m, 58L, 0L, 0, "Patate de laine" }, + { 29, "Animal", "Les singes sont des mammifères de l'ordre des primates, généralement arboricoles, à la face souvent glabre et caractérisés par un encéphale développé et de longs membres terminés par des doigts. Bien que leur ressemblance avec l'Homme ait toujours frappé les esprits, la science a mis de nombreux siècles à prouver le lien étroit qui existe entre ceux-ci et l'espèce humaine.\r\n\r\nAu sein des primates, les singes forment un infra-ordre monophylétique, si l'on y inclut le genre Homo, nommé Simiiformes et qui se divise entre les Platyrhiniens (singes du Nouveau Monde : Amérique centrale et méridionale) et les Catarhiniens (singes de l'Ancien Monde : Afrique et Asie tropicales). Ces derniers comprennent les hominoïdes, également appelés « grands singes », dont fait partie Homo sapiens et ses ancêtres les plus proches.\r\n\r\nMême s'il ne fait plus de doute aujourd'hui que « l'Homme est un singe comme les autres », l'expression est majoritairement utilisée pour parler des animaux sauvages, et évoque un référentiel culturel, littéraire et artistique qui exclut l'espèce humaine.", 0L, "$monke.png", null, null, 299.99m, 99.99m, 58L, 0L, 0, "Monke :)" }, + { 30, "Pokemon", "It evolves from Pichu when leveled up with high friendship and evolves into Raichu when exposed to a Thunder Stone.\r\n\r\nIn Alola, Pikachu will evolve into Alolan Raichu when exposed to a Thunder Stone.\r\n\r\nPikachu has a Gigantamax form. Pikachu with the Gigantamax Factor cannot evolve.\r\n\r\nIn Pokémon Yellow, the starter Pikachu will refuse to evolve into Raichu unless it is traded and evolved on another save file. In Pokémon: Let's Go, Pikachu!, the player's starter Pikachu also will not evolve, but cannot be traded to become a Raichu.\r\n\r\nPikachu is popularly known as the mascot of the Pokémon franchise and one of Nintendo's major mascots.\r\n\r\nIt is also the game mascot and starter Pokémon of Pokémon Yellow and Let's Go, Pikachu!. It has made numerous appearances on the boxes of spin-off titles.\r\n\r\nPikachu is also the starter Pokémon of Pokémon Rumble Blast and Pokémon Rumble World.", 0L, "$pika.png", null, null, 3.99m, 2.99m, 69L, 0L, 5, "Phat Pikachu" } + }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "Products", + keyColumn: "Id", + keyValue: 18); + + migrationBuilder.DeleteData( + table: "Products", + keyColumn: "Id", + keyValue: 19); + + migrationBuilder.DeleteData( + table: "Products", + keyColumn: "Id", + keyValue: 20); + + migrationBuilder.DeleteData( + table: "Products", + keyColumn: "Id", + keyValue: 21); + + migrationBuilder.DeleteData( + table: "Products", + keyColumn: "Id", + keyValue: 22); + + migrationBuilder.DeleteData( + table: "Products", + keyColumn: "Id", + keyValue: 23); + + migrationBuilder.DeleteData( + table: "Products", + keyColumn: "Id", + keyValue: 24); + + migrationBuilder.DeleteData( + table: "Products", + keyColumn: "Id", + keyValue: 25); + + migrationBuilder.DeleteData( + table: "Products", + keyColumn: "Id", + keyValue: 26); + + migrationBuilder.DeleteData( + table: "Products", + keyColumn: "Id", + keyValue: 27); + + migrationBuilder.DeleteData( + table: "Products", + keyColumn: "Id", + keyValue: 28); + + migrationBuilder.DeleteData( + table: "Products", + keyColumn: "Id", + keyValue: 29); + + migrationBuilder.DeleteData( + table: "Products", + keyColumn: "Id", + keyValue: 30); + + migrationBuilder.UpdateData( + table: "AspNetRoles", + keyColumn: "Id", + keyValue: "1b7b9c55-c746-493a-a24f-3d5ca937298e", + column: "ConcurrencyStamp", + value: "7d36b38e-ae6a-457e-bfd0-62fc0c1d8fc5"); + + migrationBuilder.UpdateData( + table: "AspNetRoles", + keyColumn: "Id", + keyValue: "c9e08b20-d8a5-473f-9f52-572eb23c12af", + column: "ConcurrencyStamp", + value: "ca8c4d2d-a900-499a-8469-99b6f0499b9d"); + + migrationBuilder.UpdateData( + table: "AspNetUsers", + keyColumn: "Id", + keyValue: "ecf7503a-591c-454e-a824-048e10bd0474", + columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, + values: new object[] { "c4a97f53-d33a-4519-8a19-5969d3bc9bcd", "AQAAAAEAACcQAAAAEBs7/uxC6IlFe5ejK2fO17fQZxxto/+RBqdFxDTdRQCdlLBhDsvzq06I9aEH1W4FFA==", "f5dedfca-bbc4-423f-aae7-37670bc7294f" }); + } + } +} diff --git a/GrossesMitaines/GrossesMitainesAPI/Migrations/InventoryContextModelSnapshot.cs b/GrossesMitaines/GrossesMitainesAPI/Migrations/InventoryContextModelSnapshot.cs index 1dabdbd..676d9c0 100644 --- a/GrossesMitaines/GrossesMitainesAPI/Migrations/InventoryContextModelSnapshot.cs +++ b/GrossesMitaines/GrossesMitainesAPI/Migrations/InventoryContextModelSnapshot.cs @@ -101,7 +101,7 @@ namespace GrossesMitainesAPI.Migrations { Id = "ecf7503a-591c-454e-a824-048e10bd0474", AccessFailedCount = 0, - ConcurrencyStamp = "c4a97f53-d33a-4519-8a19-5969d3bc9bcd", + ConcurrencyStamp = "381655f0-b7d5-49c2-b87a-a6e8b563c8b7", Email = "admin@admin.com", EmailConfirmed = false, FirstName = "Roger", @@ -109,9 +109,9 @@ namespace GrossesMitainesAPI.Migrations LockoutEnabled = false, NormalizedEmail = "ADMIN@ADMIN.COM", NormalizedUserName = "ADMIN", - PasswordHash = "AQAAAAEAACcQAAAAEBs7/uxC6IlFe5ejK2fO17fQZxxto/+RBqdFxDTdRQCdlLBhDsvzq06I9aEH1W4FFA==", + PasswordHash = "AQAAAAEAACcQAAAAEBIJf5ELMYpuvPzwGaeS/3/QXeZZvHDGX4kA/mHpGQ0hJ8FYIFV986Y+30S75yupRg==", PhoneNumberConfirmed = false, - SecurityStamp = "f5dedfca-bbc4-423f-aae7-37670bc7294f", + SecurityStamp = "6976eccd-d011-4d96-8ceb-0aefe9454da7", TwoFactorEnabled = false, UserName = "Admin" }); @@ -528,6 +528,188 @@ namespace GrossesMitainesAPI.Migrations Sales = 0L, Status = 0, Title = "Mitaines pas de doigts" + }, + new + { + Id = 18, + Category = "Vêtements d'extérieur", + Description = "Pour avoir plus l'air thug en hiver.", + Hits = 0L, + ImageName = "$longmitaines.jpg", + Price = 10.45m, + PromoPrice = 9.99m, + Quantity = 10L, + Sales = 0L, + Status = 5, + Title = "Longues mitaines pas de doigts" + }, + new + { + Id = 19, + Category = "Linge", + Description = "Pour les journées bs", + Hits = 0L, + ImageName = "$pantalon.jpg", + Price = 69.99m, + PromoPrice = 49.99m, + Quantity = 0L, + Sales = 0L, + Status = 1, + Title = "Pantalons slacks" + }, + new + { + Id = 20, + Category = "Linge", + Description = "Pour commencer à apprendre rust et utiliser linux", + Hits = 0L, + ImageName = "$thighs.jpg", + Price = 23.50m, + PromoPrice = 19.99m, + Quantity = 3L, + Sales = 0L, + Status = 4, + Title = "Programmer Socks" + }, + new + { + Id = 21, + Category = "Linge", + Description = "Show off que t'habites su'l plateau", + Hits = 0L, + ImageName = "$plateau.png", + Price = 149.99m, + PromoPrice = 99.99m, + Quantity = 14L, + Sales = 0L, + Status = 0, + Title = "Col-roulé" + }, + new + { + Id = 22, + Category = "Linge", + Description = "Ben oui je vais à l'UQAM comment t'as d'viné", + Hits = 0L, + ImageName = "$uqam.jpg", + Price = 149.99m, + PromoPrice = 99.99m, + Quantity = 4L, + Sales = 0L, + Status = 3, + Title = "Gros col-roulé" + }, + new + { + Id = 23, + Category = "Établissement", + Description = "Oui oui, une SAQ au complete", + Hits = 0L, + ImageName = "$saq.jpg", + Price = 1000000.99m, + PromoPrice = 999999.99m, + Quantity = 1L, + Sales = 0L, + Status = 0, + Title = "SAQ" + }, + new + { + Id = 24, + Category = "Texte", + Description = "Lorem ipsum dolor sit amet, \r\nconsectetur adipiscing elit. Vivamus sapien ipsum, \r\nconvallis quis justo ac, congue sollicitudin metus. \r\nVestibulum nec libero nulla. Integer a pretium dolor. \r\nPhasellus vulputate iaculis ligula, sit amet suscipit \r\ndiam condimentum eu. Suspendisse blandit ipsum sed porttitor volutpat.\r\nDuis iaculis mauris a dapibus bibendum. Integer sollicitudin nunc et neque\r\negestas sagittis. Etiam vitae ornare ex.", + Hits = 0L, + ImageName = "$lorem.jpg", + Price = 0.99m, + PromoPrice = 0.69m, + Quantity = 99L, + Sales = 0L, + Status = 4, + Title = "Lorem" + }, + new + { + Id = 25, + Category = "Homme", + Description = "Quand un vrai coûte trop cher", + Hits = 0L, + ImageName = "$bebe.jpg", + Price = 10.99m, + PromoPrice = 5.99m, + Quantity = 15L, + Sales = 0L, + Status = 0, + Title = "Bébé de laine" + }, + new + { + Id = 26, + Category = "Linge", + Description = "Un beau petit kit pas cher quand vous avez oublié le cadeau pour le shower qui s'en vient", + Hits = 0L, + ImageName = "$kitbebe.jpg", + Price = 39.99m, + PromoPrice = 29.99m, + Quantity = 10L, + Sales = 0L, + Status = 3, + Title = "Kit pour bébé" + }, + new + { + Id = 27, + Category = "Linge", + Description = "Chris Pratt aime ben sauter dessus", + Hits = 0L, + ImageName = "$koopa.jpg", + Price = 29.99m, + PromoPrice = 9.99m, + Quantity = 0L, + Sales = 0L, + Status = 5, + Title = "TORTUE" + }, + new + { + Id = 28, + Category = "Nourriture", + Description = "*ne pa manger", + Hits = 0L, + ImageName = "$potato.jpg", + Price = 1.99m, + PromoPrice = 0.99m, + Quantity = 58L, + Sales = 0L, + Status = 0, + Title = "Patate de laine" + }, + new + { + Id = 29, + Category = "Animal", + Description = "Les singes sont des mammifères de l'ordre des primates, généralement arboricoles, à la face souvent glabre et caractérisés par un encéphale développé et de longs membres terminés par des doigts. Bien que leur ressemblance avec l'Homme ait toujours frappé les esprits, la science a mis de nombreux siècles à prouver le lien étroit qui existe entre ceux-ci et l'espèce humaine.\r\n\r\nAu sein des primates, les singes forment un infra-ordre monophylétique, si l'on y inclut le genre Homo, nommé Simiiformes et qui se divise entre les Platyrhiniens (singes du Nouveau Monde : Amérique centrale et méridionale) et les Catarhiniens (singes de l'Ancien Monde : Afrique et Asie tropicales). Ces derniers comprennent les hominoïdes, également appelés « grands singes », dont fait partie Homo sapiens et ses ancêtres les plus proches.\r\n\r\nMême s'il ne fait plus de doute aujourd'hui que « l'Homme est un singe comme les autres », l'expression est majoritairement utilisée pour parler des animaux sauvages, et évoque un référentiel culturel, littéraire et artistique qui exclut l'espèce humaine.", + Hits = 0L, + ImageName = "$monke.png", + Price = 299.99m, + PromoPrice = 99.99m, + Quantity = 58L, + Sales = 0L, + Status = 0, + Title = "Monke :)" + }, + new + { + Id = 30, + Category = "Pokemon", + Description = "It evolves from Pichu when leveled up with high friendship and evolves into Raichu when exposed to a Thunder Stone.\r\n\r\nIn Alola, Pikachu will evolve into Alolan Raichu when exposed to a Thunder Stone.\r\n\r\nPikachu has a Gigantamax form. Pikachu with the Gigantamax Factor cannot evolve.\r\n\r\nIn Pokémon Yellow, the starter Pikachu will refuse to evolve into Raichu unless it is traded and evolved on another save file. In Pokémon: Let's Go, Pikachu!, the player's starter Pikachu also will not evolve, but cannot be traded to become a Raichu.\r\n\r\nPikachu is popularly known as the mascot of the Pokémon franchise and one of Nintendo's major mascots.\r\n\r\nIt is also the game mascot and starter Pokémon of Pokémon Yellow and Let's Go, Pikachu!. It has made numerous appearances on the boxes of spin-off titles.\r\n\r\nPikachu is also the starter Pokémon of Pokémon Rumble Blast and Pokémon Rumble World.", + Hits = 0L, + ImageName = "$pika.png", + Price = 3.99m, + PromoPrice = 2.99m, + Quantity = 69L, + Sales = 0L, + Status = 5, + Title = "Phat Pikachu" }); }); @@ -561,14 +743,14 @@ namespace GrossesMitainesAPI.Migrations new { Id = "c9e08b20-d8a5-473f-9f52-572eb23c12af", - ConcurrencyStamp = "ca8c4d2d-a900-499a-8469-99b6f0499b9d", + ConcurrencyStamp = "d78f5f64-28da-4a3e-b3e9-807d96ba6757", Name = "Administrateur", NormalizedName = "ADMINISTRATEUR" }, new { Id = "1b7b9c55-c746-493a-a24f-3d5ca937298e", - ConcurrencyStamp = "7d36b38e-ae6a-457e-bfd0-62fc0c1d8fc5", + ConcurrencyStamp = "1c7a32ec-3bac-416a-9092-e8617bf63da4", Name = "Client", NormalizedName = "CLIENT" }); diff --git a/GrossesMitaines/grosses-mitaines-ui/src/stylesheets/site.css b/GrossesMitaines/grosses-mitaines-ui/src/stylesheets/site.css index d6e1e9f..551e596 100644 --- a/GrossesMitaines/grosses-mitaines-ui/src/stylesheets/site.css +++ b/GrossesMitaines/grosses-mitaines-ui/src/stylesheets/site.css @@ -255,6 +255,7 @@ a { margin-left: auto; height: 50%; width: auto; + max-width: 95%; } .item-info {