package com.zt.plat.module.base.controller.admin.doctemplate.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 模板 Response VO")
@Data
public class DocTemplateRespVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    private Long id;

    @Schema(description = "模板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "采购合同模板")
    private String tmplName;

    @Schema(description = "模板编码（唯一）", requiredMode = Schema.RequiredMode.REQUIRED, example = "PO_CONTRACT_001")
    private String tmplCode;

    @Schema(description = "模板图标", example = "📄")
    private String icon;

    @Schema(description = "所属分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long categoryId;

    @Schema(description = "分类名称", example = "合同信息/采购合同")
    private String categoryName;

    @Schema(description = "版本号", example = "v1.2")
    private String version;

    @Schema(description = "模板描述", example = "标准采购合同范本")
    private String description;

    @Schema(description = "模板内容（HTML，含占位符）", requiredMode = Schema.RequiredMode.REQUIRED)
    private String content;

    @Schema(description = "SQL配置（JSON格式，可选）")
    private String sqlConfig;

    @Schema(description = "数据源标识", example = "default")
    private String dataSource;

    @Schema(description = "使用次数", example = "10")
    private Integer useCount;

    @Schema(description = "状态（1=启用，0=停用，2=草稿）", example = "1")
    private String enabled;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime createTime;

    @Schema(description = "创建人", example = "admin")
    private String creator;

}
