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