Renvoit du rôle au frontend avec Get Login (UPDATE-DATABASE)
This commit is contained in:
@@ -41,6 +41,16 @@ namespace GrossesMitainesAPI.Migrations
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
@@ -89,23 +99,143 @@ namespace GrossesMitainesAPI.Migrations
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = "809dc5fd-c62f-4d93-abe4-275a55aabd33",
|
||||
Id = "ecf7503a-591c-454e-a824-048e10bd0474",
|
||||
AccessFailedCount = 0,
|
||||
ConcurrencyStamp = "f2e55d24-1ab5-441c-87e0-808f32045ab4",
|
||||
ConcurrencyStamp = "6259a59c-35df-4662-84e5-a783e653a643",
|
||||
Email = "admin@admin.com",
|
||||
EmailConfirmed = false,
|
||||
FirstName = "Roger",
|
||||
LastName = "Admin",
|
||||
LockoutEnabled = false,
|
||||
NormalizedEmail = "admin@admin.com",
|
||||
NormalizedUserName = "admin",
|
||||
PasswordHash = "AQAAAAEAACcQAAAAEKJtYKQ3fXHUA67KkZbzgDtxdg1UlFk3kFeNj3QSm3OfgsSoMtFExAq16W5arTVmRA==",
|
||||
NormalizedEmail = "ADMIN@ADMIN.COM",
|
||||
NormalizedUserName = "ADMIN",
|
||||
PasswordHash = "AQAAAAEAACcQAAAAELHpALZdYcW7KzDcU2ovqwdWsfSx68md+LnjvL5ZgJ2OWuTFwJM3gPzQ1yP3RHCn9g==",
|
||||
PhoneNumberConfirmed = false,
|
||||
SecurityStamp = "56fc4076-5e9d-4bd1-91e7-b53abcc41fda",
|
||||
SecurityStamp = "c43f4d48-f1bb-4a24-8cd3-78422556cf85",
|
||||
TwoFactorEnabled = false,
|
||||
UserName = "Admin"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GrossesMitainesAPI.Models.Product", b =>
|
||||
modelBuilder.Entity("GrossesMitainesAPI.Models.AddressModel", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<string>("Appartment")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("CivicNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.Property<string>("InventoryUserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("PostalCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Province")
|
||||
.IsRequired()
|
||||
.HasMaxLength(3)
|
||||
.HasColumnType("nvarchar(3)");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("InventoryUserId");
|
||||
|
||||
b.ToTable("Addresses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GrossesMitainesAPI.Models.InvoiceModel", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<bool>("Canceled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("EmailAddress")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.Property<string>("LinkedAccountId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ShippingAddressId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("LinkedAccountId");
|
||||
|
||||
b.HasIndex("ShippingAddressId");
|
||||
|
||||
b.ToTable("Invoices");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GrossesMitainesAPI.Models.InvoiceModel+ProductInvoice", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<int?>("InvoiceModelId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ProductId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("InvoiceModelId");
|
||||
|
||||
b.HasIndex("ProductId");
|
||||
|
||||
b.ToTable("ProductInvoice");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GrossesMitainesAPI.Models.ProductModel", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -423,6 +553,22 @@ namespace GrossesMitainesAPI.Migrations
|
||||
.HasFilter("[NormalizedName] IS NOT NULL");
|
||||
|
||||
b.ToTable("AspNetRoles", (string)null);
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = "c9e08b20-d8a5-473f-9f52-572eb23c12af",
|
||||
ConcurrencyStamp = "56321382-1bb3-4dfe-87bf-6919c0791765",
|
||||
Name = "Administrateur",
|
||||
NormalizedName = "ADMINISTRATEUR"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = "1b7b9c55-c746-493a-a24f-3d5ca937298e",
|
||||
ConcurrencyStamp = "0e3b1bc2-f632-4f63-9bea-ac995e2e95a7",
|
||||
Name = "Client",
|
||||
NormalizedName = "CLIENT"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||
@@ -510,6 +656,18 @@ namespace GrossesMitainesAPI.Migrations
|
||||
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<string>", b =>
|
||||
@@ -531,6 +689,45 @@ namespace GrossesMitainesAPI.Migrations
|
||||
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<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
@@ -581,6 +778,16 @@ namespace GrossesMitainesAPI.Migrations
|
||||
.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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user