mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-10-02 12:03:21 +00:00
- Add ExternalWorkOrderId, Customer, SiteCode, Building, Severity, DateReported, ScheduledStart, SourceEmailS3Key to WorkOrder model - Add Commenter, RecordType, ExternalCommentId to Comments model - Add AWSSDK.DynamoDBv2 package - Create SyncController with endpoints: - POST /api/Sync/WorkOrders — scans DynamoDB WorkOrders table, upserts into SQL - POST /api/Sync/Comments — scans DynamoDB WorkOrderComments, creates Comments - POST /api/Sync/All — runs both - Auto-creates Locations from site_code/building/address during sync - Maps DynamoDB status values to SHOC status strings - Maps severity to SHOC priority format (Sev N) - Deduplicates on ExternalWorkOrderId / ExternalCommentId
21 lines
774 B
C#
21 lines
774 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? 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; }
|
|
}
|
|
}
|