feat: add ServiceTicket and TicketNote models
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Plugins.ServiceTracker.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Extended ticket metadata stored alongside Disco Job records.
|
||||
/// Links to a Disco Job by JobId.
|
||||
/// </summary>
|
||||
public class ServiceTicket
|
||||
{
|
||||
public int JobId { 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<TicketNote> Notes { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public DateTime LastModifiedDate { get; set; }
|
||||
public string LastModifiedBy { get; set; }
|
||||
|
||||
public ServiceTicket()
|
||||
{
|
||||
Notes = new List<TicketNote>();
|
||||
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; } // "update", "escalation", "resolution", "general"
|
||||
|
||||
public TicketNote()
|
||||
{
|
||||
Id = Guid.NewGuid().ToString("N").Substring(0, 8);
|
||||
Timestamp = DateTime.Now;
|
||||
NoteType = "general";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user