feat(master): обновлена логика статусов нарядов, присвояения значений журнала агента.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Models.Base;
|
||||
using PARR.DAL.Settings;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@@ -22,8 +21,32 @@ namespace PARR.DAL.Models
|
||||
|
||||
public Guid ApplicationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TemplateDuration в формате ЕСПП
|
||||
/// </summary>
|
||||
public required string TemplateDuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TemplateDuration в формате TimeSpan
|
||||
/// </summary>
|
||||
public TimeSpan? TemplateDurationTimeSpan
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
//ЕСПП кривоногие, они почему-то таймспан пишут так "7 00:00:00", а правильно так: "7:00:00:00"
|
||||
var durationWithTimeSpanFormat = TemplateDuration.Replace(" ", ":");
|
||||
|
||||
return TimeSpan.Parse(durationWithTimeSpanFormat);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public required string ShortDescription { get; set; }
|
||||
|
||||
//public required string FullDescription { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user