namespace SwDAL.DTO.DmlScript;
// ── DML execution request ──────────────────────────────────────────────────
public class DmlExecutionRequestDTO
{
/// Target client database ID to execute against.
public int ClientDatabaseId { get; set; }
/// Target schema — defaults to "dbo" if empty.
public string SchemaName { get; set; } = "dbo";
/// Target table name — bracket-quoted before embedding in SQL.
public string TableName { get; set; } = string.Empty;
/// Operation: Insert, Update, Delete.
public DmlOperation Operation { get; set; }
/// Column→value pairs for the row being inserted or updated.
public Dictionary RowValues { get; set; } = new();
/// Column→value pairs used in WHERE clause (required for Update/Delete).
public Dictionary WhereValues { get; set; } = new();
}
public enum DmlOperation : byte { Insert = 0, Update = 1, Delete = 2 }
// ── DML execution result ───────────────────────────────────────────────────
public class DmlExecutionResultDTO
{
public int RowsAffected { get; set; }
public string Message { get; set; } = string.Empty;
public bool Success { get; set; }
}