Files
parr_api/PARR.DAL/Models/ApplicationsInWork.cs
2023-10-17 16:59:53 +10:00

97 lines
3.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Microsoft.EntityFrameworkCore;
using PARR.DAL.Models.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models
{
[Table("ApplicationsInWorks")]
[Index(nameof(WorkId), nameof(ApplicationId), IsUnique = true)]
public class ApplicationsInWork : IBase
{
[Key]
public Guid Id { get; set; }
public DateTimeOffset DateCreated { get; set; }
public DateTimeOffset? DateModified { get; set; }
public Guid WorkId { get; set; }
public Guid ApplicationId { get; set; }
public required string TemplateDuration { get; set; }
public required string ShortDescription { get; set; }
public required string FullDescription { get; set; }
public required string Solution { get; set; }
///// <summary>
///// Выполняется автоматически агентом на сервере, скриптами
///// </summary>
//public bool? IsAutomatic { get; set; }
///// <summary>
///// Скрипт для автоматического выполнения
///// </summary>
//public string AgentScript { get; set; } = string.Empty;
///// <summary>
///// Какое-то имя которое мы передаем агенту, пока непонятно что это такое.
///// </summary>
//public string AgentName { get; set; } = string.Empty;
///// <summary>
///// Расписание: Время создания наряда и выполнения скрипта (чч:мм:сс)
///// </summary>
//public TimeSpan ScheduleGenerationTime { get; set; }
///// <summary>
///// Расписание: Первое срабатывание
///// </summary>
//public DateOnly ScheduleStartDate { get; set; }
/// <summary>
/// Время последнего запуска скрипта/генерации наряда
/// </summary>
public DateTimeOffset? LastRun { get; set; }
/// <summary>
/// Время следующего запуска скрипта/генерации наряда
/// </summary>
public DateTimeOffset NextRun { get; set; }
/// <summary>
/// Выполняет агент
/// </summary>
public bool IsAgent { get; set; }
/// <summary>
/// Какое-то имя которое мы передаем агенту, пока непонятно что это такое.
/// </summary>
public string? AgentName { get; set; }
/// <summary>
/// Сколько времени ожидать выполнение скрипта агентом (секунд)
/// </summary>
public int? AgentTimeOutSec { get; set; }
/// <summary>
/// Скрипт для автоматического выполнения
/// </summary>
public string? AgentScript { get; set; }
[ForeignKey(nameof(WorkId))]
public Work? Work { get; set; }
[ForeignKey(nameof(ApplicationId))]
public Application? Application { get; set; }
public ICollection<Template> Templates { get; set; } = new HashSet<Template>();
public ICollection<EsppSchValue> EsppSchValues { get; set; } = new HashSet<EsppSchValue>();
}
}