namespace F9WebAiTest.Application.Dtos.SYS.Reports;
public record ReportListDto(
long Id,
string Code,
string Name,
string Category,
string Description,
int SortOrder,
bool IsActive,
long ReportFileId,
bool HasTemplate,
DateTime CreatedAt,
DateTime? UpdatedAt);
public record ReportDetailDto(
long Id,
string Code,
string Name,
string Category,
string Description,
string DataSql,
string DataParams,
string Config,
int SortOrder,
bool IsActive,
long ReportFileId,
bool HasTemplate,
DateTime CreatedAt,
DateTime? UpdatedAt);
public record ReportViewDto(
long Id,
string Code,
string Name,
string Category,
string Description,
int SortOrder,
bool HasTemplate);
public class ReportCreateDto
{
public string Code { get; set; } = "";
public string Name { get; set; } = "";
public string? Category { get; set; }
public string? Description { get; set; }
public string? DataSql { get; set; }
public string? DataParams { get; set; }
public string? Config { get; set; }
public int SortOrder { get; set; }
///
/// 报表模板(.grf 的 JSON 文本)。与报表配置一起保存,无需再单独上传模板文件。
/// 为空表示本次不改动模板。
///
public string? TemplateJson { get; set; }
}
public class ReportUpdateDto
{
public string Code { get; set; } = "";
public string Name { get; set; } = "";
public string? Category { get; set; }
public string? Description { get; set; }
public string? DataSql { get; set; }
public string? DataParams { get; set; }
public string? Config { get; set; }
public int SortOrder { get; set; }
///
/// 报表模板(.grf 的 JSON 文本)。与报表配置一起保存,无需再单独上传模板文件。
/// 为空表示本次不改动模板(保留原模板)。
///
public string? TemplateJson { get; set; }
}
/// 在线编辑模板源码后直接保存的内容(免下载 / 上传 .grf)
public class ReportTemplateContentDto
{
/// 模板全文:GR6 时代的 UTF-8 JSON 文本,或 GR7 设计器的 "_WR" 压缩文本
public string? Content { get; set; }
}