2022-10-09 13:18:39 -04:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
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))]
|
2022-10-09 15:07:35 -04:00
|
|
|
|
[Migration("20221009190720_Initial-Db")]
|
2022-10-09 13:18:39 -04:00
|
|
|
|
partial class InitialDb
|
|
|
|
|
{
|
|
|
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
#pragma warning disable 612, 618
|
|
|
|
|
modelBuilder
|
|
|
|
|
.HasAnnotation("ProductVersion", "6.0.9")
|
|
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
|
|
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("GrossesMitainesAPI.Models.Product", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
|
|
|
|
|
2022-10-09 15:07:35 -04:00
|
|
|
|
b.Property<string>("Category")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
2022-10-09 13:18:39 -04:00
|
|
|
|
b.Property<string>("Description")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ImageName")
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<decimal>("Price")
|
|
|
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
|
|
2022-10-09 15:07:35 -04:00
|
|
|
|
b.Property<long>("Quantity")
|
|
|
|
|
.HasColumnType("bigint");
|
|
|
|
|
|
2022-10-09 13:18:39 -04:00
|
|
|
|
b.Property<string>("Title")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasMaxLength(255)
|
|
|
|
|
.HasColumnType("nvarchar(255)");
|
|
|
|
|
|
2022-10-09 15:07:35 -04:00
|
|
|
|
b.Property<bool>("isDiscontinued")
|
|
|
|
|
.HasColumnType("bit");
|
|
|
|
|
|
2022-10-09 13:18:39 -04:00
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Products");
|
|
|
|
|
|
|
|
|
|
b.HasData(
|
|
|
|
|
new
|
|
|
|
|
{
|
|
|
|
|
Id = 1,
|
2022-10-09 15:07:35 -04:00
|
|
|
|
Category = "Linge",
|
2022-10-09 13:18:39 -04:00
|
|
|
|
Description = "Pour faire votre propre bonhomme de 1837, comme dans le bon vieux temps.",
|
|
|
|
|
ImageName = "ceintureflechee",
|
|
|
|
|
Price = 85.86m,
|
2022-10-09 15:07:35 -04:00
|
|
|
|
Quantity = 1L,
|
|
|
|
|
Title = "Ceinture flèchée",
|
|
|
|
|
isDiscontinued = false
|
2022-10-09 13:18:39 -04:00
|
|
|
|
},
|
|
|
|
|
new
|
|
|
|
|
{
|
|
|
|
|
Id = 2,
|
2022-10-09 15:07:35 -04:00
|
|
|
|
Category = "Linge",
|
2022-10-09 13:18:39 -04:00
|
|
|
|
Description = "Parce que ça sent la coupe!",
|
|
|
|
|
ImageName = "pantouflesCH",
|
|
|
|
|
Price = 15.64m,
|
2022-10-09 15:07:35 -04:00
|
|
|
|
Quantity = 54L,
|
|
|
|
|
Title = "Pantoufles du Canadien en Phentex",
|
|
|
|
|
isDiscontinued = false
|
2022-10-09 13:18:39 -04:00
|
|
|
|
},
|
|
|
|
|
new
|
|
|
|
|
{
|
|
|
|
|
Id = 3,
|
2022-10-09 15:07:35 -04:00
|
|
|
|
Category = "Homme",
|
2022-10-09 13:18:39 -04:00
|
|
|
|
Description = "On ne lui ferait pas mal, en tout cas!!",
|
|
|
|
|
ImageName = "jeanlucmongrain",
|
|
|
|
|
Price = 1453.12m,
|
2022-10-09 15:07:35 -04:00
|
|
|
|
Quantity = 1L,
|
|
|
|
|
Title = "Jean-Luc Mongrain",
|
|
|
|
|
isDiscontinued = true
|
2022-10-09 13:18:39 -04:00
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|