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;

@Schema(description = "管理后台 - 标签库新增/修改 Request VO")
@Data
public class DocTemplateTagSaveReqVO {

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

    @Schema(description = "标签名称（中文）", requiredMode = Schema.RequiredMode.REQUIRED, example = "合同编号")
    @NotBlank(message = "标签名称不能为空")
    private String tagName;

    @Schema(description = "标签编码（Velocity变量名）", requiredMode = Schema.RequiredMode.REQUIRED, example = "contractNo")
    @NotBlank(message = "标签编码不能为空")
    private String tagCode;

    @Schema(description = "所属分类ID", example = "1")
    private Long categoryId;

    @Schema(description = "数据类型", example = "String")
    private String dataType;

    @Schema(description = "默认值", example = "")
    private String defaultValue;

    @Schema(description = "SQL脚本（可选，仅保存参考）", example = "SELECT contract_no FROM contract_main WHERE id = #{businessId}")
    private String sqlScript;

    @Schema(description = "描述", example = "合同主表的合同编号字段")
    private String description;

    @Schema(description = "排序号", example = "1")
    private Integer sort;

    @Schema(description = "是否启用（1=启用，0=停用）", example = "1")
    private String enabled;

}
