package com.miaxis.area.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.miaxis.common.annotation.Excel;
import com.miaxis.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.miaxis.common.core.domain.BaseBusinessEntity;
import lombok.Data;
/**
 * 地区对象 area_info
 *
 * @author miaxis
 * @date 2022-03-14
 */
@Data
@TableName("area_info")
@ApiModel(value = "AreaInfo", description = "地区对象 area_info")
public class AreaInfo extends BaseBusinessEntity{
    private static final long serialVersionUID = 1L;

    /** 主建 */
    @Excel(name = "主建")
    @TableId(value = "code")
    @ApiModelProperty(value = "主建")
    private String code;

    /** 地区名 */
    @Excel(name = "地区名")
    @TableField("name")
    @ApiModelProperty(value = "地区名")
    private String name;

    /** 是否叶子节点 0不是 1是 */
    @Excel(name = "是否叶子节点 0不是 1是")
    @TableField("leaf")
    @ApiModelProperty(value = "是否叶子节点 0不是 1是")
    private String leaf;

    /** 父节点code */
    @Excel(name = "父节点code")
    @TableField("parent_code")
    @ApiModelProperty(value = "父节点code")
    private String parentCode;

    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 setLeaf(String leaf){
        this.leaf = leaf;
    }

    public String getLeaf(){
        return leaf;
    }
    public void setParentCode(String parentCode){
        this.parentCode = parentCode;
    }

    public String getParentCode(){
        return parentCode;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("code", getCode())
            .append("name", getName())
            .append("leaf", getLeaf())
            .append("parentCode", getParentCode())
            .toString();
    }
}
