package com.mortals.xhx.module.care.model;

import java.util.List;
import java.util.List;
import java.util.ArrayList;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.care.model.vo.CareConfigVo;
import com.mortals.xhx.module.care.model.CareConfigTimesEntity;

/**
 * 主动关怀配置实体对象
 *
 * @author zxfei
 * @date 2023-04-09
 */

public class CareConfigEntity extends CareConfigVo {
    private static final long serialVersionUID = 1L;

    /**
     * 站点Id
     */
    private Long siteId;
    /**
     * 站点名称
     */
    private String siteName;
    /**
     * 是否启用该服务(0.否,1.是)
     */
    private Integer used;
    /**
     * 周一是否监测(0.否,1.是)
     */
    private Integer monday;
    /**
     * 周二是否监测(0.否,1.是)
     */
    private Integer tuesday;
    /**
     * 周三是否监测(0.否,1.是)
     */
    private Integer wednesday;
    /**
     * 周四是否监测(0.否,1.是)
     */
    private Integer thursday;
    /**
     * 周五是否监测(0.否,1.是)
     */
    private Integer friday;
    /**
     * 周六是否监测(0.否,1.是)
     */
    private Integer saturday;
    /**
     * 周日是否监测(0.否,1.是)
     */
    private Integer sunday;
    /**
     * 单日服务最大人数设置
     */
    private Integer maxServicePersonNum;
    /**
     * 服务阈值设置
     */
    @Excel(name = "服务阈值设置，单位分钟")
    private Long serviceThreshold;
    /**
     * 累计服务频次预警
     */
    private Integer alertServiceNum;
    /**
     * 消息发送对象(办事群众.办事群众,管理员.管理员)
     */
    private String msgRecipients;
    /**
     * 备注
     */
    private String remark;

    /**
     * 主动关怀时间段信息
     */
    private List<CareConfigTimesEntity> careConfigTimesList = new ArrayList<>();
    ;


    public CareConfigEntity() {
    }

    /**
     * 获取 站点Id
     *
     * @return Long
     */
    public Long getSiteId() {
        return siteId;
    }

    /**
     * 设置 站点Id
     *
     * @param siteId
     */
    public void setSiteId(Long siteId) {
        this.siteId = siteId;
    }

    /**
     * 获取 站点名称
     *
     * @return String
     */
    public String getSiteName() {
        return siteName;
    }

    /**
     * 设置 站点名称
     *
     * @param siteName
     */
    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    /**
     * 获取 是否启用该服务(0.否,1.是)
     *
     * @return Integer
     */
    public Integer getUsed() {
        return used;
    }

    /**
     * 设置 是否启用该服务(0.否,1.是)
     *
     * @param used
     */
    public void setUsed(Integer used) {
        this.used = used;
    }

    /**
     * 获取 周一是否监测(0.否,1.是)
     *
     * @return Integer
     */
    public Integer getMonday() {
        return monday;
    }

    /**
     * 设置 周一是否监测(0.否,1.是)
     *
     * @param monday
     */
    public void setMonday(Integer monday) {
        this.monday = monday;
    }

    /**
     * 获取 周二是否监测(0.否,1.是)
     *
     * @return Integer
     */
    public Integer getTuesday() {
        return tuesday;
    }

    /**
     * 设置 周二是否监测(0.否,1.是)
     *
     * @param tuesday
     */
    public void setTuesday(Integer tuesday) {
        this.tuesday = tuesday;
    }

    /**
     * 获取 周三是否监测(0.否,1.是)
     *
     * @return Integer
     */
    public Integer getWednesday() {
        return wednesday;
    }

    /**
     * 设置 周三是否监测(0.否,1.是)
     *
     * @param wednesday
     */
    public void setWednesday(Integer wednesday) {
        this.wednesday = wednesday;
    }

    /**
     * 获取 周四是否监测(0.否,1.是)
     *
     * @return Integer
     */
    public Integer getThursday() {
        return thursday;
    }

    /**
     * 设置 周四是否监测(0.否,1.是)
     *
     * @param thursday
     */
    public void setThursday(Integer thursday) {
        this.thursday = thursday;
    }

    /**
     * 获取 周五是否监测(0.否,1.是)
     *
     * @return Integer
     */
    public Integer getFriday() {
        return friday;
    }

