using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Sozsoft.Mcp.Dtos;
/// Gelistirme rehberinin bir basligi.
public class McpDevGuideHeadingDto
{
/// lowcode (uretim protokolu, artefakt semalari) ya da reference (JSON kolon sozlesmeleri).
public string Document { get; set; } = string.Empty;
/// Bolum numarasi (4.3); get_dev_guide'a bu deger verilir.
public string Id { get; set; } = string.Empty;
public string Title { get; set; } = string.Empty;
public int Level { get; set; }
}
///
/// Rehber cevabi. Bolum istenmediyse yalnizca doludur; istendiyse
/// bolumun metnini, alt basliklarini tasir.
///
public class McpDevGuideDto
{
public McpDevGuideHeadingDto? Heading { get; set; }
public string? Content { get; set; }
public List Sections { get; set; } = [];
}
/// Bir wizard seed dosyasi; dosyanin diskteki bicimidir.
public class McpWizardFileDto
{
public string FileName { get; set; } = string.Empty;
public JsonElement Seed { get; set; }
}
/// Wizard'i ilk kez ya da yeniden deploy etme istegi.
public class McpWizardDeployRequestDto
{
///
/// Seed dosyasi bicimindeki JSON ({"Wizard": {...}}) ya da duz wizard cevaplari.
///
public string Wizard { get; set; } = string.Empty;
/// Doluysa guncellemedir: bu dosya ve urettigi kayitlar silinip yeniden uretilir.
public string? ReplaceFileName { get; set; }
}
///
/// Yeni tablo istegi. Id, TenantId ve audit kolonlari sablondan gelir; burada
/// yalnizca is kolonlari yazilir.
///
public class McpCreateTableRequestDto
{
public string TableName { get; set; } = string.Empty;
public List Columns { get; set; } = [];
public bool FullAudited { get; set; } = true;
public bool MultiTenant { get; set; } = true;
}
public class McpTableColumnDto
{
public string Name { get; set; } = string.Empty;
/// Tablo tasarimcisinin tip listesinden biri (nvarchar, int, decimal, bit ...).
public string Type { get; set; } = string.Empty;
/// Yalnizca nvarchar icin.
public int? MaxLength { get; set; }
public bool IsNullable { get; set; } = true;
/// Sayi, metin sabiti ('...') ya da NEWID()/GETDATE()/GETUTCDATE()/SYSUTCDATETIME().
public string? DefaultValue { get; set; }
}
public class McpCreateTableResultDto
{
public string TableName { get; set; } = string.Empty;
public string Script { get; set; } = string.Empty;
/// Script'in yazildigi seed dosyasi, seed kokune gore goreli.
public string SeedFilePath { get; set; } = string.Empty;
}
///
/// Deploy edilmis bir wizard'in salt-okur dogrulamasi. yalnizca
/// bir kontrol kaldiginda false olur; engellemeyen
/// kontroller (seed kapanisi gibi) ekrani kullanilamaz yapmaz ama migrate sonrasini etkiler.
///
public class McpVerifyResultDto
{
public string FileName { get; set; } = string.Empty;
public string? ListFormCode { get; set; }
public string? MenuUrl { get; set; }
public bool Passed { get; set; }
public List Checks { get; set; } = [];
}
public class McpVerifyCheckDto
{
/// Kontrolun kisa adi: wizard_file, menu, permission, select, component, seed_closure.
public string Name { get; set; } = string.Empty;
public bool Passed { get; set; }
public bool Blocking { get; set; } = true;
public string? Message { get; set; }
}
/// Ustlenilen gelistirme talebi; uretim icin gereken metni tasir.
public class McpDevRequestDto
{
public Guid Id { get; set; }
public string? Title { get; set; }
public string Status { get; set; } = string.Empty;
///
/// HTML. Gomulu gorseller (data:image/...;base64) metinden cikarilir; yerlerinde
/// durur, kendileri 'tadir.
///
public string? Description { get; set; }
/// Aciklamadaki gorseller, metinde gectikleri sirayla.
public List Images { get; set; } = [];
public string? Priority { get; set; }
public string? Tags { get; set; }
public DateTime? DueDate { get; set; }
public string UserName { get; set; } = string.Empty;
public Guid? TenantId { get; set; }
/// JSON dizisi metni: { id, title, assignee, dueDate, completed }.
public string? SubTasks { get; set; }
}
///
/// Talep aciklamasina gomulu bir gorsel. Veri metin cevabina yazilmaz; MCP araci onu ayri bir
/// gorsel icerigi olarak iletir, model de resmi dogrudan gorur.
///
public class McpDevRequestImageDto
{
/// Aciklamada gorselin yerine yazilan isaret, ornegin [image-1].
public string Placeholder { get; set; } = string.Empty;
public string MimeType { get; set; } = string.Empty;
/// Base64 veri.
[JsonIgnore]
public string Data { get; set; } = string.Empty;
}
/// Custom component ozeti; kod tasimaz.
public class McpComponentSummaryDto
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? RoutePath { get; set; }
public string? Description { get; set; }
public bool IsActive { get; set; }
/// Kodu tasarimci belgesinden uretilen bilesen; MCP uzerinden kodu yazilamaz.
public bool IsVisualDesigner { get; set; }
}
///
/// Custom component kaydetme istegi; ada gore varsa gunceller, yoksa ekler. Guncellemede null
/// birakilan alanlar mevcut degerini korur.
///
public class McpComponentSaveRequestDto
{
public string Name { get; set; } = string.Empty;
public string? Code { get; set; }
/// Bos dize rotayi kaldirir (rotasiz bilesen); null mevcut rotayi korur.
public string? RoutePath { get; set; }
public string? Description { get; set; }
public string? Props { get; set; }
/// Bagimli bilesen adlarinin JSON dizisi.
public string? Dependencies { get; set; }
public bool? IsActive { get; set; }
}