package com.pj.project.tb_district;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * Model: tb_district -- 全国地区表
 * @author qzyReal 
 */
@Data
@Accessors(chain = true)
@TableName(TbDistrict.TABLE_NAME)
@EqualsAndHashCode(callSuper = false)
public class TbDistrict extends Model<TbDistrict> implements Serializable {

	// ---------- 模块常量 ----------
	/**
	 * 序列化版本id 
	 */
	private static final long serialVersionUID = 1L;	
	/**
	 * 此模块对应的表名 
	 */
	public static final String TABLE_NAME = "tb_district";	
	/**
	 * 此模块对应的权限码 
	 */
	public static final String PERMISSION_CODE = "tb-district";	


	// ---------- 表中字段 ----------
	/**
	 * 主键 
	 */
	private Long id;

	/**
	 * 父及地区关系 
	 */
	private Long pid;

	/**
	 * 地区名称 
	 */
	private String district;

	/**
	 * 子属级别关系 
	 */
	private String level;

	@TableField(exist = false)
	private List<TbDistrict> children;


	@TableField(exist = false)
	private Long AreaId;
	@TableField(exist = false)
	private String AreaName;
	@TableField(exist = false)
	private Long ParentId;
	@TableField(exist = false)
	private String Layer;


	public Long getAreaId() {
		return this.id;
	}

	public String getAreaName() {
		return this.district;
	}

	public Long getParentId() {
		return this.pid;
	}

	public String getLayer() {
		return this.Layer;
	}


	


}
