Files
parr_api/PARR.DAL/Models/V1/V1_Job.cs
2023-08-23 15:47:20 +10:00

51 lines
1.7 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 PARR.DAL.Models.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models.V1
{
[Table("V1_Jobs")]
public class V1_Job : IBase
{
[Key]
public Guid Id { get; set; }
public DateTimeOffset DateCreated { get; set; }
public DateTimeOffset? DateModified { get; set; }
public required string Name { get; set; }
public required string ScriptName { get; set; }
public Guid JobModeId { get; set; }
[ForeignKey(nameof(JobModeId))]
public V1_JobMode? JobMode { get; set; }
public Guid? JobCategoryId { get; set; }
[ForeignKey(nameof(JobCategoryId))]
public V1_JobCategory? JobCategorye { get; set; }
public Guid? JobTypeId { get; set; }
[ForeignKey(nameof(JobTypeId))]
public V1_JobType? JobType { get; set; }
public Guid ApplicationId { get; set; }
[ForeignKey(nameof(ApplicationId))]
public Application? Application { get; set; }
/// <summary>
/// Частота запуска Job в минутах
/// </summary>
public int Frequency { get; set; }
/// <summary>
/// В режиме manual значит время регистрации регламентной работы АСУ ЕСПП, в auto - время старта Job.
/// </summary>
public DateTimeOffset StartAt { get; set; }
/// <summary>
/// Активация Job
/// </summary>
public bool IsEnabled { get; set; }
public ICollection<V1_JobJournal> Journals { get; set; } = new HashSet<V1_JobJournal>();
}
}