feat(dal,api): добавлены таблицы исключений расписания еспп.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.DAL.Models.Schedule;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
@@ -21,6 +22,7 @@ namespace PARR.DAL.Models
|
||||
|
||||
public Guid JobGroupId { get; set; }
|
||||
|
||||
|
||||
//[ForeignKey(nameof(ApplicationsInWorkId))]
|
||||
//public ApplicationsInWork? ApplicationsInWork { get; set; }
|
||||
|
||||
|
||||
@@ -24,6 +24,11 @@ namespace PARR.DAL.Models.Job
|
||||
|
||||
public required string ValueMask { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Отсутствует
|
||||
/// </summary>
|
||||
public bool IsInverse { get; set; } = false;
|
||||
|
||||
|
||||
[ForeignKey(nameof(FieldId))]
|
||||
public UnitField? UnitField { get; set; }
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Base;
|
||||
using PARR.DAL.Models.Schedule;
|
||||
using PARR.DAL.Models.Unit;
|
||||
using PARR.DAL.Settings;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@@ -128,6 +129,19 @@ namespace PARR.DAL.Models.Job
|
||||
/// </summary>
|
||||
public Guid? GroupingUnitFieldId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Расписание регламентной работы - Тип исключения
|
||||
/// </summary>
|
||||
public Guid ScheduleExcludeTypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Расписание регламентной работы, исключение - Календарь
|
||||
/// </summary>
|
||||
public Guid? ScheduleExcludeTypeCalendarId { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Поле по которому группируется (!!!отключено каскадное удаление!!!)
|
||||
/// </summary>
|
||||
@@ -140,5 +154,11 @@ namespace PARR.DAL.Models.Job
|
||||
public ICollection<Job> Jobs { get; set; } = new HashSet<Job>();
|
||||
|
||||
public ICollection<EsppSchValue> EsppSchValues { get; set; } = new HashSet<EsppSchValue>();
|
||||
|
||||
[ForeignKey(nameof(ScheduleExcludeTypeId))]
|
||||
public ScheduleExcludeType? ScheduleExcludeType { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ScheduleExcludeTypeCalendarId))]
|
||||
public ScheduleExcludeTypeCalendar? ScheduleExcludeTypeCalendar { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
38
PARR.DAL/Models/Schedule/ScheduleExcludeType.cs
Normal file
38
PARR.DAL/Models/Schedule/ScheduleExcludeType.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Schedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Расписание регламентной работы - Тип исключения
|
||||
/// </summary>
|
||||
[Table("ExcludeTypes", Schema = DataContextSettings.Schedule)]
|
||||
[Comment("Расписание регламентной работы - Тип исключения")]
|
||||
public class ScheduleExcludeType : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Название в ПАРР
|
||||
/// </summary>
|
||||
public required string Title { get; set; }
|
||||
|
||||
public required string EsppName { get; set; }
|
||||
|
||||
public required string EsppValue { get; set; }
|
||||
|
||||
public required string Code { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
36
PARR.DAL/Models/Schedule/ScheduleExcludeTypeCalendar.cs
Normal file
36
PARR.DAL/Models/Schedule/ScheduleExcludeTypeCalendar.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Schedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Расписание регламентной работы, исключение - Календарь
|
||||
/// </summary>
|
||||
[Table("ExcludeTypeCalendars", Schema = DataContextSettings.Schedule)]
|
||||
[Comment("Расписание регламентной работы, исключение - Календарь")]
|
||||
public class ScheduleExcludeTypeCalendar : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Название в ПАРР
|
||||
/// </summary>
|
||||
public required string Title { get; set; }
|
||||
|
||||
public required string EsppName { get; set; }
|
||||
|
||||
public required string EsppValue { get; set; }
|
||||
|
||||
public required string Code { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user