package com.xunmei.system.api.domain;

import com.xunmei.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.List;

/**
 * 组织机构信息
 */
public class Org extends BaseEntity {

    /*主键*/
    private Long id;

    /*机构名称*/
    private String name;

    /*层级*/
    private Integer level;

    /*机构类型*/
    private Integer type;

    /*是否禁用*/
    private Integer isLock;

    /*上级机构*/
    private Long parentId;

    /*联系电话*/
    private String phone;

    /*行政区域编码*/
    private String cityCode;

    /**
     * 负责人
     */
    private String manager;

    /**
     * 负责人电话
     */
    private String managerPhone;

    /**
     * 地址
     */
    private String address;

    /*机构code*/
    private String code;

    /**
     * guid
     */
    private String guid;

    /**
     * 父节点GUID
     */
    private String parentGuid;

    /**
     * 路径
     */
    private String path;

    /**
     * 删除
     */
    private Integer deleted;

    /**
     * 排序
     */
    private Double sort;

    /**
     * 机构简称
     */
    private String shortName;

    /**
     * 备注
     */
    private String remark;

    /**
     * 子机构
     */
    private List<Org> children = new ArrayList<Org>();

    /**
     * 是否暂停服务
     */
    //private Integer temporarilyClosed;

    /**
     * 天气城市区域编码
     */
    //private String weatherCityCode;

    public Org() {

    }

    public List<Org> getChildren() {
        return children;
    }

    public void setChildren(List<Org> children) {
        this.children = children;
    }

    public Integer getIsLock() {
        return isLock;
    }

    public void setIsLock(Integer isLock) {
        this.isLock = isLock;
    }

    public Long getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getManager() {
        return manager;
    }

    public void setManager(String manager) {
        this.manager = manager;
    }

    public String getManagerPhone() {
        return managerPhone;
    }

    public void setManagerPhone(String managerPhone) {
        this.managerPhone = managerPhone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getGuid() {
        return guid;
    }

    public void setGuid(String guid) {
        this.guid = guid;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public String getShortName() {
        return shortName;
    }

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


    public String getParentGuid() {
        return parentGuid;
    }

    public void setParentGuid(String parentGuid) {
        this.parentGuid = parentGuid;
    }


    public Double getSort() {
        return sort;
    }

    public void setSort(Double sort) {
        this.sort = sort;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

/*
    public Integer getTemporarilyClosed() {
        return temporarilyClosed;
    }

    public void setTemporarilyClosed(Integer temporarilyClosed) {
        this.temporarilyClosed = temporarilyClosed;
    }

    public String getWeatherCityCode() {
        return weatherCityCode;
    }

    public void setWeatherCityCode(String weatherCityCode) {
        this.weatherCityCode = weatherCityCode;
    }
*/

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("parentId", getParentId())
                .append("address", getAddress())
                .append("name", getName())
                .append("delete", getDeleted())
                .append("guid", getGuid())
                .append("phone", getPhone())
                .append("manager", getManager())
                .append("managerPhone", getManagerPhone())
                .append("path", getPath())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
