package com.ruoyi.ems.domain;

import com.huashe.common.domain.TreeEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 区域对象对象 adm_area
 *
 * @author ruoyi
 * @date 2024-11-01
 */
public class Area extends TreeEntity
{
    private static final long serialVersionUID = 1L;

    /** 序号 */
    private Long id;

    /** 区域代码 */
    private String areaCode;

    /** 上级区域代码 */
    private String parentCode;

    /** 区域名称 */
    private String areaName;

    /** 区域简称 */
    private String shortName;

    /** 区域简称 */
    private String desc;

    /** 区域状态 */
    private Integer status;

    /**
     * 区域属性
     */
    private AreaAttr areaAttr;

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

    public Long getId()
    {
        return id;
    }
    public void setAreaCode(String areaCode)
    {
        this.areaCode = areaCode;
    }

    public String getAreaCode()
    {
        return areaCode;
    }
    public void setParentCode(String parentCode)
    {
        this.parentCode = parentCode;
    }

    public String getParentCode()
    {
        return parentCode;
    }
    public void setAreaName(String areaName)
    {
        this.areaName = areaName;
    }

    public String getAreaName()
    {
        return areaName;
    }
    public void setShortName(String shortName)
    {
        this.shortName = shortName;
    }

    public String getShortName()
    {
        return shortName;
    }
    public void setDesc(String desc)
    {
        this.desc = desc;
    }

    public String getDesc()
    {
        return desc;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }

    public AreaAttr getAreaAttr() {
        return areaAttr;
    }

    public void setAreaAttr(AreaAttr areaAttr) {
        this.areaAttr = areaAttr;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("areaCode", getAreaCode())
            .append("parentCode", getParentCode())
            .append("ancestors", getAncestors())
            .append("areaName", getAreaName())
            .append("shortName", getShortName())
            .append("desc", getDesc())
            .append("orderNum", getOrderNum())
            .append("status", getStatus())
            .append("areaAttr", getAreaAttr() != null ? getAreaAttr().toString() : "")
            .toString();
    }
}
