package com.mortals.xhx.module.site.model;

import com.mortals.xhx.module.site.model.vo.SiteBusinessVo;
/**
* 站点事项实体对象
*
* @author zxfei
* @date 2022-01-13
*/

public class SiteBusinessEntity extends SiteBusinessVo {
    private static final long serialVersionUID = 1L;

    /**
    * 站点ID
    */
    private Long siteId;
    /**
    * 站点名称
    */
    private String siteName;
    /**
    * 业务ID
    */
    private Long businessId;
    /**
    * 业务名称
    */
    private String businessName;
    /**
    * 祖级列表，逗号分隔
    */
    private String ancestors;
    /**
    * 业务类型(0.一级业务,1.二级业务)
    */
    private Integer isBusiness;
    /**
    * 业务父级ID
    */
    private Long parentId;
    /**
    * 业务状态 (0.停用，1.正常)
    */
    private Integer status;



    public SiteBusinessEntity(){}
    /**
    * 获取 站点ID
    * @return Long
    */
    public Long getSiteId(){
        return siteId;
    }
    /**
    * 设置 站点ID
    * @param siteId
    */
    public void setSiteId(Long siteId){
        this.siteId = siteId;
    }
    /**
    * 获取 站点名称
    * @return String
    */
    public String getSiteName(){
        return siteName;
    }
    /**
    * 设置 站点名称
    * @param siteName
    */
    public void setSiteName(String siteName){
        this.siteName = siteName;
    }
    /**
    * 获取 业务ID
    * @return Long
    */
    public Long getBusinessId(){
        return businessId;
    }
    /**
    * 设置 业务ID
    * @param businessId
    */
    public void setBusinessId(Long businessId){
        this.businessId = businessId;
    }
    /**
    * 获取 业务名称
    * @return String
    */
    public String getBusinessName(){
        return businessName;
    }
    /**
    * 设置 业务名称
    * @param businessName
    */
    public void setBusinessName(String businessName){
        this.businessName = businessName;
    }
    /**
    * 获取 祖级列表，逗号分隔
    * @return String
    */
    public String getAncestors(){
        return ancestors;
    }
    /**
    * 设置 祖级列表，逗号分隔
    * @param ancestors
    */
    public void setAncestors(String ancestors){
        this.ancestors = ancestors;
    }
    /**
    * 获取 业务类型(0.一级业务,1.二级业务)
    * @return Integer
    */
    public Integer getIsBusiness(){
        return isBusiness;
    }
    /**
    * 设置 业务类型(0.一级业务,1.二级业务)
    * @param isBusiness
    */
    public void setIsBusiness(Integer isBusiness){
        this.isBusiness = isBusiness;
    }
    /**
    * 获取 业务父级ID
    * @return Long
    */
    public Long getParentId(){
        return parentId;
    }
    /**
    * 设置 业务父级ID
    * @param parentId
    */
    public void setParentId(Long parentId){
        this.parentId = parentId;
    }
    /**
    * 获取 业务状态 (0.停用，1.正常)
    * @return Integer
    */
    public Integer getStatus(){
        return status;
    }
    /**
    * 设置 业务状态 (0.停用，1.正常)
    * @param status
    */
    public void setStatus(Integer status){
        this.status = status;
    }




    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof SiteBusinessEntity) {
            SiteBusinessEntity tmp = (SiteBusinessEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",siteId:").append(getSiteId());
        sb.append(",siteName:").append(getSiteName());
        sb.append(",businessId:").append(getBusinessId());
        sb.append(",businessName:").append(getBusinessName());
        sb.append(",ancestors:").append(getAncestors());
        sb.append(",isBusiness:").append(getIsBusiness());
        sb.append(",parentId:").append(getParentId());
        sb.append(",status:").append(getStatus());
        return sb.toString();
    }

    public void initAttrValue(){

            this.siteId = null;

            this.siteName = null;

            this.businessId = null;

            this.businessName = null;

            this.ancestors = "";

            this.isBusiness = null;

            this.parentId = null;

            this.status = 1;
    }
}