|
|
@ -0,0 +1,93 @@ |
|
|
|
|
|
|
|
// <auto-generated /> |
|
|
|
|
|
|
|
using InventoryManagement.Components; |
|
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata; |
|
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations; |
|
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#nullable disable |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace InventoryManagement.Migrations |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
[DbContext(typeof(InventoryContext))] |
|
|
|
|
|
|
|
[Migration("20231018015608_Acc-Prod")] |
|
|
|
|
|
|
|
partial class AccProd |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
|
|
|
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
#pragma warning disable 612, 618 |
|
|
|
|
|
|
|
modelBuilder |
|
|
|
|
|
|
|
.HasAnnotation("ProductVersion", "7.0.12") |
|
|
|
|
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("InventoryManagement.Components.Accessary", b => |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
b.Property<int>("Id") |
|
|
|
|
|
|
|
.ValueGeneratedOnAdd() |
|
|
|
|
|
|
|
.HasColumnType("int"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Description") |
|
|
|
|
|
|
|
.HasColumnType("nvarchar(max)"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Name") |
|
|
|
|
|
|
|
.IsRequired() |
|
|
|
|
|
|
|
.HasColumnType("nvarchar(max)"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b.Property<int>("ProductId") |
|
|
|
|
|
|
|
.HasColumnType("int"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ProductId"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b.ToTable("Accessaries"); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("InventoryManagement.Components.Product", b => |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
b.Property<int>("Id") |
|
|
|
|
|
|
|
.ValueGeneratedOnAdd() |
|
|
|
|
|
|
|
.HasColumnType("int"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Name") |
|
|
|
|
|
|
|
.IsRequired() |
|
|
|
|
|
|
|
.HasColumnType("nvarchar(450)"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Quantity") |
|
|
|
|
|
|
|
.HasColumnType("int"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b.HasIndex("Name") |
|
|
|
|
|
|
|
.IsUnique(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b.ToTable("Products"); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("InventoryManagement.Components.Accessary", b => |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
b.HasOne("InventoryManagement.Components.Product", "CompatibleProduct") |
|
|
|
|
|
|
|
.WithMany("CompatibleAccessaries") |
|
|
|
|
|
|
|
.HasForeignKey("ProductId") |
|
|
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade) |
|
|
|
|
|
|
|
.IsRequired(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b.Navigation("CompatibleProduct"); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("InventoryManagement.Components.Product", b => |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
b.Navigation("CompatibleAccessaries"); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
#pragma warning restore 612, 618 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |