using System; using System.Collections.Generic; namespace Sozsoft.Mcp.Dtos; /// /// Istegin kiracisina dusen MCP sunucu kaydinin etkin hali. /mcp ucu hangi araclari /// listeleyecegine ve sorgularin hangi satir tavaniyla kosacagina bu kayda bakarak karar verir. /// public class McpServerConfigDto { public string Name { get; set; } = string.Empty; /// Ekranda gosterilen baglanti adresi; sunucu tarafinda yonlendirme icin kullanilmaz. public string? Url { get; set; } /// Bos ise istegin kapsamindaki varsayilan veri kaynagi kullanilir. public string? DataSourceCode { get; set; } /// Bos liste "yazma disindaki tum araclar acik" anlamina gelir. public List AllowedTools { get; set; } = []; public int MaxRows { get; set; } public bool AllowWrite { get; set; } public string? Description { get; set; } /// Istegin cozumlenen kiraci adi; host baglaminda bostur. public string? TenantName { get; set; } } /// /// Veri sozlugunun tazelik bilgisi. Sozluk Sas_H_DbTableColumn tablosunda, sozluk /// ureten prosedur tarafindan yazilmis JSON olarak durur. /// public class McpSchemaInfoDto { public bool Available { get; set; } public string? CacheKey { get; set; } public DateTime? RefreshedAt { get; set; } public int FormCount { get; set; } public int FieldCount { get; set; } public string? TenantName { get; set; } public string? DefinitionCultureName { get; set; } public string? UiCultureName { get; set; } /// Sozluk bulunamadiginda ne yapilacagini anlatan mesaj. public string? Message { get; set; } } /// Bir listenin (ListForm) ozet tanimi. public class McpListSummaryDto { public string ListFormCode { get; set; } = string.Empty; public string? DisplayName { get; set; } public string? Title { get; set; } public string? Description { get; set; } /// Listenin arkasindaki tablo adi; SELECT tabanli listelerde bostur. public string? TableName { get; set; } /// Tablo adi ya da SELECT metni — listenin gercek SQL kaynagi. public string? SqlSourceName { get; set; } /// table, selectSql ya da unknown. public string? SourceKind { get; set; } public string? KeyFieldName { get; set; } public int FieldCount { get; set; } } /// Bir listenin sutun tanimi. public class McpColumnDto { public string Field { get; set; } = string.Empty; public string? DisplayName { get; set; } public string? SqlDataType { get; set; } public bool IsVisible { get; set; } public bool IsBooleanColumn { get; set; } /// Lookup tasiyan sutunda hedef tablo; yoksa bostur. public string? LookupTableName { get; set; } public string? LookupValueColumn { get; set; } public string? LookupDisplayColumn { get; set; } /// Parola/token/anahtar gibi sutunlarda true; sorgu araclari bunlari onermez. public bool IsSensitive { get; set; } /// Varsayilan SELECT listesine girmesi uygun olan sutunlarda true. public bool IsDefaultSelectColumn { get; set; } } /// Bir listenin sutunlariyla birlikte tam tanimi. public class McpListDetailDto : McpListSummaryDto { public List Columns { get; set; } = []; } /// Serbest metin aramasinin tek sonucu. public class McpSchemaMatchDto { public string ListFormCode { get; set; } = string.Empty; public string? DisplayName { get; set; } public string? TableName { get; set; } /// Eslesme yalnizca liste duzeyindeyse bos; sutun duzeyindeyse eslesen sutunlar. public List MatchedColumns { get; set; } = []; }