package com.ruoyi.system.domain;

import com.ruoyi.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 吉林地区管理对象 sys_dept_jl
 *
 * @author CH
 * @date 2022-03-25
 */
public class SysDeptJl extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private String id;

    /** 行政区编码 */
    private String code;

    /** 行政区名 */
    @NotBlank(message = "行政区名必填")
    @Length(min = 1,max = 15,message = "行政区名长度需小于15字符")
    private String name;

    /** 上级行政区 */
    @NotBlank(message = "上级行政区id必填")
    @Length(min = 32, max = 32, message = "父级id为32位uuid")
    private String parentId;

    /** 上级行政区名称 */
    private String parentName;

    /** 等级 */
    private Integer level;

    public void setId(String id)
    {
        this.id = id;
    }
    public String getId()
    {
        return id;
    }

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

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

    public void setParentId(String parentId)
    {
        this.parentId = parentId;
    }
    public String getParentId()
    {
        return parentId;
    }

    public String getParentName() {
        return parentName;
    }
    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    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("code", getCode())
            .append("name", getName())
            .append("parentName", getParentName())
            .append("parentId", getParentId())
            .append("level", getLevel())
            .toString();
    }
}
