using System; using System.Collections.Generic; namespace Disco.Plugins.ServiceTracker.Models { public class ServiceTicket { public int JobId { get; set; } public string Source { get; set; } public string PriorityId { get; set; } public string LocationId { get; set; } public string AssignedTechId { get; set; } public DateTime? EstimatedCompletion { get; set; } public DateTime? SlaDeadline { get; set; } public string StatusOverride { get; set; } public string Summary { get; set; } public List Notes { get; set; } public List ChangeLog { get; set; } public DateTime CreatedDate { get; set; } public DateTime LastModifiedDate { get; set; } public string LastModifiedBy { get; set; } public ServiceTicket() { Notes = new List(); ChangeLog = new List(); Source = "disco"; CreatedDate = DateTime.Now; LastModifiedDate = DateTime.Now; } } public class TicketNote { public string Id { get; set; } public string AuthorId { get; set; } public string AuthorName { get; set; } public DateTime Timestamp { get; set; } public string Content { get; set; } public string NoteType { get; set; } public TicketNote() { Id = Guid.NewGuid().ToString("N").Substring(0, 8); Timestamp = DateTime.Now; NoteType = "general"; } } public class ChangeEntry { public DateTime Timestamp { get; set; } public string UserId { get; set; } public string Field { get; set; } public string OldValue { get; set; } public string NewValue { get; set; } public ChangeEntry() { Timestamp = DateTime.Now; } } public class ExternalTicket { 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 DiscoUserIds { get; set; } public string Email { get; set; } public TechEntry() { DiscoUserIds = new List(); } } }