package com.publiccms.entities.sys;
// Generated 2016-11-19 15:33:56 by Hibernate Tools 4.3.1

import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;

import com.publiccms.common.generator.annotation.GeneratorColumn;

/**
 * SysDeptItemId generated by hbm2java
 */
@Embeddable
public class SysDeptItemId implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    /**
     * dept id

     * 部门id
     */
    @GeneratorColumn(title = "部门", condition = true)
    private int deptId;
    /**
     * item type

     * 项目类型
     */
    @GeneratorColumn(title = "项目类型", condition = true)
    private String itemType;
    /**
     * item id

     * 项目id
     */
    @GeneratorColumn(title = "项目", condition = true)
    private String itemId;

    public SysDeptItemId() {
    }

    public SysDeptItemId(int deptId, String itemType, String itemId) {
        this.deptId = deptId;
        this.itemType = itemType;
        this.itemId = itemId;
    }

    @Column(name = "dept_id", nullable = false)
    public int getDeptId() {
        return this.deptId;
    }

    public void setDeptId(int deptId) {
        this.deptId = deptId;
    }

    @Column(name = "item_type", nullable = false, length = 50)
    public String getItemType() {
        return this.itemType;
    }

    public void setItemType(String itemType) {
        this.itemType = itemType;
    }

    @Column(name = "item_id", nullable = false, length = 100)
    public String getItemId() {
        return this.itemId;
    }

    public void setItemId(String itemId) {
        this.itemId = itemId;
    }

    public boolean equals(Object other) {
        if ((this == other))
            return true;
        if ((other == null))
            return false;
        if (!(other instanceof SysDeptItemId))
            return false;
        SysDeptItemId castOther = (SysDeptItemId) other;

        return (this.getDeptId() == castOther.getDeptId())
                && ((this.getItemType() == castOther.getItemType()) || (this.getItemType() != null
                        && castOther.getItemType() != null && this.getItemType().equals(castOther.getItemType())))
                && ((this.getItemId() == castOther.getItemId()) || (this.getItemId() != null && castOther.getItemId() != null
                        && this.getItemId().equals(castOther.getItemId())));
    }

    public int hashCode() {
        int result = 17;
        result = 37 * result + this.getDeptId();
        result = 37 * result + (getItemType() == null ? 0 : this.getItemType().hashCode());
        result = 37 * result + (getItemId() == null ? 0 : this.getItemId().hashCode());
        return result;
    }

}
