Feature: Job Queues
Also UI style, theme and element changes
This commit is contained in:
@@ -70,6 +70,8 @@ namespace Disco.Models.Repository
|
||||
public virtual IList<JobComponent> JobComponents { get; set; }
|
||||
public virtual IList<JobLog> JobLogs { get; set; }
|
||||
|
||||
public virtual IList<JobQueueJob> JobQueues { get; set; }
|
||||
|
||||
public virtual JobMetaInsurance JobMetaInsurance { get; set; }
|
||||
public virtual JobMetaWarranty JobMetaWarranty { get; set; }
|
||||
public virtual JobMetaNonWarranty JobMetaNonWarranty { get; set; }
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace Disco.Models.Repository
|
||||
|
||||
public virtual IList<DocumentTemplate> AttachmentTypes { get; set; }
|
||||
public virtual IList<DeviceComponent> DeviceComponents { get; set; }
|
||||
public virtual IList<JobQueue> JobQueues { get; set; }
|
||||
|
||||
[ForeignKey("JobTypeId")]
|
||||
public virtual JobType JobType { get; set; }
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Models.Repository
|
||||
{
|
||||
public class JobQueue
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
[Required, StringLength(100)]
|
||||
public string Name { get; set; }
|
||||
[Required, StringLength(500), DataType(DataType.MultilineText)]
|
||||
public string Description { get; set; }
|
||||
[Required, StringLength(25)]
|
||||
public string Icon { get; set; }
|
||||
[Required, StringLength(10)]
|
||||
public string IconColour { get; set; }
|
||||
|
||||
public int? DefaultSLAExpiry { get; set; }
|
||||
[Required]
|
||||
public JobQueuePriority Priority { get; set; }
|
||||
|
||||
public string SubjectIds { get; set; }
|
||||
|
||||
public virtual IList<JobSubType> JobSubTypes { get; set; }
|
||||
|
||||
public virtual IList<JobQueueJob> QueueJobs { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return this.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Models.Repository
|
||||
{
|
||||
public class JobQueueJob
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public int JobQueueId { get; set; }
|
||||
[Required]
|
||||
public int JobId { get; set; }
|
||||
|
||||
[Required]
|
||||
public DateTime AddedDate { get; set; }
|
||||
[Required]
|
||||
public string AddedUserId { get; set; }
|
||||
public string AddedComment { get; set; }
|
||||
|
||||
public DateTime? RemovedDate { get; set; }
|
||||
public string RemovedUserId { get; set; }
|
||||
public string RemovedComment { get; set; }
|
||||
|
||||
public DateTime? SLAExpiresDate { get; set; }
|
||||
public JobQueuePriority Priority { get; set; }
|
||||
|
||||
[ForeignKey("JobQueueId")]
|
||||
public virtual JobQueue JobQueue { get; set; }
|
||||
[ForeignKey("JobId")]
|
||||
public virtual Job Job { get; set; }
|
||||
[ForeignKey("AddedUserId")]
|
||||
public virtual User AddedUser { get; set; }
|
||||
[ForeignKey("RemovedUserId")]
|
||||
public virtual User RemovedUser { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Models.Repository
|
||||
{
|
||||
public enum JobQueuePriority : byte
|
||||
{
|
||||
High = 2,
|
||||
Normal = 1,
|
||||
Low = 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user