package com.hotent.uc.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hotent.base.entity.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang.builder.ToStringBuilder;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlTransient;
import java.util.Objects;


/**
 * 矩阵流程关系表
 * <pre>
 * 描述：矩阵流程关系表 实体对象
 * 构建组：x7
 * 作者:zjq
 * 邮箱:zjq@jee-soft.cn
 * 日期:2021-01-16 17:10:08
 * 版权：广州宏天软件股份有限公司
 * </pre>
 */
@TableName("uc_matrix_proc_relation")
@ApiModel(value = "MatrixProcRelation", description = "矩阵流程关系表")
public class MatrixProcRelation extends BaseModel<MatrixProcRelation> {

    private static final long serialVersionUID = 1L;
    @XmlTransient
    @TableId("ID_")
    @ApiModelProperty(value = "id")
    protected String id;

    @XmlAttribute(name = "matrixCode")
    @TableField("MATRIX_CODE_")
    @ApiModelProperty(value = "矩阵编码")
    protected String matrixCode;

    @XmlAttribute(name = "procDefKey")
    @TableField("PROC_DEF_KEY_")
    @ApiModelProperty(value = "流程定义Key")
    protected String procDefKey;

    @XmlTransient
    @TableField("PROC_DEF_NAME_")
    @ApiModelProperty(value = "流程定义名称")
    protected String procDefName;

    @XmlTransient
    @TableField("TENANT_ID_")
    @ApiModelProperty(value = "租户id")
    protected String tenantId;

    @XmlTransient
    @TableField(exist = false)
    @ApiModelProperty(value = "流程定义id")
    protected String procDefId;

    /**
     * 返回 id
     *
     * @return
     */
    public String getId() {
        return this.id;
    }

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

    /**
     * 返回 矩阵编码
     *
     * @return
     */
    public String getMatrixCode() {
        return this.matrixCode;
    }

    public void setMatrixCode(String matrixCode) {
        this.matrixCode = matrixCode;
    }

    /**
     * 返回 流程定义Key
     *
     * @return
     */
    public String getProcDefKey() {
        return this.procDefKey;
    }

    public void setProcDefKey(String procDefKey) {
        this.procDefKey = procDefKey;
    }

    /**
     * 返回 租户id
     *
     * @return
     */
    public String getTenantId() {
        return this.tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getProcDefId() {
        return procDefId;
    }

    public void setProcDefId(String procDefId) {
        this.procDefId = procDefId;
    }

    public String getProcDefName() {
        return procDefName;
    }

    public void setProcDefName(String procDefName) {
        this.procDefName = procDefName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", this.id)
                .append("matrixCode", this.matrixCode)
                .append("procDefKey", this.procDefKey)
                .append("procDefName", this.procDefName)
                .append("tenantId", this.tenantId)
                .toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        MatrixProcRelation that = (MatrixProcRelation) o;
        return Objects.equals(matrixCode, that.matrixCode) && Objects.equals(procDefKey, that.procDefKey);
    }

    @Override
    public int hashCode() {
        return Objects.hash(matrixCode, procDefKey);
    }
}