PIbd-22_Petrushin_E.A._LawFirm/LawFirm/AbstractLawFirmDatabaseImplement/Migrations/AbstractLawFirmDataBaseModelSnapshot.cs

167 lines
5.7 KiB
C#
Raw Normal View History

2024-03-25 20:21:59 +04:00
// <auto-generated />
using System;
using AbstractLawFirmDataBaseImplement;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace AbstractLawFirmDatabaseImplement.Migrations
{
[DbContext(typeof(AbstractLawFirmDataBase))]
partial class AbstractLawFirmDataBaseModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
2024-03-26 00:07:11 +04:00
.HasAnnotation("DocumentVersion", "6.0.28")
2024-03-25 20:21:59 +04:00
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("AbstractLawFirmDataBaseImplement.Models.Component", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
b.Property<string>("ComponentName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("Cost")
.HasColumnType("float");
b.HasKey("Id");
b.ToTable("Components");
});
modelBuilder.Entity("AbstractLawFirmDataBaseImplement.Models.Document", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
b.Property<string>("DocumentName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("Price")
.HasColumnType("float");
b.HasKey("Id");
b.ToTable("Documents");
});
modelBuilder.Entity("AbstractLawFirmDataBaseImplement.Models.DocumentComponent", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
b.Property<int>("ComponentId")
.HasColumnType("int");
b.Property<int>("Count")
.HasColumnType("int");
b.Property<int>("DocumentId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ComponentId");
b.HasIndex("DocumentId");
b.ToTable("DocumentComponents");
});
modelBuilder.Entity("AbstractLawFirmDataBaseImplement.Models.Order", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
b.Property<int>("Count")
.HasColumnType("int");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateImplement")
.HasColumnType("datetime2");
b.Property<int>("DocumentId")
.HasColumnType("int");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<double>("Sum")
.HasColumnType("float");
b.HasKey("Id");
b.HasIndex("DocumentId");
b.ToTable("Orders");
});
modelBuilder.Entity("AbstractLawFirmDataBaseImplement.Models.DocumentComponent", b =>
{
b.HasOne("AbstractLawFirmDataBaseImplement.Models.Component", "Component")
.WithMany("DocumentComponents")
.HasForeignKey("ComponentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("AbstractLawFirmDataBaseImplement.Models.Document", "Document")
.WithMany("Components")
.HasForeignKey("DocumentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Component");
b.Navigation("Document");
});
modelBuilder.Entity("AbstractLawFirmDataBaseImplement.Models.Order", b =>
{
b.HasOne("AbstractLawFirmDataBaseImplement.Models.Document", null)
.WithMany("Orders")
.HasForeignKey("DocumentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("AbstractLawFirmDataBaseImplement.Models.Component", b =>
{
b.Navigation("DocumentComponents");
});
modelBuilder.Entity("AbstractLawFirmDataBaseImplement.Models.Document", b =>
{
b.Navigation("Components");
b.Navigation("Orders");
});
#pragma warning restore 612, 618
}
}
}