2023-02-24 18:38:05 +04:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
using System;
|
|
|
|
|
using LawFirmDatabaseImplement;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
namespace LawFirmDatabaseImplement.Migrations
|
|
|
|
|
{
|
|
|
|
|
[DbContext(typeof(LawFirmDatabase))]
|
|
|
|
|
partial class LawFirmDatabaseModelSnapshot : ModelSnapshot
|
|
|
|
|
{
|
|
|
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
#pragma warning disable 612, 618
|
|
|
|
|
modelBuilder
|
|
|
|
|
.HasAnnotation("ProductVersion", "7.0.3")
|
|
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
|
|
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Blank", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("BlankName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Cost")
|
|
|
|
|
.HasColumnType("float");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Blanks");
|
|
|
|
|
});
|
|
|
|
|
|
2023-03-25 17:22:51 +04:00
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Client", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ClientFIO")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Email")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Password")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Clients");
|
|
|
|
|
});
|
|
|
|
|
|
2023-02-24 18:38:05 +04:00
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Document", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("DocumentName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Price")
|
|
|
|
|
.HasColumnType("float");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Documents");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.DocumentBlank", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<int>("BlankId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("DocumentId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("BlankId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("DocumentId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("DocumentBlanks");
|
|
|
|
|
});
|
|
|
|
|
|
2023-04-08 00:55:21 +04:00
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Implementer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ImplementerFIO")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Password")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Qualification")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("WorkExperience")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Implementers");
|
|
|
|
|
});
|
|
|
|
|
|
2023-02-24 18:38:05 +04:00
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Order", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
2023-03-25 17:22:51 +04:00
|
|
|
|
b.Property<int>("ClientId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
2023-02-24 18:38:05 +04:00
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("DateCreate")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime?>("DateImplement")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("DocumentId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
2023-04-08 00:55:21 +04:00
|
|
|
|
b.Property<int?>("ImplementerId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
2023-02-24 18:38:05 +04:00
|
|
|
|
b.Property<int>("Status")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Sum")
|
|
|
|
|
.HasColumnType("float");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2023-03-25 17:22:51 +04:00
|
|
|
|
b.HasIndex("ClientId");
|
|
|
|
|
|
2023-02-24 18:38:05 +04:00
|
|
|
|
b.HasIndex("DocumentId");
|
|
|
|
|
|
2023-04-08 00:55:21 +04:00
|
|
|
|
b.HasIndex("ImplementerId");
|
|
|
|
|
|
2023-02-24 18:38:05 +04:00
|
|
|
|
b.ToTable("Orders");
|
|
|
|
|
});
|
|
|
|
|
|
2023-03-12 19:26:43 +04:00
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Shop", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Adress")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("MaxCountDocuments")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("OpeningDate")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Shops");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.ShopDocument", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("DocumentId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("ShopId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("DocumentId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ShopId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("ShopDocuments");
|
|
|
|
|
});
|
|
|
|
|
|
2023-02-24 18:38:05 +04:00
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.DocumentBlank", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("LawFirmDatabaseImplement.Models.Blank", "Blank")
|
|
|
|
|
.WithMany("DocumentBlanks")
|
|
|
|
|
.HasForeignKey("BlankId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("LawFirmDatabaseImplement.Models.Document", "Document")
|
|
|
|
|
.WithMany("Blanks")
|
|
|
|
|
.HasForeignKey("DocumentId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Blank");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Document");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Order", b =>
|
|
|
|
|
{
|
2023-03-25 17:22:51 +04:00
|
|
|
|
b.HasOne("LawFirmDatabaseImplement.Models.Client", "Client")
|
|
|
|
|
.WithMany("Orders")
|
|
|
|
|
.HasForeignKey("ClientId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2023-03-10 20:47:22 +04:00
|
|
|
|
b.HasOne("LawFirmDatabaseImplement.Models.Document", "Document")
|
2023-02-24 18:38:05 +04:00
|
|
|
|
.WithMany("Orders")
|
|
|
|
|
.HasForeignKey("DocumentId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
2023-03-10 20:47:22 +04:00
|
|
|
|
|
2023-04-08 00:55:21 +04:00
|
|
|
|
b.HasOne("LawFirmDatabaseImplement.Models.Implementer", "Implementer")
|
|
|
|
|
.WithMany("Orders")
|
|
|
|
|
.HasForeignKey("ImplementerId");
|
|
|
|
|
|
2023-03-25 17:22:51 +04:00
|
|
|
|
b.Navigation("Client");
|
|
|
|
|
|
2023-03-10 20:47:22 +04:00
|
|
|
|
b.Navigation("Document");
|
2023-04-08 00:55:21 +04:00
|
|
|
|
|
|
|
|
|
b.Navigation("Implementer");
|
2023-02-24 18:38:05 +04:00
|
|
|
|
});
|
|
|
|
|
|
2023-03-12 19:26:43 +04:00
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.ShopDocument", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("LawFirmDatabaseImplement.Models.Document", "Document")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("DocumentId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("LawFirmDatabaseImplement.Models.Shop", "Shop")
|
|
|
|
|
.WithMany("Documents")
|
|
|
|
|
.HasForeignKey("ShopId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Document");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Shop");
|
|
|
|
|
});
|
|
|
|
|
|
2023-02-24 18:38:05 +04:00
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Blank", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("DocumentBlanks");
|
|
|
|
|
});
|
|
|
|
|
|
2023-03-25 17:22:51 +04:00
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Client", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Orders");
|
|
|
|
|
});
|
|
|
|
|
|
2023-02-24 18:38:05 +04:00
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Document", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Blanks");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Orders");
|
|
|
|
|
});
|
2023-04-08 00:55:21 +04:00
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Implementer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Orders");
|
|
|
|
|
});
|
2023-04-18 17:45:17 +04:00
|
|
|
|
|
2023-03-12 19:26:43 +04:00
|
|
|
|
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Shop", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Documents");
|
|
|
|
|
});
|
2023-02-24 18:38:05 +04:00
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|