sozsoft-platform/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/SqlObjectExplorerDto.cs

26 lines
906 B
C#
Raw Normal View History

2026-02-24 20:44:16 +00:00
using System.Collections.Generic;
namespace Sozsoft.SqlQueryManager.Application.Contracts;
/// <summary>
/// A native SQL Server object (view, stored procedure, or function) discovered from system catalogs.
2026-02-24 20:44:16 +00:00
/// </summary>
public class SqlNativeObjectDto
2026-02-24 20:44:16 +00:00
{
public string SchemaName { get; set; } = "dbo";
public string ObjectName { get; set; } = "";
public string FullName => $"[{SchemaName}].[{ObjectName}]";
}
2026-02-24 20:44:16 +00:00
/// <summary>
/// Object Explorer DTO - reflects the live SQL Server catalog structure.
/// </summary>
public class SqlObjectExplorerDto
{
2026-02-24 20:44:16 +00:00
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();
2026-02-24 20:44:16 +00:00
public List<SqlTemplateDto> Templates { get; set; } = new();
}