package cn.com.countrygarden.bi.main.model.twerp.hm;


import javax.persistence.*;

@Table(name = "[HM_wygl_new_1853].[dbo].[Tb_Sys_Organ]")
public class TbSysOrgan {

    /**
     * pk
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "OrganCode")
    private String organCode;

    @Column(name = "RoleCode")
    private String roleCode;

    @Column(name = "CommID")
    private String commID;

    @Column(name = "UserCode")
    private String userCode;

    @Column(name = "OrganName")
    private String organName;

    @Column(name = "IsDelete")
    private Short isdelete;

    @Column(name = "IsComp")
    private Short iscomp;

    @Column(name = "Num")
    private Short num;

    @Column(name = "fdNo")
    private String fdno;

    @Column(name = "TimeStamp")
    private byte[] timestamp;


    public String getOrganCode() {
        return organCode;
    }

    public void setOrganCode(String organCode) {
        this.organCode = organCode;
    }

    public String getOrganName() {
        return organName;
    }

    public void setOrganName(String organName) {
        this.organName = organName;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public String getCommID() {
        return commID;
    }

    public void setCommID(String commID) {
        this.commID = commID;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public Short getIsdelete() {
        return isdelete;
    }

    public void setIsdelete(Short isdelete) {
        this.isdelete = isdelete;
    }

    public Short getIscomp() {
        return iscomp;
    }

    public void setIscomp(Short iscomp) {
        this.iscomp = iscomp;
    }

    public Short getNum() {
        return num;
    }

    public void setNum(Short num) {
        this.num = num;
    }

    public String getFdno() {
        return fdno;
    }

    public void setFdno(String fdno) {
        this.fdno = fdno;
    }

    public byte[] getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(byte[] timestamp) {
        this.timestamp = timestamp;
    }

    /**
     * 是否限制为项目权限
     *
     * @return
     */
    public boolean isCommLimited() {
        return Integer.parseInt(commID) > 0 ? true : false;
    }

    public boolean isHeadquarters() {
        return organCode.equals("01");
    }
}
