shoc-backend/Data.SeaHavenIndustries/Models/Comments.cs
Adam Moussa e1f57d3fb2 Add comment types, audit logging, and WorkOrderAuditLog table
- 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
2026-04-16 18:09:57 -04:00

22 lines
823 B
C#

using System;
using System.ComponentModel.DataAnnotations.Schema;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace Data.SeaHavenIndustries
{
public class Comments : FullAuditEntity
{
public string? Commenttext { get; set; }
public string? Commenter { get; set; }
public string? RecordType { get; set; }
public string? CommentType { get; set; }
public string? ExternalCommentId { get; set; }
public string? Documents { get; set; }
public string? UserId { get; set; }
[ForeignKey(nameof(UserId))]
public virtual ApplicationUser? ApplicationUser { get; set; }
public int? WorkerOrderId { get; set; }
[ForeignKey(nameof(WorkerOrderId))]
public virtual WorkOrder? WorkOrder { get; set; }
}
}