°˖✧◝(⁰▿⁰)◜✧˖° просто замечательная миграция
This commit is contained in:
parent
8f03f3eb44
commit
013070b909
543
LawCompany/LawCompanyDatabaseImplement/Migrations/20240503003222_InitialCreate2.Designer.cs
generated
Normal file
543
LawCompany/LawCompanyDatabaseImplement/Migrations/20240503003222_InitialCreate2.Designer.cs
generated
Normal file
@ -0,0 +1,543 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using LawCompanyDatabaseImplement;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LawCompanyDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(LawCompanyDatabase))]
|
||||
[Migration("20240503003222_InitialCreate2")]
|
||||
partial class InitialCreate2
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.17")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Case", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("CaseType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateCreate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("DateImplement")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("ExecutorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ExecutorId");
|
||||
|
||||
b.ToTable("Cases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.CaseClient", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CaseId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CaseId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("CaseClients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ExecutorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Phone")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ExecutorId");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Consultation", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CaseId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("ConsultationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("Cost")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("GuarantorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CaseId");
|
||||
|
||||
b.HasIndex("GuarantorId");
|
||||
|
||||
b.ToTable("Consultations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.ConsultationLawyer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ConsultationId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("LawyerId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ConsultationId");
|
||||
|
||||
b.HasIndex("LawyerId");
|
||||
|
||||
b.ToTable("ConsultationLawyers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Executor", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Executors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Guarantor", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Guarantors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Hearing", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("GuarantorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("HearingDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Judge")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("GuarantorId");
|
||||
|
||||
b.ToTable("Hearings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.HearingLawyer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("HearingId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("LawyerId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("HearingId");
|
||||
|
||||
b.HasIndex("LawyerId");
|
||||
|
||||
b.ToTable("HearingLawyers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Lawyer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int?>("GuarantorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Phone")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("GuarantorId");
|
||||
|
||||
b.ToTable("Lawyers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Visit", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ExecutorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("HearingId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("VisitDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ExecutorId");
|
||||
|
||||
b.HasIndex("HearingId");
|
||||
|
||||
b.ToTable("Visits");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.VisitClient", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("VisitId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("VisitId");
|
||||
|
||||
b.ToTable("VisitClients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Case", b =>
|
||||
{
|
||||
b.HasOne("LawCompanyDatabaseImplement.Models.Executor", null)
|
||||
.WithMany("Cases")
|
||||
.HasForeignKey("ExecutorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
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");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LawCompanyDatabaseImplement.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class InitialCreate2 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Lawyers_Guarantors_GuarantorId",
|
||||
table: "Lawyers");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "GuarantorId",
|
||||
table: "Lawyers",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Lawyers_Guarantors_GuarantorId",
|
||||
table: "Lawyers",
|
||||
column: "GuarantorId",
|
||||
principalTable: "Guarantors",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Lawyers_Guarantors_GuarantorId",
|
||||
table: "Lawyers");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "GuarantorId",
|
||||
table: "Lawyers",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Lawyers_Guarantors_GuarantorId",
|
||||
table: "Lawyers",
|
||||
column: "GuarantorId",
|
||||
principalTable: "Guarantors",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
@ -10,533 +10,531 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace LawCompanyDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(LawCompanyDatabase))]
|
||||
partial class LawCompanyDatabaseModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
[DbContext(typeof(LawCompanyDatabase))]
|
||||
partial class LawCompanyDatabaseModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.17")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.17")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Case", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Case", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("CaseType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("CaseType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateCreate")
|
||||
.HasColumnType("datetime2");
|
||||
b.Property<DateTime>("DateCreate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("DateImplement")
|
||||
.HasColumnType("datetime2");
|
||||
b.Property<DateTime?>("DateImplement")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("ExecutorId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("ExecutorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ExecutorId");
|
||||
b.HasIndex("ExecutorId");
|
||||
|
||||
b.ToTable("Cases");
|
||||
});
|
||||
b.ToTable("Cases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.CaseClient", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.CaseClient", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CaseId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("CaseId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CaseId");
|
||||
b.HasIndex("CaseId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("CaseClients");
|
||||
});
|
||||
b.ToTable("CaseClients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ExecutorId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("ExecutorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Phone")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("Phone")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ExecutorId");
|
||||
b.HasIndex("ExecutorId");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Consultation", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Consultation", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CaseId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("CaseId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("ConsultationDate")
|
||||
.HasColumnType("datetime2");
|
||||
b.Property<DateTime>("ConsultationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("Cost")
|
||||
.HasColumnType("float");
|
||||
b.Property<double>("Cost")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("GuarantorId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("GuarantorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CaseId");
|
||||
b.HasIndex("CaseId");
|
||||
|
||||
b.HasIndex("GuarantorId");
|
||||
b.HasIndex("GuarantorId");
|
||||
|
||||
b.ToTable("Consultations");
|
||||
});
|
||||
b.ToTable("Consultations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.ConsultationLawyer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.ConsultationLawyer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ConsultationId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("ConsultationId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("LawyerId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("LawyerId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ConsultationId");
|
||||
b.HasIndex("ConsultationId");
|
||||
|
||||
b.HasIndex("LawyerId");
|
||||
b.HasIndex("LawyerId");
|
||||
|
||||
b.ToTable("ConsultationLawyers");
|
||||
});
|
||||
b.ToTable("ConsultationLawyers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Executor", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Executor", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Executors");
|
||||
});
|
||||
b.ToTable("Executors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Guarantor", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Guarantor", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Guarantors");
|
||||
});
|
||||
b.ToTable("Guarantors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Hearing", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Hearing", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("GuarantorId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("GuarantorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("HearingDate")
|
||||
.HasColumnType("datetime2");
|
||||
b.Property<DateTime>("HearingDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Judge")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("Judge")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("GuarantorId");
|
||||
b.HasIndex("GuarantorId");
|
||||
|
||||
b.ToTable("Hearings");
|
||||
});
|
||||
b.ToTable("Hearings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.HearingLawyer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.HearingLawyer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("HearingId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("HearingId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("LawyerId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("LawyerId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("HearingId");
|
||||
b.HasIndex("HearingId");
|
||||
|
||||
b.HasIndex("LawyerId");
|
||||
b.HasIndex("LawyerId");
|
||||
|
||||
b.ToTable("HearingLawyers");
|
||||
});
|
||||
b.ToTable("HearingLawyers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Lawyer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Lawyer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("GuarantorId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int?>("GuarantorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Phone")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<string>("Phone")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("GuarantorId");
|
||||
b.HasIndex("GuarantorId");
|
||||
|
||||
b.ToTable("Lawyers");
|
||||
});
|
||||
b.ToTable("Lawyers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Visit", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Visit", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ExecutorId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("ExecutorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("HearingId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("HearingId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("VisitDate")
|
||||
.HasColumnType("datetime2");
|
||||
b.Property<DateTime>("VisitDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ExecutorId");
|
||||
b.HasIndex("ExecutorId");
|
||||
|
||||
b.HasIndex("HearingId");
|
||||
b.HasIndex("HearingId");
|
||||
|
||||
b.ToTable("Visits");
|
||||
});
|
||||
b.ToTable("Visits");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.VisitClient", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.VisitClient", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("VisitId")
|
||||
.HasColumnType("int");
|
||||
b.Property<int>("VisitId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("VisitId");
|
||||
b.HasIndex("VisitId");
|
||||
|
||||
b.ToTable("VisitClients");
|
||||
});
|
||||
b.ToTable("VisitClients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Case", b =>
|
||||
{
|
||||
b.HasOne("LawCompanyDatabaseImplement.Models.Executor", null)
|
||||
.WithMany("Cases")
|
||||
.HasForeignKey("ExecutorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
modelBuilder.Entity("LawCompanyDatabaseImplement.Models.Case", b =>
|
||||
{
|
||||
b.HasOne("LawCompanyDatabaseImplement.Models.Executor", null)
|
||||
.WithMany("Cases")
|
||||
.HasForeignKey("ExecutorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
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")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
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");
|
||||
});
|
||||
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");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user