mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 08:23:12 +00:00
- Add CommentType field to Comments (customer, vendor, internal) - Add Status field to EditWorkorder_DTO - Create WorkOrderAuditLog model tracking field-level changes - Log all field changes on work order edit and status change - Include commentType and auditLog in GetWorkorderById response - Set CommentType=customer on synced comments from DynamoDB - Add BackfillCommentTypes endpoint for existing data
20 lines
690 B
C#
20 lines
690 B
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Data.SeaHavenIndustries
|
|
{
|
|
public class WorkOrderAuditLog
|
|
{
|
|
public int Id { get; set; }
|
|
public int WorkOrderId { get; set; }
|
|
[ForeignKey(nameof(WorkOrderId))]
|
|
public virtual WorkOrder? WorkOrder { get; set; }
|
|
public string? UserId { get; set; }
|
|
[ForeignKey(nameof(UserId))]
|
|
public virtual ApplicationUser? User { get; set; }
|
|
public string? FieldName { get; set; }
|
|
public string? OldValue { get; set; }
|
|
public string? NewValue { get; set; }
|
|
public string? Action { get; set; }
|
|
public DateTime CreatedAt { get; set; }
|
|
}
|
|
}
|