//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SecureShopDatabaseImplement;
#nullable disable
namespace SecureShopDatabaseImplement.Migrations
{
[DbContext(typeof(SecureShopDatabase))]
partial class SecureShopDatabaseModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("SecureShopDatabaseImplement.Models.Facilities", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Cost")
.HasColumnType("float");
b.Property("FacilitiesName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Facilitiess");
});
modelBuilder.Entity("SecureShopDatabaseImplement.Models.Order", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Count")
.HasColumnType("int");
b.Property("DateCreate")
.HasColumnType("datetime2");
b.Property("DateImplement")
.HasColumnType("datetime2");
b.Property("SecureId")
.HasColumnType("int");
b.Property("Status")
.HasColumnType("int");
b.Property("Sum")
.HasColumnType("float");
b.HasKey("Id");
b.HasIndex("SecureId");
b.ToTable("Orders");
});
modelBuilder.Entity("SecureShopDatabaseImplement.Models.Secure", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Price")
.HasColumnType("float");
b.Property("SecureName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Secures");
});
modelBuilder.Entity("SecureShopDatabaseImplement.Models.SecureFacilities", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Count")
.HasColumnType("int");
b.Property("FacilitiesId")
.HasColumnType("int");
b.Property("SecureId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("FacilitiesId");
b.HasIndex("SecureId");
b.ToTable("SecureFacilitiess");
});
modelBuilder.Entity("SecureShopDatabaseImplement.Models.Order", b =>
{
b.HasOne("SecureShopDatabaseImplement.Models.Secure", "Secure")
.WithMany("Orders")
.HasForeignKey("SecureId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Secure");
});
modelBuilder.Entity("SecureShopDatabaseImplement.Models.SecureFacilities", b =>
{
b.HasOne("SecureShopDatabaseImplement.Models.Facilities", "Facilities")
.WithMany("SecureFacilitiess")
.HasForeignKey("FacilitiesId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("SecureShopDatabaseImplement.Models.Secure", "Secure")
.WithMany("Facilitiess")
.HasForeignKey("SecureId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Facilities");
b.Navigation("Secure");
});
modelBuilder.Entity("SecureShopDatabaseImplement.Models.Facilities", b =>
{
b.Navigation("SecureFacilitiess");
});
modelBuilder.Entity("SecureShopDatabaseImplement.Models.Secure", b =>
{
b.Navigation("Facilitiess");
b.Navigation("Orders");
});
#pragma warning restore 612, 618
}
}
}