2026-10-01 12:01:57 +00:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace Sozsoft.Mcp.Dtos;
|
|
|
|
|
|
2026-10-19 14:35:08 +00:00
|
|
|
/// <summary>Rapor kategorisi (<c>Adm.Reports.Categories</c>).</summary>
|
2026-10-01 12:01:57 +00:00
|
|
|
public class McpReportCategoryDto
|
|
|
|
|
{
|
|
|
|
|
public Guid Id { get; set; }
|
|
|
|
|
|
|
|
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public string? Description { get; set; }
|
|
|
|
|
|
|
|
|
|
public string? Icon { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>Rapor sablonunun listede donen ozeti; HTML icerigi tasimaz.</summary>
|
|
|
|
|
public class McpReportTemplateSummaryDto
|
|
|
|
|
{
|
|
|
|
|
public Guid Id { get; set; }
|
|
|
|
|
|
|
|
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public string? Description { get; set; }
|
|
|
|
|
|
|
|
|
|
public string Category { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public string? Status { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>Kategoriler ve sablonlar birlikte; sablon kaydederken kategori adi buradan secilir.</summary>
|
|
|
|
|
public class McpReportCatalogDto
|
|
|
|
|
{
|
|
|
|
|
public List<McpReportCategoryDto> Categories { get; set; } = [];
|
|
|
|
|
|
|
|
|
|
public List<McpReportTemplateSummaryDto> Templates { get; set; } = [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Rapor sablonunun tamami. <see cref="Placeholders"/> HTML icindeki <c>{{AlanAdi}}</c> yer
|
|
|
|
|
/// tutuculardir; sablon bir ekran kaydiyla acildiginda kaydin alanlariyla doldurulur.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class McpReportTemplateDto : McpReportTemplateSummaryDto
|
|
|
|
|
{
|
|
|
|
|
public Guid CategoryId { get; set; }
|
|
|
|
|
|
|
|
|
|
public string HtmlContent { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public List<string> Placeholders { get; set; } = [];
|
|
|
|
|
|
|
|
|
|
/// <summary>Sablonun kayitsiz goruntuleme adresi.</summary>
|
|
|
|
|
public string ViewUrl { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Kaydetme istegi bir ekran verdiyse o ekranin satir butonu (<c>CommandColumnJson</c>
|
|
|
|
|
/// elemani); ekranin mevcut butonlarina eklenir.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public McpReportRowButtonDto? RowButton { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>Sablonu bir ekran kaydiyla acan satir butonu; <c>CommandColumnDto</c> ile ayni alanlar.</summary>
|
|
|
|
|
public class McpReportRowButtonDto
|
|
|
|
|
{
|
|
|
|
|
public string Text { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public string Hint { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public string Url { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public string UrlTarget { get; set; } = "_blank";
|
|
|
|
|
|
|
|
|
|
public string AuthName { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public bool IsVisible { get; set; } = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class McpReportCategorySaveRequestDto
|
|
|
|
|
{
|
|
|
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public string? Description { get; set; }
|
|
|
|
|
|
|
|
|
|
public string? Icon { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class McpReportTemplateSaveRequestDto
|
|
|
|
|
{
|
|
|
|
|
/// <summary>Sablonun adi; kiraci icinde tekildir ve kimligidir.</summary>
|
|
|
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
/// <summary>Kategori adi ya da Id'si. Yeni sablonda zorunlu.</summary>
|
|
|
|
|
public string? Category { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>Basilacak HTML. Yeni sablonda zorunlu; guncellemede bos ise mevcut icerik korunur.</summary>
|
|
|
|
|
public string? HtmlContent { get; set; }
|
|
|
|
|
|
|
|
|
|
public string? Description { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary><c>active</c> ya da <c>passive</c>; yeni sablonda varsayilan <c>active</c>.</summary>
|
|
|
|
|
public string? Status { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sablonun basilacagi ekran. Verilirse yer tutucular ekranin alanlarina gore dogrulanir ve
|
|
|
|
|
/// cevapta o ekranin satir butonu doner.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string? ListFormCode { get; set; }
|
|
|
|
|
|
2026-10-19 14:35:08 +00:00
|
|
|
/// <summary>Satir butonunun dil anahtari; verilmezse <c>Sas.Platform.View</c>.</summary>
|
2026-10-01 12:01:57 +00:00
|
|
|
public string? ButtonText { get; set; }
|
|
|
|
|
}
|