feat(dal, domain): Для таблице UnitInTemplates добавлена связь с UnitFieldValues. В таблице Templates убраны значения по умолчанию для поле JobId, UnitId.
This commit is contained in:
@@ -2,20 +2,28 @@
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities
|
||||
namespace PARR.Domain.Entities.Job
|
||||
{
|
||||
[Table("UnitsInTemplates", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица связи ЭК в шаблонах")]
|
||||
public class UnitsInTemplate
|
||||
{
|
||||
public Guid TemplateId { get; set; }
|
||||
|
||||
public Guid UnitId { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public Guid UnitFieldValueId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(TemplateId))]
|
||||
public Template? Template { get; set; }
|
||||
|
||||
[ForeignKey(nameof(UnitId))]
|
||||
public Unit.Unit? Unit { get; set; }
|
||||
|
||||
[ForeignKey(nameof(UnitFieldValueId))]
|
||||
public Unit.UnitFieldValue? UnitFieldValue { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Entities.Base.History.Base;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using PARR.Domain.Enums;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@@ -27,5 +28,7 @@ namespace PARR.Domain.Entities.Unit
|
||||
public ICollection<UnitFieldInUnitFieldValue> FieldValues { get; set; } = new HashSet<UnitFieldInUnitFieldValue>();
|
||||
|
||||
public UnitRegionalEkPtkGroup? RegionalEkPtkGroup { get; set; }
|
||||
|
||||
public ICollection<UnitsInTemplate> UnitsInTemplates { get; set; } = new HashSet<UnitsInTemplate>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user