using System;
namespace FrameworkDAL.DTO.EIPConversation
{
///
/// Admin CRUD DTO for MEIPFLOWDEFINITION.
/// Used by the EIPFlow management endpoints (GetFlowList, GetFlow, SaveFlow, DeleteFlow).
/// Distinct from EIPFlowDefinitionDTO (flow engine runtime) and EIPFlowDTO (engine DAL).
///
public class EIPFlowAdminDTO
{
public int FlowDefinitionId { get; set; }
public int TenantId { get; set; }
public string FlowCode { get; set; } = string.Empty;
public int FlowVersion { get; set; }
/// 0=Draft, 1=Review, 2=Published (active / loaded by engine), 3=Deprecated. Matches MEIPFLOWDEFINITION.FLOWSTATUS (TINYINT).
public byte FlowStatus { get; set; } = 0;
public string JsonDefinition { get; set; } = "[]";
public int Version { get; set; }
/// 1 = active row, 0 = soft-deleted.
public int Status { get; set; } = 1;
/// Number of steps — computed server-side from JsonDefinition length or JSON_ARRAY_LENGTH.
public int StepCount { get; set; }
public int? CreatedById { get; set; }
public string? CreatedByName { get; set; }
public DateTime CreatedOn { get; set; }
public int? ModifiedById { get; set; }
public string? ModifiedByName { get; set; }
public DateTime? ModifiedOn { get; set; }
}
}