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

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

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

@Schema(description = "管理后台 - 模板新增/修改 Request VO")
@Data
public class DocTemplateSaveReqVO {

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

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

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

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

    @Schema(description = "所属分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "所属分类不能为空")
    private Long categoryId;

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

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

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

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

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

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

}
