EmergencyCommandLiaisonTreeModel.java 7.9 KB
package com.skua.modules.emergency.model;

import com.skua.modules.emergency.vo.EmergencyCommandLiaisonVO;
import com.skua.modules.system.entity.SysUser;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * 应急联络表 存储树结构数据的实体类
 * @author 11389
 */
@Data
public class EmergencyCommandLiaisonTreeModel implements Serializable {
    private static final long serialVersionUID = 1L;
    /** 对应EmergencyCommandLiaison中的id字段,前端数据树中的key*/
    private String key;
    /** 对应EmergencyCommandLiaison中的id字段,前端数据树中的value*/
    private String value;
    /** 对应emergency_name字段,前端数据树中的title*/
    private String title;
    /**对应emergency_name下关联的用户集合**/
    private List<SysUser> userList;
    private boolean isLeaf;
    private java.lang.String id;
    /**父id*/
    @ApiModelProperty(value = "父id")
    private java.lang.String parentId;
    /**应急组名称*/
    @ApiModelProperty(value = "应急组名称")
    private java.lang.String emergencyName;
    /**地址*/
    @ApiModelProperty(value = "地址")
    private java.lang.String address;
    /**所属厂区*/
    @ApiModelProperty(value = "所属厂区")
    private java.lang.String departId;
    /**备注*/
    @ApiModelProperty(value = "备注")
    private java.lang.String remark;
    /**创建人*/
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
    /**创建时间*/
    @ApiModelProperty(value = "创建时间")
    private java.util.Date createTime;
    /**更新人*/
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
    /**更新时间*/
    @ApiModelProperty(value = "更新时间")
    private java.util.Date updateTime;
    /**delFlag*/
    @ApiModelProperty(value = "delFlag")
    private java.lang.Integer delFlag;
    /**attr1*/
    @ApiModelProperty(value = "attr1")
    private java.lang.String attr1;
    /**attr2*/
    @ApiModelProperty(value = "attr2")
    private java.lang.String attr2;
    /**attr3*/
    @ApiModelProperty(value = "attr3")
    private java.lang.String attr3;
    /**attr4*/
    @ApiModelProperty(value = "attr4")
    private java.lang.String attr4;
    private List<EmergencyCommandLiaisonTreeModel> children = new ArrayList<>();

    public List<SysUser> getUserList() {
        return userList;
    }

    public void setUserList(List<SysUser> userList) {
        this.userList = userList;
    }

    public EmergencyCommandLiaisonTreeModel(EmergencyCommandLiaisonVO liaison) {
        this.key = liaison.getId();
        this.value = liaison.getId();
        this.title = liaison.getEmergencyName();
        this.id = liaison.getId();
        this.parentId = liaison.getParentId();
        this.emergencyName = liaison.getEmergencyName();
        this.address = liaison.getAddress();
        this.departId = liaison.getDepartId();
        this.remark = liaison.getRemark();
        this.createBy = liaison.getCreateBy();
        this.createTime = liaison.getCreateTime();
        this.updateBy = liaison.getUpdateBy();
        this.updateTime = liaison.getUpdateTime();
        this.delFlag = liaison.getDelFlag();
        this.attr1 = liaison.getAttr1();
        this.attr2 = liaison.getAttr2();
        this.attr3 = liaison.getAttr3();
        this.attr4 = liaison.getAttr4();
        this.userList = liaison.getUserList();
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getTitle() {
        return title;
    }

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

    public boolean isLeaf() {
        return isLeaf;
    }

    public void setLeaf(boolean leaf) {
        isLeaf = leaf;
    }

    public String getId() {
        return id;
    }

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

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getEmergencyName() {
        return emergencyName;
    }

    public void setEmergencyName(String emergencyName) {
        this.emergencyName = emergencyName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getDepartId() {
        return departId;
    }

    public void setDepartId(String departId) {
        this.departId = departId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public String getAttr1() {
        return attr1;
    }

    public void setAttr1(String attr1) {
        this.attr1 = attr1;
    }

    public String getAttr2() {
        return attr2;
    }

    public void setAttr2(String attr2) {
        this.attr2 = attr2;
    }

    public String getAttr3() {
        return attr3;
    }

    public void setAttr3(String attr3) {
        this.attr3 = attr3;
    }

    public String getAttr4() {
        return attr4;
    }

    public void setAttr4(String attr4) {
        this.attr4 = attr4;
    }

    public List<EmergencyCommandLiaisonTreeModel> getChildren() {
        return children;
    }

    public void setChildren(List<EmergencyCommandLiaisonTreeModel> children) {
        this.children = children;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        EmergencyCommandLiaisonTreeModel that = (EmergencyCommandLiaisonTreeModel) o;
        return isLeaf == that.isLeaf &&
                key.equals(that.key) &&
                value.equals(that.value) &&
                title.equals(that.title) &&
                userList.equals(that.userList) &&
                id.equals(that.id) &&
                parentId.equals(that.parentId) &&
                emergencyName.equals(that.emergencyName) &&
                address.equals(that.address) &&
                departId.equals(that.departId) &&
                remark.equals(that.remark) &&
                createBy.equals(that.createBy) &&
                createTime.equals(that.createTime) &&
                updateBy.equals(that.updateBy) &&
                updateTime.equals(that.updateTime) &&
                delFlag.equals(that.delFlag) &&
                attr1.equals(that.attr1) &&
                attr2.equals(that.attr2) &&
                attr3.equals(that.attr3) &&
                attr4.equals(that.attr4) &&
                children.equals(that.children);
    }

    @Override
    public int hashCode() {
        return Objects.hash(key, value, title, userList, isLeaf, id, parentId, emergencyName, address, departId, remark, createBy, createTime, updateBy, updateTime, delFlag, attr1, attr2, attr3, attr4, children);
    }
}