package com.flossom.common.core.domain.entity;

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

/**
 * 地区列对象 sys_region
 *
 * @author flossom
 * @date 2023-12-12
 */
public class SysRegion extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 表id
     */
    private Long id;

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

    /**
     * 父id
     */
    @Excel(name = "父id")
    private Long parentId;

    /**
     * 地区等级
     */
    @Excel(name = "地区等级")
    private Integer level;

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

    public Long getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

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

    public Long getParentId() {
        return parentId;
    }

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

    public Integer getLevel() {
        return level;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("parentId", getParentId())
                .append("level", getLevel())
                .toString();
    }
}
