feat(api, Core, Domain, Dal): Для entity моделей, для DateModified создан атрибут ManualControl - отключает автоматическое управление датой. TaskReconciliationService - сервис по управлению задачами в статусах ошибки, зависла. ITaskMqSettingsProvider - провайдер для управления настройками MQ в зависимости от TaskType
This commit is contained in:
11
PARR.Domain/Entities/Attributes/ManualControlAttribute.cs
Normal file
11
PARR.Domain/Entities/Attributes/ManualControlAttribute.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace PARR.Domain.Entities.Attributes
|
||||
{
|
||||
/// <summary>
|
||||
/// Отключает автоматическое управление DateModified.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public class ManualControlAttribute : Attribute
|
||||
{
|
||||
// позже, можно применять к другим свойствам, если придумаем зачем и реализуем логику
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,11 @@
|
||||
{
|
||||
public interface IBaseEntityDateModified
|
||||
{
|
||||
/// <summary>
|
||||
/// Дата обновления объекта в БД.
|
||||
/// Обновляется автоматически при комите.
|
||||
/// Чтобы отключить автоматическое управление, применить атрибут [ManualControl]
|
||||
/// </summary>
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Attributes;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
@@ -17,6 +18,7 @@ namespace PARR.Domain.Entities.TaskEntities
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
[ManualControl]
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public TaskTypeEnum TypeCode { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user