48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
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; }
|
|
}
|
|
|
|
/// <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();
|
|
}
|