2026-03-02 18:31:49 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace Sozsoft.SqlQueryManager.Application.Contracts;
|
|
|
|
|
|
|
|
|
|
public class ExecuteSqlQueryDto
|
|
|
|
|
{
|
|
|
|
|
public string QueryText { get; set; }
|
|
|
|
|
public string DataSourceCode { get; set; }
|
|
|
|
|
public Dictionary<string, object> Parameters { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class SqlQueryExecutionResultDto
|
|
|
|
|
{
|
|
|
|
|
public bool Success { get; set; }
|
|
|
|
|
public string Message { get; set; }
|
|
|
|
|
public IEnumerable<dynamic> Data { get; set; }
|
|
|
|
|
public int RowsAffected { get; set; }
|
|
|
|
|
public long ExecutionTimeMs { get; set; }
|
|
|
|
|
public Dictionary<string, object> Metadata { get; set; }
|
|
|
|
|
}
|
2026-05-03 19:50:51 +00:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Input for saving a T-SQL script file to DbMigrator Seeds/SqlData.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class SaveTableScriptDto
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// File name without extension (e.g. "Adm_T_Behavior"). Must not contain path separators.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string FileName { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The T-SQL script content (CREATE TABLE / ALTER TABLE etc.).
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string SqlScript { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Input for deleting seed files from DbMigrator Seeds/SqlData.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class DeleteSqlDataFilesDto
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// File names without extension (e.g. "Adm_T_Behavior").
|
|
|
|
|
/// Any invalid or unsafe values are ignored.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public List<string> FileNames { get; set; } = new();
|
|
|
|
|
}
|
2026-05-27 12:36:46 +00:00
|
|
|
|
|
|
|
|
public class MoveSqlDataFileDto
|
|
|
|
|
{
|
|
|
|
|
public string DataDirectoryName { get; set; } = string.Empty;
|
|
|
|
|
public string SourceRelativePath { get; set; } = string.Empty;
|
|
|
|
|
public string TargetRelativePath { get; set; } = string.Empty;
|
|
|
|
|
}
|