package cn.stylefeng.team.form.modular.manage.request;

import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
import cn.stylefeng.team.form.api.pojo.FormDesignVo;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class FormDefinitionRequest extends BaseRequest {

    @NotNull(message = "表单定义id不能为空", groups = {edit.class, delete.class})
    @ChineseDescription("表单定义id")
    private Long formDefinitionId;

    @NotNull(message = "所属业务分类id不能为空", groups = {add.class, edit.class})
    @ChineseDescription("所属业务分类id")
    private Long businessCategoryId;

    @NotNull(message = "所属业务id不能为空", groups = {add.class, edit.class})
    @ChineseDescription("所属业务id")
    private Long businessId;

    @NotNull(message = "所属表单模型id不能为空", groups = {add.class, edit.class})
    @ChineseDescription("所属表单模型id")
    private Long formModelId;

    @NotBlank(message = "模型定义的版本号，例如：1.0不能为空", groups = {add.class, edit.class})
    @ChineseDescription("模型定义的版本号，例如：1.0")
    private String fldVersion;

    @ChineseDescription("前端表单配置的JSON")
    private FormDesignVo formConfig;

}
