package cn.axzo.workflow.common.model.response.category;


import cn.axzo.workflow.common.enums.VarTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class CategoryGroupVarItemVo implements Serializable {

    private static final long serialVersionUID = -3349551294678140220L;

    /**
     * 分组id
     */
    private Long id;

    /**
     * 上级分组id
     */
    private Long parentGroupId;

    /**
     * 分组名
     */
    private String groupName;

    /**
     * 当前分组对应的变量
     */
    private List<CategoryVarItemVo> vars;

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class CategoryVarItemVo implements Serializable {

        private static final long serialVersionUID = -1918203166603971593L;

        /**
         * 变量id
         */
        private Long id;

        /**
         * 分组id
         */
        private Long groupId;

        /**
         * 变量类型，文本/图片
         */
        private VarTypeEnum type;

        /**
         * 变量code
         */
        private String code;

        /**
         * 变量名称
         */
        private String name;

    }
}
