Добавлен справочник ResponseArea

This commit is contained in:
Mikhail Kuznetsov
2023-09-28 14:28:10 +10:00
parent 90c500482a
commit 7091e849a4
17 changed files with 3775 additions and 42 deletions

View File

@@ -24,11 +24,14 @@ namespace PARR.DAL.Models
//public string? LinkEK { get; set; }
//TODO: удалить поле Status, вместо него использовать EkStatusCode
public string? Status { get; set; }
//public string? StatusStr { get; set; }
public string? WorkGroup { get; set; }
public string? ResponseArea { get; set; }
//TODO: удалить поле ResponseAreaStr
//public string? ResponseAreaStr { get; set; }
public int ResponseAreaCode { get; set; }
public ICollection<ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<ApplicationInHost>();
@@ -38,5 +41,8 @@ namespace PARR.DAL.Models
[ForeignKey(nameof(EkStatusCode))]
public EkStatus? EkStatus { get; set; }
[ForeignKey(nameof(ResponseAreaCode))]
public ResponseArea? ResponseArea { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models
{
[Table("ResponseAreas")]
public class ResponseArea
{
[Key]
public int Code { get; set; }
[Required]
public string Name { get; set; } = string.Empty;
public ICollection<Host> Hosts { get; set; } = new HashSet<Host>();
}
}