package com.huatek.busi.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

import org.springframework.format.annotation.DateTimeFormat;

import com.huatek.torch.sql.annotation.FieldName;
import com.huatek.torch.sql.annotation.Id;
import com.huatek.torch.sql.annotation.TableName;
import com.huatek.torch.sql.annotation.TempField;
import com.huatek.torch.sql.beans.Pojo;




/**
  * @ClassName: BusiSiteTree
  * @FullClassPath: com.huatek.busi.entity.BusiSiteTree
  * @Description: 站点树
  * @author: Arno
  * @date: Jun 21, 2019 10:11:17 AM
  * @version: 1.0
  */
@TableName("busi_site_tree")
public class BusiSiteTree extends Pojo implements Serializable {


	/** @Fields serialVersionUID : */
	private static final long serialVersionUID = 2795515894400275201L;


	/** @Fields id : */
	@FieldName("id")
	@Id(value = "id")
	private String id;


	/** @Fields parentId : 父类别 id 当id=0时说明是根节点*/
	@FieldName("parent_id")
	private String parentId;

	/** @Fields name : 类别名称*/
	@FieldName("name")
	private String name;

	/** @Fields status :类别状态 1-正常 ， 2-删除*/
	@FieldName("status")
	private String status;

	/** @Fields siteId : 站点id*/
	@FieldName("site_id")
	private String siteId;

	/** @Fields equipmentType : 设备类型  -1：根节点   0:站点  1：变压器   2:GIS  3:测温   4：避雷器  6：电缆环流
	 *  							   21:GIS回路；31:测温柜回路  41：避雷器回路
	 *  							   111: 变压器设备  211：GIS设备 311：测温设备  411：避雷器设备 611：电缆环流设备
	 *  */
	@FieldName("equipment_type")
	private String equipmentType;


	/** @Fields idsystemCode :系统编码 */
	@FieldName("system_code")
	private String systemCode;

    /** @Fields createTime :创建时间 */
    @FieldName("create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TempField
    private List<BusiSiteTree> children = new ArrayList<>();

	public String getId() {
		return id;
	}

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

	public String getParentId() {
		return parentId;
	}

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

	public String getName() {
		return name;
	}

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

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSiteId() {
		return siteId;
	}

	public void setSiteId(String siteId) {
		this.siteId = siteId;
	}


	public String getEquipmentType() {
		return equipmentType;
	}

	public void setEquipmentType(String equipmentType) {
		this.equipmentType = equipmentType;
	}


	public String getSystemCode() {
		return systemCode;
	}

	public void setSystemCode(String systemCode) {
		this.systemCode = systemCode;
	}


	public LocalDateTime getCreateTime() {
		return createTime;
	}

	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}



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

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

	@Override
	public String toString() {
		return "BusiSiteTree [id=" + id + ", parentId=" + parentId + ", name=" + name + ", status=" + status
				+ ", siteId=" + siteId + ", equipmentType=" + equipmentType + ", systemCode="
				+ systemCode + ", createTime=" + createTime + "]";
	}

}
