package com.unis.model.bean.detail;

import java.util.List;

/**
 * 包名: com.unis.sxzcl.ui.grain_check
 * 类名: DetailItemBean
 * 作用描述:
 * 创建人: mQ
 * 创建时间: 2020/12/11 10:44
 * 更新人:
 * 更新时间: 2020/12/11 10:44
 * 更新说明:
 * 版本号: 1.0
 */
public class DetailItemBean {

    /******************* 属性 *********************/

    // 样式类型
    private int itemType;
    // 序号
    private Integer index;
    // id
    private String id;
    // 流程id
    private String flowId;
    // 标题
    private String title;
    // 时间
    private String time;
    // 选项集合
    private String[] option;
    // 选中项
    private String selectIndex;
    // 输入内容
    private String inputData;
    // 是否显示
    private boolean show = true;
    // 父选项id
    private Long parentId;
    // 子选项id集合 根据逗号分割
    private String[] childIds;
    // 必填
    private boolean must = true;
    // 禁止
    private boolean enable = true;
    // 审批数据集合
    private List<DetailApproveBean> approves;

    /******************* 函数 *********************/
    public DetailItemBean(@DetailItemType int itemType) {
        this.itemType = itemType;
    }

    public DetailItemBean(@DetailItemType int itemType, String id, String flowId, String title) {
        this.itemType = itemType;
        this.id = id;
        this.flowId = flowId;
        this.title = title;
    }


    /******************* set方法 *********************/
    public DetailItemBean setEnable(boolean enable) {
        this.enable = enable;
        return this;
    }
    public DetailItemBean setFlowId(String flowId) {
        this.flowId = flowId;
        return this;
    }

    public DetailItemBean setMust(boolean must) {
        this.must = must;
        return this;
    }

    public DetailItemBean setIndex(Integer index) {
        this.index = index;
        return this;
    }

    public DetailItemBean setItemType(int itemType) {
        this.itemType = itemType;
        return this;
    }

    public DetailItemBean setId(String id) {
        this.id = id;
        return this;
    }

    public DetailItemBean setTitle(String title) {
        this.title = title;
        return this;
    }

    public DetailItemBean setTime(String time) {
        this.time = time;
        return this;
    }

    public DetailItemBean setOption(String[] option) {
        this.option = option;
        return this;
    }

    public DetailItemBean setSelectIndex(String selectIndex) {
        this.selectIndex = selectIndex;
        return this;
    }

    public DetailItemBean setInputData(String inputData) {
        this.inputData = inputData;
        return this;
    }

    public DetailItemBean setShow(boolean show) {
        this.show = show;
        return this;
    }

    public DetailItemBean setParentId(Long parentId) {
        this.parentId = parentId;
        return this;
    }

    public DetailItemBean setChildIds(String[] childIds) {
        this.childIds = childIds;
        return this;
    }

    public DetailItemBean setApproves(List<DetailApproveBean> approves) {
        this.approves = approves;
        return this;
    }


    /******************* get方法 *********************/

    public boolean isEnable() {
        return enable;
    }
    public Integer getIndex() {
        return index;
    }

    public int getItemType() {
        return itemType;
    }

    public String getId() {
        return id;
    }

    public String getTitle() {
        return title;
    }

    public String getTime() {
        return time;
    }

    public String[] getOption() {
        return option;
    }

    public String getSelectIndex() {
        return selectIndex;
    }

    public String getInputData() {
        return inputData;
    }

    public boolean isShow() {
        return show;
    }

    public Long getParentId() {
        return parentId;
    }

    public String[] getChildIds() {
        return childIds;
    }

    public String getFlowId() {
        return flowId;
    }

    public boolean isMust() {
        return must;
    }


    public List<DetailApproveBean> getApproves() {
        return approves;
    }
}
