From 7862b08cdbf76142d890b0dcfdf32e1bb6b1286d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=B0=D0=BB=D0=B8=D0=BD=D0=B0=20=D0=A4=D0=B5=D0=B4?= =?UTF-8?q?=D0=BE=D1=80=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Sat, 27 Apr 2024 21:30:51 +0400 Subject: [PATCH] =?UTF-8?q?=D1=8F=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB?= =?UTF-8?q?=20=D1=82=D0=B0=D0=BA=20=D0=BC=D0=BD=D0=BE=D0=B3=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LawFim/LawFirmDatabaseImplement/Models/Executor.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/LawFim/LawFirmDatabaseImplement/Models/Executor.cs b/LawFim/LawFirmDatabaseImplement/Models/Executor.cs index 9e10824..673b796 100644 --- a/LawFim/LawFirmDatabaseImplement/Models/Executor.cs +++ b/LawFim/LawFirmDatabaseImplement/Models/Executor.cs @@ -2,6 +2,7 @@ using LawFirmContracts.BindingModels; using LawFirmContracts.ViewModels; using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; namespace LawFirmDatabaseImplement.Models { @@ -15,6 +16,13 @@ namespace LawFirmDatabaseImplement.Models [Required] public string Password { get; private set; } = string.Empty; + [ForeignKey("ExecutorId")] + public virtual List Cases { get; set; } = new(); + [ForeignKey("ExecutorId")] + public virtual List Clients { get; set; } = new(); + [ForeignKey("ExecutorId")] + public virtual List Visits { get; set; } = new(); + public static Executor? Create(ExecutorBindingModel? model) { if (model == null)