2024-05-02 14:30:21 +04:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
using System;
|
|
|
|
|
using LawCompanyDatabaseImplement;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
namespace LawCompanyDatabaseImplement.Migrations
|
|
|
|
|
{
|
2024-05-03 04:34:54 +04:00
|
|
|
|
[DbContext(typeof(LawCompanyDatabase))]
|
|
|
|
|
partial class LawCompanyDatabaseModelSnapshot : ModelSnapshot
|
|
|
|
|
{
|
|
|
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
2024-05-02 14:30:21 +04:00
|
|
|
|
#pragma warning disable 612, 618
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder
|
|
|
|
|
.HasAnnotation("ProductVersion", "7.0.17")
|
|
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Case", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("CaseType")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<DateTime>("DateCreate")
|
|
|
|
|
.HasColumnType("datetime2");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<DateTime?>("DateImplement")
|
|
|
|
|
.HasColumnType("datetime2");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("ExecutorId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("Status")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasKey("Id");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("ExecutorId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.ToTable("Cases");
|
|
|
|
|
});
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.CaseClient", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("CaseId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("ClientId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasKey("Id");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("CaseId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("ClientId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.ToTable("CaseClients");
|
|
|
|
|
});
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Client", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("Email")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("ExecutorId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("FIO")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("Phone")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasKey("Id");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("ExecutorId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.ToTable("Clients");
|
|
|
|
|
});
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Consultation", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("CaseId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<DateTime>("ConsultationDate")
|
|
|
|
|
.HasColumnType("datetime2");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<double>("Cost")
|
|
|
|
|
.HasColumnType("float");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("GuarantorId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasKey("Id");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("CaseId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("GuarantorId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.ToTable("Consultations");
|
|
|
|
|
});
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.ConsultationLawyer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("ConsultationId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("LawyerId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasKey("Id");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("ConsultationId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("LawyerId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.ToTable("ConsultationLawyers");
|
|
|
|
|
});
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Executor", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("Email")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("FIO")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("Password")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasKey("Id");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.ToTable("Executors");
|
|
|
|
|
});
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Guarantor", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("Email")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("FIO")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("Password")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasKey("Id");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.ToTable("Guarantors");
|
|
|
|
|
});
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Hearing", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("GuarantorId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<DateTime>("HearingDate")
|
|
|
|
|
.HasColumnType("datetime2");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("Judge")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasKey("Id");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("GuarantorId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.ToTable("Hearings");
|
|
|
|
|
});
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.HearingLawyer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("HearingId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("LawyerId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasKey("Id");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("HearingId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("LawyerId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.ToTable("HearingLawyers");
|
|
|
|
|
});
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Lawyer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("Email")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("FIO")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int?>("GuarantorId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<string>("Phone")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasKey("Id");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("GuarantorId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.ToTable("Lawyers");
|
|
|
|
|
});
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Visit", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("ExecutorId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("HearingId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<DateTime>("VisitDate")
|
|
|
|
|
.HasColumnType("datetime2");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasKey("Id");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("ExecutorId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("HearingId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.ToTable("Visits");
|
|
|
|
|
});
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.VisitClient", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("ClientId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.Property<int>("VisitId")
|
|
|
|
|
.HasColumnType("int");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasKey("Id");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("ClientId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.HasIndex("VisitId");
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
b.ToTable("VisitClients");
|
|
|
|
|
});
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Case", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Executor", null)
|
|
|
|
|
.WithMany("Cases")
|
|
|
|
|
.HasForeignKey("ExecutorId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
});
|
2024-05-02 14:30:21 +04:00
|
|
|
|
|
2024-05-03 04:34:54 +04:00
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.CaseClient", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Case", "Case")
|
|
|
|
|
.WithMany("Clients")
|
|
|
|
|
.HasForeignKey("CaseId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Client", "Client")
|
|
|
|
|
.WithMany("CaseClients")
|
|
|
|
|
.HasForeignKey("ClientId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Case");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Client");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Client", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Executor", null)
|
|
|
|
|
.WithMany("Clients")
|
|
|
|
|
.HasForeignKey("ExecutorId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Consultation", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Case", "Case")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("CaseId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Guarantor", null)
|
|
|
|
|
.WithMany("Consultations")
|
|
|
|
|
.HasForeignKey("GuarantorId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Case");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.ConsultationLawyer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Consultation", "Consultation")
|
|
|
|
|
.WithMany("Lawyers")
|
|
|
|
|
.HasForeignKey("ConsultationId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Lawyer", "Lawyer")
|
|
|
|
|
.WithMany("ConsultationLawyers")
|
|
|
|
|
.HasForeignKey("LawyerId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Consultation");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Lawyer");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Hearing", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Guarantor", null)
|
|
|
|
|
.WithMany("Hearings")
|
|
|
|
|
.HasForeignKey("GuarantorId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.HearingLawyer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Hearing", "Hearing")
|
|
|
|
|
.WithMany("Lawyers")
|
|
|
|
|
.HasForeignKey("HearingId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Lawyer", "Lawyer")
|
|
|
|
|
.WithMany("HearingLawyers")
|
|
|
|
|
.HasForeignKey("LawyerId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Hearing");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Lawyer");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Lawyer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Guarantor", null)
|
|
|
|
|
.WithMany("Lawyers")
|
|
|
|
|
.HasForeignKey("GuarantorId");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Visit", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Executor", null)
|
|
|
|
|
.WithMany("Visits")
|
|
|
|
|
.HasForeignKey("ExecutorId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Hearing", "Hearing")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("HearingId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Hearing");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.VisitClient", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Client", "Client")
|
|
|
|
|
.WithMany("ClientVisits")
|
|
|
|
|
.HasForeignKey("ClientId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("LawCompanyDatabaseImplement.Models.Visit", "Visit")
|
|
|
|
|
.WithMany("Clients")
|
|
|
|
|
.HasForeignKey("VisitId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Client");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Visit");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Case", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Clients");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Client", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("CaseClients");
|
|
|
|
|
|
|
|
|
|
b.Navigation("ClientVisits");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Consultation", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Lawyers");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Executor", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Cases");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Clients");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Visits");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Guarantor", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Consultations");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Hearings");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Lawyers");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Hearing", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Lawyers");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Lawyer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("ConsultationLawyers");
|
|
|
|
|
|
|
|
|
|
b.Navigation("HearingLawyers");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Visit", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Clients");
|
|
|
|
|
});
|
2024-05-02 14:30:21 +04:00
|
|
|
|
#pragma warning restore 612, 618
|
2024-05-03 04:34:54 +04:00
|
|
|
|
}
|
|
|
|
|
}
|
2024-05-02 14:30:21 +04:00
|
|
|
|
}
|