feat: add ExternalTicket, TechEntry models
This commit is contained in:
+38
-3
@@ -6,6 +6,7 @@ namespace Disco.Plugins.ServiceTracker.Models
|
|||||||
public class ServiceTicket
|
public class ServiceTicket
|
||||||
{
|
{
|
||||||
public int JobId { get; set; }
|
public int JobId { get; set; }
|
||||||
|
public string Source { get; set; }
|
||||||
public string PriorityId { get; set; }
|
public string PriorityId { get; set; }
|
||||||
public string LocationId { get; set; }
|
public string LocationId { get; set; }
|
||||||
public string AssignedTechId { get; set; }
|
public string AssignedTechId { get; set; }
|
||||||
@@ -23,6 +24,7 @@ namespace Disco.Plugins.ServiceTracker.Models
|
|||||||
{
|
{
|
||||||
Notes = new List<TicketNote>();
|
Notes = new List<TicketNote>();
|
||||||
ChangeLog = new List<ChangeEntry>();
|
ChangeLog = new List<ChangeEntry>();
|
||||||
|
Source = "disco";
|
||||||
CreatedDate = DateTime.Now;
|
CreatedDate = DateTime.Now;
|
||||||
LastModifiedDate = DateTime.Now;
|
LastModifiedDate = DateTime.Now;
|
||||||
}
|
}
|
||||||
@@ -36,7 +38,6 @@ namespace Disco.Plugins.ServiceTracker.Models
|
|||||||
public DateTime Timestamp { get; set; }
|
public DateTime Timestamp { get; set; }
|
||||||
public string Content { get; set; }
|
public string Content { get; set; }
|
||||||
public string NoteType { get; set; }
|
public string NoteType { get; set; }
|
||||||
|
|
||||||
public TicketNote()
|
public TicketNote()
|
||||||
{
|
{
|
||||||
Id = Guid.NewGuid().ToString("N").Substring(0, 8);
|
Id = Guid.NewGuid().ToString("N").Substring(0, 8);
|
||||||
@@ -52,10 +53,44 @@ namespace Disco.Plugins.ServiceTracker.Models
|
|||||||
public string Field { get; set; }
|
public string Field { get; set; }
|
||||||
public string OldValue { get; set; }
|
public string OldValue { get; set; }
|
||||||
public string NewValue { get; set; }
|
public string NewValue { get; set; }
|
||||||
|
public ChangeEntry() { Timestamp = DateTime.Now; }
|
||||||
|
}
|
||||||
|
|
||||||
public ChangeEntry()
|
public class ExternalTicket
|
||||||
{
|
{
|
||||||
Timestamp = DateTime.Now;
|
public string ExternalId { get; set; }
|
||||||
|
public int InternalId { get; set; }
|
||||||
|
public string Source { get; set; }
|
||||||
|
public DateTime Timestamp { get; set; }
|
||||||
|
public string RequesterEmail { get; set; }
|
||||||
|
public string RequesterName { get; set; }
|
||||||
|
public string DeviceName { get; set; }
|
||||||
|
public string Location { get; set; }
|
||||||
|
public string IssueDescription { get; set; }
|
||||||
|
public string RawPriority { get; set; }
|
||||||
|
public string RawStatus { get; set; }
|
||||||
|
public string AssignedTo { get; set; }
|
||||||
|
public bool IsOpen { get; set; }
|
||||||
|
public DateTime ImportedDate { get; set; }
|
||||||
|
|
||||||
|
public ExternalTicket()
|
||||||
|
{
|
||||||
|
Source = "ntt";
|
||||||
|
IsOpen = true;
|
||||||
|
ImportedDate = DateTime.Now;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TechEntry
|
||||||
|
{
|
||||||
|
public string Id { get; set; }
|
||||||
|
public string DisplayName { get; set; }
|
||||||
|
public List<string> DiscoUserIds { get; set; }
|
||||||
|
public string Email { get; set; }
|
||||||
|
|
||||||
|
public TechEntry()
|
||||||
|
{
|
||||||
|
DiscoUserIds = new List<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user