package com.mortals.xhx.module.access.model;
import java.util.List;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.access.model.vo.AccessVo;
import com.mortals.xhx.module.access.model.AccessSystemEntity;
import lombok.Data;
/**
 * 区域接入实体对象
 *
 * @author zxfei
 * @date 2024-07-26
 */
@Data
public class AccessEntity extends AccessVo {
    private static final long serialVersionUID = 1L;

    /**
     * 区域名称
     */
    private String areaName;
    /**
     * 区域编码
     */
    private String areaCode;
    /**
     * 背景图片地址
     */
    private String bigPath;
    /**
     * 标签
     */
    private String tag;
    /**
     * 排序
     */
    private Integer sort;
    /**
     * 备注
     */
    private String remark;
    /**
     * 区域Id
     */
    private String areaId;
    /**
     * 站点Id
     */
    private Long siteId;
    /**
     * 站点编码
     */
    private String siteCode;
    /**
     * 站点名称
     */
    private String siteName;
    /**
     * 图标
     */
    private String icon;
    /**
     * 维度
     */
    private String latitude;
    /**
     * 经度
     */
    private String longitude;
    /**
     * 接入类型 (area.区域,site.站点)
     */
    private String type;
    /**
     * 接入开通时间
     */
    private Date accessTime;
    /**
     * 描述内容
     */
    private String content;
    /**
     * 区域接入系统信息
     */
    private List<AccessSystemEntity> accessSystemList=new ArrayList<>();;
    public List<AccessSystemEntity> getAccessSystemList(){
        return accessSystemList;
    }

    public void setAccessSystemList(List<AccessSystemEntity> accessSystemList){
        this.accessSystemList = accessSystemList;
    }
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof AccessEntity) {
            AccessEntity tmp = (AccessEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
        this.areaName = "";
        this.areaCode = "";
        this.bigPath = "";
        this.tag = "";
        this.sort = 0;
        this.remark = "";
        this.areaId = "";
        this.siteId = null;
        this.siteCode = "";
        this.siteName = "";
        this.icon = "";
        this.latitude = "";
        this.longitude = "";
        this.type = "类型";
        this.accessTime = null;
        this.content = "";
    }
}