134 lines
4 KiB
C#
134 lines
4 KiB
C#
|
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using System.Text.Json;
|
||
|
|
|
||
|
|
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>
|
||
|
|
/// 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>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; }
|
||
|
|
}
|