feat(dal): Созданы таблицы JobGroupTypes+UnitsInTemplates, обновлен ключ уникального индекса шаблонов

This commit is contained in:
Mikhail Kuznetsov
2025-11-14 14:48:56 +10:00
parent 334595e81c
commit 48c8741395
19 changed files with 12199 additions and 16 deletions

View File

@@ -44,7 +44,7 @@ namespace PARR.DAL.Models.Job
/// true - диапазон связей относится к родительским связям<br/>
/// false, null - диапазон относится к дочерним связям
/// </value>
public bool? isParentRelationships { get; set; }
public bool? IsParentRelationships { get; set; }
/// <summary>
/// Маска для динамического формирования имени шаблона

View File

@@ -27,7 +27,7 @@ namespace PARR.DAL.Models.Job
/// Связана ли работа с групповыми ЭК(зонтами)
/// </summary>
public bool? IsUmbrella { get; set; }
/// <summary>
/// Поле Короткое описания шаблона АСУ ЕСПП
/// </summary>
@@ -114,6 +114,11 @@ namespace PARR.DAL.Models.Job
/// </summary>
public string? AgentScript { get; set; }
public Guid GroupTypeId { get; set; }
[ForeignKey(nameof(GroupTypeId))]
public JobGroupType? GroupType { get; set; }
public ICollection<Job> Jobs { get; set; } = new HashSet<Job>();
public ICollection<EsppSchValue> EsppSchValues { get; set; } = new HashSet<EsppSchValue>();

View File

@@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context;
using PARR.DAL.Contracts;
using PARR.DAL.Models.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models.Job
{
[Table("GroupTypes", Schema = DataContextSettings.Job)]
[Comment("Таблица типов групп работ")]
public class JobGroupType : IBase
{
[Key]
public Guid Id { get; set; }
public DateTimeOffset DateCreated { get; set; }
[NotMapped]
public DateTimeOffset? DateModified { get; set; }
public required JobGroupTypesEnum Code { get; set; }
public required string Name { get; set; }
public ICollection<JobGroup> JobGroups { get; set; } = new HashSet<JobGroup>();
}
}

View File

@@ -46,9 +46,5 @@ namespace PARR.DAL.Models.Job
[ForeignKey(nameof(FieldId))]
public UnitField? UnitField { get; set; }
}
}