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 jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

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

    @NotNull(message = "模型id不能为空", groups = {edit.class, delete.class, upgradeModel.class, copyModel.class, detail.class})
    @ChineseDescription("模型id")
    private Long formModelId;

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

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

    @NotBlank(message = "模型名称不能为空", groups = {add.class, edit.class})
    @ChineseDescription("模型名称")
    private String formModelName;

    @NotBlank(message = "模型编码不能为空", groups = {add.class})
    @ChineseDescription("模型编码")
    private String formModelCode;

    @NotNull(message = "系统编码，这里用十进制存储，但是展示的时候是3位36进制的字符串，例如展示的时候可能显示：#AZZZ不能为空",
            groups = {add.class})
    @ChineseDescription("系统编码，这里用十进制存储，但是展示的时候是3位36进制的字符串，例如展示的时候可能显示：#AZZZ")
    private Integer systemCode;

    @NotBlank(message = "系统编码，用于展示不能为空", groups = {add.class})
    @ChineseDescription("系统编码，用于展示")
    private String systemCodeShow;

    @ChineseDescription("项目描述")
    private String description;

    @ChineseDescription("排序")
    private BigDecimal fldSort;

    @NotBlank(message = "是否是流程表单不能为空", groups = {add.class, edit.class})
    @ChineseDescription("是否是流程表单：Y-是，N-否")
    private String flowFlag;

    public @interface upgradeModel {
    }

    public @interface copyModel {
    }

}
