sozsoft-platform/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/SqlObjectExplorerDto.cs
2026-03-02 21:31:49 +03:00

25 lines
906 B
C#

using System.Collections.Generic;
namespace Sozsoft.SqlQueryManager.Application.Contracts;
/// <summary>
/// A native SQL Server object (view, stored procedure, or function) discovered from system catalogs.
/// </summary>
public class SqlNativeObjectDto
{
public string SchemaName { get; set; } = "dbo";
public string ObjectName { get; set; } = "";
public string FullName => $"[{SchemaName}].[{ObjectName}]";
}
/// <summary>
/// Object Explorer DTO - reflects the live SQL Server catalog structure.
/// </summary>
public class SqlObjectExplorerDto
{
public List<DatabaseTableDto> Tables { get; set; } = new();
public List<SqlNativeObjectDto> Views { get; set; } = new();
public List<SqlNativeObjectDto> StoredProcedures { get; set; } = new();
public List<SqlNativeObjectDto> Functions { get; set; } = new();
public List<SqlTemplateDto> Templates { get; set; } = new();
}