//
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("20221030195130_Initial-Db")]
partial class InitialDb
{
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("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 = "809dc5fd-c62f-4d93-abe4-275a55aabd33",
AccessFailedCount = 0,
ConcurrencyStamp = "f2e55d24-1ab5-441c-87e0-808f32045ab4",
Email = "admin@admin.com",
EmailConfirmed = false,
LockoutEnabled = false,
NormalizedEmail = "admin@admin.com",
NormalizedUserName = "admin",
PasswordHash = "AQAAAAEAACcQAAAAEKJtYKQ3fXHUA67KkZbzgDtxdg1UlFk3kFeNj3QSm3OfgsSoMtFExAq16W5arTVmRA==",
PhoneNumberConfirmed = false,
SecurityStamp = "56fc4076-5e9d-4bd1-91e7-b53abcc41fda",
TwoFactorEnabled = false,
UserName = "Admin"
});
});
modelBuilder.Entity("GrossesMitainesAPI.Models.Product", 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",
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",
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",
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",
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",
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",
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",
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 = "kokin",
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",
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",
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",
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",
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",
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",
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",
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",
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",
Price = 9.45m,
PromoPrice = 8.99m,
Quantity = 16L,
Sales = 0L,
Status = 0,
Title = "Mitaines pas de doigts"
});
});
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);
});
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);
});
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("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();
});
#pragma warning restore 612, 618
}
}
}