package com.mortals.xhx.module.window.model;
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.window.model.vo.WindowOwnerVo;
import lombok.Data;
/**
 * 窗口负责人实体对象
 *
 * @author zxfei
 * @date 2024-04-26
 */
@Data
public class WindowOwnerEntity extends WindowOwnerVo {
    private static final long serialVersionUID = 1L;

    /**
     * 部门id号
     */
    private Long deptId;
    /**
     * 部门名称
     */
    private String deptName;
    /**
     * 所属大厅
     */
    private Long salaId;
    /**
     * 所属大厅名称
     */
    private String salaName;
    /**
     * 窗口负责人id
     */
    private Long staffId;
    /**
     * 窗口负责人名称
     */
    private String staffName;
    /**
     * 工号
     */
    private String number;
    /**
     * 电话号码
     */
    private String phone;
    /**
     * 负责窗口数量
     */
    private Integer windowCount;
    /**
     * 备注
     */
    private String remark;
    /**
     * 角色类型（首席代表，运维，审核，其他）
     */
    private Integer roleType;
    /**
     * 是否允许巡检
     */
    private Integer inspect;
    /**
     * 管辖人员
     */
    private String staffIds;

    /**
     * 窗口负责人详细信息
     */
    private List<WindowOwnerDetailEntity> windowOwnerDetailList=new ArrayList<>();;
    public List<WindowOwnerDetailEntity> getWindowOwnerDetailList(){
        return windowOwnerDetailList;
    }

    public void setWindowOwnerDetailList(List<WindowOwnerDetailEntity> windowOwnerDetailList){
        this.windowOwnerDetailList = windowOwnerDetailList;
    }

    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof WindowOwnerEntity) {
            WindowOwnerEntity tmp = (WindowOwnerEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
        this.deptId = null;
        this.deptName = "";
        this.salaId = null;
        this.salaName = "";
        this.staffId = null;
        this.staffName = "";
        this.number = "";
        this.phone = "";
        this.windowCount = 0;
        this.remark = "";
        this.roleType = 0;
        this.inspect = 0;
        this.staffIds = "";
    }
}