Seed de 5 commande pour Admin

This commit is contained in:
Victor Turgeon
2022-11-07 22:13:11 -05:00
parent 6d29d85edf
commit 13310f6cd0
7 changed files with 2794 additions and 18 deletions

View File

@@ -101,7 +101,7 @@ namespace GrossesMitainesAPI.Migrations
{
Id = "ecf7503a-591c-454e-a824-048e10bd0474",
AccessFailedCount = 0,
ConcurrencyStamp = "381655f0-b7d5-49c2-b87a-a6e8b563c8b7",
ConcurrencyStamp = "55f4780c-49dd-44ea-b566-30d058c0005b",
Email = "admin@admin.com",
EmailConfirmed = false,
FirstName = "Roger",
@@ -109,9 +109,9 @@ namespace GrossesMitainesAPI.Migrations
LockoutEnabled = false,
NormalizedEmail = "ADMIN@ADMIN.COM",
NormalizedUserName = "ADMIN",
PasswordHash = "AQAAAAEAACcQAAAAEBIJf5ELMYpuvPzwGaeS/3/QXeZZvHDGX4kA/mHpGQ0hJ8FYIFV986Y+30S75yupRg==",
PasswordHash = "AQAAAAEAACcQAAAAEK/n6j8ui+ZivXKUi2Lv6Jr7wXBJQdOdXawkvVDBlr4Rnxc7DxsuWwaaX5vN3YSjmQ==",
PhoneNumberConfirmed = false,
SecurityStamp = "6976eccd-d011-4d96-8ceb-0aefe9454da7",
SecurityStamp = "e3f2e569-fb52-49af-b9bc-10bf8df2b778",
TwoFactorEnabled = false,
UserName = "Admin"
});
@@ -163,6 +163,20 @@ namespace GrossesMitainesAPI.Migrations
b.HasIndex("InventoryUserId");
b.ToTable("Addresses");
b.HasData(
new
{
Id = 1,
Appartment = "B",
City = "Saint-Chrysostome",
CivicNumber = 1234,
Country = "Canada",
InventoryUserId = "ecf7503a-591c-454e-a824-048e10bd0474",
PostalCode = "H0H0H0",
Province = "QC",
Street = "Rue Pierre-Falardeau"
});
});
modelBuilder.Entity("GrossesMitainesAPI.Models.InvoiceModel", b =>
@@ -210,6 +224,68 @@ namespace GrossesMitainesAPI.Migrations
b.HasIndex("ShippingAddressId");
b.ToTable("Invoices");
b.HasData(
new
{
Id = 1,
EmailAddress = "admin@admin.com",
FirstName = "Roger",
LastName = "Admin",
LinkedAccountId = "ecf7503a-591c-454e-a824-048e10bd0474",
PhoneNumber = "111-111-1111",
PurchaseDate = new DateTime(2022, 11, 7, 22, 8, 27, 792, DateTimeKind.Local).AddTicks(1206),
ShippingAddressId = 1,
Status = 0
},
new
{
Id = 2,
EmailAddress = "admin@admin.com",
FirstName = "Roger",
LastName = "Admin",
LinkedAccountId = "ecf7503a-591c-454e-a824-048e10bd0474",
PhoneNumber = "111-111-1111",
PurchaseDate = new DateTime(2022, 11, 7, 22, 8, 27, 792, DateTimeKind.Local).AddTicks(1244),
ShippingAddressId = 1,
Status = 1
},
new
{
Id = 3,
EmailAddress = "admin@admin.com",
FirstName = "Roger",
LastName = "Admin",
LinkedAccountId = "ecf7503a-591c-454e-a824-048e10bd0474",
PhoneNumber = "111-111-1111",
PurchaseDate = new DateTime(2022, 11, 7, 22, 8, 27, 792, DateTimeKind.Local).AddTicks(1247),
ShippingAddressId = 1,
Status = 3
},
new
{
Id = 4,
EmailAddress = "admin@admin.com",
FirstName = "Roger",
LastName = "Admin",
LinkedAccountId = "ecf7503a-591c-454e-a824-048e10bd0474",
PhoneNumber = "111-111-1111",
PurchaseDate = new DateTime(2022, 11, 7, 22, 8, 27, 792, DateTimeKind.Local).AddTicks(1249),
ShippingAddressId = 1,
Status = 4
},
new
{
Id = 5,
EmailAddress = "admin@admin.com",
FirstName = "Roger",
LastName = "Admin",
LinkedAccountId = "ecf7503a-591c-454e-a824-048e10bd0474",
PhoneNumber = "111-111-1111",
PurchaseDate = new DateTime(2022, 11, 7, 22, 8, 27, 792, DateTimeKind.Local).AddTicks(1251),
ShippingAddressId = 1,
Status = 5
});
});
modelBuilder.Entity("GrossesMitainesAPI.Models.InvoiceModel+ProductInvoice", b =>
@@ -236,6 +312,113 @@ namespace GrossesMitainesAPI.Migrations
b.HasIndex("ProductId");
b.ToTable("ProductInvoice");
b.HasData(
new
{
Id = 1,
InvoiceModelId = 1,
ProductId = 1,
Quantity = 2L
},
new
{
Id = 2,
InvoiceModelId = 1,
ProductId = 4,
Quantity = 5L
},
new
{
Id = 3,
InvoiceModelId = 2,
ProductId = 3,
Quantity = 1L
},
new
{
Id = 4,
InvoiceModelId = 2,
ProductId = 5,
Quantity = 2L
},
new
{
Id = 5,
InvoiceModelId = 2,
ProductId = 7,
Quantity = 1L
},
new
{
Id = 6,
InvoiceModelId = 3,
ProductId = 9,
Quantity = 1L
},
new
{
Id = 7,
InvoiceModelId = 3,
ProductId = 11,
Quantity = 1L
},
new
{
Id = 8,
InvoiceModelId = 4,
ProductId = 14,
Quantity = 1L
},
new
{
Id = 9,
InvoiceModelId = 4,
ProductId = 13,
Quantity = 1L
},
new
{
Id = 10,
InvoiceModelId = 4,
ProductId = 16,
Quantity = 1L
},
new
{
Id = 11,
InvoiceModelId = 4,
ProductId = 24,
Quantity = 25L
},
new
{
Id = 12,
InvoiceModelId = 5,
ProductId = 25,
Quantity = 1L
},
new
{
Id = 13,
InvoiceModelId = 5,
ProductId = 29,
Quantity = 1L
},
new
{
Id = 14,
InvoiceModelId = 5,
ProductId = 30,
Quantity = 1L
},
new
{
Id = 15,
InvoiceModelId = 5,
ProductId = 15,
Quantity = 2L
});
});
modelBuilder.Entity("GrossesMitainesAPI.Models.ProductModel", b =>
@@ -743,14 +926,14 @@ namespace GrossesMitainesAPI.Migrations
new
{
Id = "c9e08b20-d8a5-473f-9f52-572eb23c12af",
ConcurrencyStamp = "d78f5f64-28da-4a3e-b3e9-807d96ba6757",
ConcurrencyStamp = "3b41186e-cc4b-49c0-b172-4c2b9be614d2",
Name = "Administrateur",
NormalizedName = "ADMINISTRATEUR"
},
new
{
Id = "1b7b9c55-c746-493a-a24f-3d5ca937298e",
ConcurrencyStamp = "1c7a32ec-3bac-416a-9092-e8617bf63da4",
ConcurrencyStamp = "664e61a9-f77d-46ee-805c-98084e8b2fcb",
Name = "Client",
NormalizedName = "CLIENT"
});