    /**
     * 设置 周五是否监测(0.否,1.是)
     *
     * @param friday
     */
    public void setFriday(Integer friday) {
        this.friday = friday;
    }

    /**
     * 获取 周六是否监测(0.否,1.是)
     *
     * @return Integer
     */
    public Integer getSaturday() {
        return saturday;
    }

    /**
     * 设置 周六是否监测(0.否,1.是)
     *
     * @param saturday
     */
    public void setSaturday(Integer saturday) {
        this.saturday = saturday;
    }

    /**
     * 获取 周日是否监测(0.否,1.是)
     *
     * @return Integer
     */
    public Integer getSunday() {
        return sunday;
    }

    /**
     * 设置 周日是否监测(0.否,1.是)
     *
     * @param sunday
     */
    public void setSunday(Integer sunday) {
        this.sunday = sunday;
    }

    /**
     * 获取 单日服务最大人数设置
     *
     * @return Integer
     */
    public Integer getMaxServicePersonNum() {
        return maxServicePersonNum;
    }

    /**
     * 设置 单日服务最大人数设置
     *
     * @param maxServicePersonNum
     */
    public void setMaxServicePersonNum(Integer maxServicePersonNum) {
        this.maxServicePersonNum = maxServicePersonNum;
    }

    /**
     * 获取 服务阈值设置，单位分钟
     *
     * @return Long
     */
    public Long getServiceThreshold() {
        return serviceThreshold;
    }

    /**
     * 设置 服务阈值设置，单位分钟
     *
     * @param serviceThreshold
     */
    public void setServiceThreshold(Long serviceThreshold) {
        this.serviceThreshold = serviceThreshold;
    }

    /**
     * 获取 累计服务频次预警
     *
     * @return Integer
     */
    public Integer getAlertServiceNum() {
        return alertServiceNum;
    }

    /**
     * 设置 累计服务频次预警
     *
     * @param alertServiceNum
     */
    public void setAlertServiceNum(Integer alertServiceNum) {
        this.alertServiceNum = alertServiceNum;
    }

    /**
     * 获取 消息发送对象(办事群众.办事群众,管理员.管理员)
     *
     * @return String
     */
    public String getMsgRecipients() {
        return msgRecipients;
    }

    /**
     * 设置 消息发送对象(办事群众.办事群众,管理员.管理员)
     *
     * @param msgRecipients
     */
    public void setMsgRecipients(String msgRecipients) {
        this.msgRecipients = msgRecipients;
    }

    /**
     * 获取 备注
     *
     * @return String
     */
    public String getRemark() {
        return remark;
    }

    /**
     * 设置 备注
     *
     * @param remark
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }


    public List<CareConfigTimesEntity> getCareConfigTimesList() {
        return careConfigTimesList;
    }

    public void setCareConfigTimesList(List<CareConfigTimesEntity> careConfigTimesList) {
        this.careConfigTimesList = careConfigTimesList;
    }


    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }

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

    public String toString() {
        StringBuilder sb = new StringBuilder("");
        sb.append(",siteId:").append(getSiteId());
        sb.append(",siteName:").append(getSiteName());
        sb.append(",used:").append(getUsed());
        sb.append(",monday:").append(getMonday());
        sb.append(",tuesday:").append(getTuesday());
        sb.append(",wednesday:").append(getWednesday());
        sb.append(",thursday:").append(getThursday());
        sb.append(",friday:").append(getFriday());
        sb.append(",saturday:").append(getSaturday());
        sb.append(",sunday:").append(getSunday());
        sb.append(",maxServicePersonNum:").append(getMaxServicePersonNum());
        sb.append(",serviceThreshold:").append(getServiceThreshold());
        sb.append(",alertServiceNum:").append(getAlertServiceNum());
        sb.append(",msgRecipients:").append(getMsgRecipients());
        sb.append(",remark:").append(getRemark());
        return sb.toString();
    }

    public void initAttrValue() {

        this.siteId = null;

        this.siteName = "";

        this.used = 0;

        this.monday = 0;

        this.tuesday = 0;

        this.wednesday = 0;

        this.thursday = 0;

        this.friday = 0;

        this.saturday = 0;

        this.sunday = 0;

        this.maxServicePersonNum = 0;

        this.serviceThreshold = 0L;

        this.alertServiceNum = 10;

        this.msgRecipients = "管理员";

        this.remark = "";
    }
}