package com.yanzhu.system.domain;

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

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

/**
 * 地址管理对象 sys_area
 * 
 * @author JiangYuQi
 * @date 2024-07-15
 */
public class SysArea extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Long id;

    /** 父编号编号 */
    private Long parentId;

    /** 区域名称 */
    @Excel(name = "区域名称")
    private String cname;

    /** 区域类型 */
    @Excel(name = "区域类型")
    private Integer ctype;

    private Integer ctypeEvent;

    /** 子菜单 */
    private List<SysArea> children = new ArrayList<SysArea>();

    public Long getId() {
        return id;
    }

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

    public Long getParentId() {
        return parentId;
    }

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

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public Integer getCtype() {
        return ctype;
    }

    public void setCtype(Integer ctype) {
        this.ctype = ctype;
    }

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

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

    public Integer getCtypeEvent() {
        return ctypeEvent;
    }

    public void setCtypeEvent(Integer ctypeEvent) {
        this.ctypeEvent = ctypeEvent;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("parentId", getParentId())
            .append("cname", getCname())
            .append("ctype", getCtype())
            .toString();
    }
}
