исправил models

This commit is contained in:
maxnes3 2023-04-07 23:33:56 +04:00
parent 82296e3d23
commit be1b5b1a1c
3 changed files with 8 additions and 0 deletions

View File

@ -34,9 +34,13 @@ namespace CaseAccountingDataBaseImplement.Models
[Required] [Required]
public int SpecializationId { get; set; } public int SpecializationId { get; set; }
public virtual Specialization Specialization { get; set; } = new();
[Required] [Required]
public int UserId { get; set; } public int UserId { get; set; }
public virtual User User { get; set; } = new();
[ForeignKey("CaseId")] [ForeignKey("CaseId")]
public virtual List<Hearing> Hearings { get; set; } = new(); public virtual List<Hearing> Hearings { get; set; } = new();

View File

@ -28,6 +28,8 @@ namespace CaseAccountingDataBaseImplement.Models
[Required] [Required]
public int UserId { get; set; } public int UserId { get; set; }
public virtual User User { get; set; } = new();
[ForeignKey("ContractId")] [ForeignKey("ContractId")]
public virtual List<LawyerContracts> LawyerContracts { get; set; } = new(); public virtual List<LawyerContracts> LawyerContracts { get; set; } = new();

View File

@ -27,6 +27,8 @@ namespace CaseAccountingDataBaseImplement.Models
[Required] [Required]
public int UserId { get; set; } public int UserId { get; set; }
public virtual User User { get; set; } = new();
[ForeignKey("DealId")] [ForeignKey("DealId")]
public virtual List<CaseDeal> CaseDeals { get; set; } = new(); public virtual List<CaseDeal> CaseDeals { get; set; } = new();