using System;
namespace DMSDAL.DTO.Migration
{
/// Entity table + PK info from MENTITY → DBOBJECT → DBOBJECTFIELDS.
public class EntityTableInfoDTO
{
public int EntityId { get; set; }
public string EntityCode { get; set; } = string.Empty;
public string EntityName { get; set; } = string.Empty;
public string SourceTable { get; set; } = string.Empty;
public string PKColumn { get; set; } = string.Empty;
}
/// A file discovered in Alfresco for a given ObjectTypeId+ObjectId.
public class AlfrescoAttachmentInfoDTO
{
public string NodeId { get; set; } = string.Empty;
public string DisplayFileName { get; set; } = string.Empty;
public string MimeType { get; set; } = "application/octet-stream";
public long FileSize { get; set; }
public DateTime CreatedOn { get; set; } = DateTime.UtcNow;
}
/// Row in TATTACHMENT_MIGRATION_LOG.
public class MigrationLogDTO
{
public long MigrationLogId { get; set; }
public int ObjectTypeId { get; set; }
public int ObjectId { get; set; }
public string? AlfrescoNodeId { get; set; }
public string? DisplayFileName { get; set; }
public int? AttachmentId { get; set; }
public byte Status { get; set; } // 0=Pending 1=InProgress 2=Done 3=Failed 4=Skipped
public string? ErrorMessage { get; set; }
public int ClientId { get; set; }
}
/// Aggregated counts per ObjectTypeId returned to the caller.
public class MigrationStatusDTO
{
public int ObjectTypeId { get; set; }
public int Total { get; set; }
public int Done { get; set; }
public int Failed { get; set; }
public int Pending { get; set; }
public int InProgress { get; set; }
public int Skipped { get; set; }
}
/// Alfresco connection settings loaded from MCOMMONCONFIG.
public record AlfrescoSettings(string BaseUrl, string UserId, string Password);
}