2023-05-19 15:15:52 +10:00
|
|
|
|
using PARR.DAL.Models.Base;
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
|
|
|
|
|
namespace PARR.DAL.Models
|
|
|
|
|
|
{
|
|
|
|
|
|
[Table("Jobs")]
|
|
|
|
|
|
public class Job : IBase
|
|
|
|
|
|
{
|
|
|
|
|
|
[Key]
|
|
|
|
|
|
public Guid Id { get; set; }
|
|
|
|
|
|
public DateTimeOffset DateCreated { get; set; }
|
|
|
|
|
|
public DateTimeOffset? DateModified { get; set; }
|
|
|
|
|
|
public required string Name { get; set; }
|
2023-06-16 15:00:11 +10:00
|
|
|
|
public required string ScriptName { get; set; }
|
2023-05-19 15:15:52 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Guid JobModeId { get; set; }
|
|
|
|
|
|
[ForeignKey(nameof(JobModeId))]
|
|
|
|
|
|
public JobMode? JobMode { get; set; }
|
|
|
|
|
|
|
2023-06-16 15:00:11 +10:00
|
|
|
|
public Guid? JobCategoryId { get; set; }
|
2023-05-19 15:15:52 +10:00
|
|
|
|
[ForeignKey(nameof(JobCategoryId))]
|
|
|
|
|
|
public JobCategory? JobCategorye { get; set; }
|
2023-06-13 13:57:55 +10:00
|
|
|
|
|
2023-05-19 15:15:52 +10:00
|
|
|
|
public Guid JobTypeId { get; set; }
|
|
|
|
|
|
[ForeignKey(nameof(JobTypeId))]
|
|
|
|
|
|
public JobType? JobType { get; set; }
|
|
|
|
|
|
|
2023-06-16 15:00:11 +10:00
|
|
|
|
public Guid ApplicationId { get; set; }
|
|
|
|
|
|
[ForeignKey(nameof(ApplicationId))]
|
|
|
|
|
|
public Application? Application { get; set; }
|
2023-05-19 15:15:52 +10:00
|
|
|
|
|
|
|
|
|
|
public ICollection<JobJournal> Journals { get; set; } = new HashSet<JobJournal>();
|
2023-06-16 15:00:11 +10:00
|
|
|
|
|
2023-05-19 15:15:52 +10:00
|
|
|
|
}
|
|
|
|
|
|
}
|