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

import com.mortals.xhx.module.holiday.model.vo.HolidayVo;

import java.util.Date;
/**
* 节假日实体对象
*
* @author zxfei
* @date 2022-01-12
*/

public class HolidayEntity extends HolidayVo {
    private static final long serialVersionUID = 1L;

    /**
    * 站点ID
    */
    private Long siteId;
    /**
    * 站点名称
    */
    private String siteName;
    /**
    * 节日名称
    */
    private String name;
    /**
    * 备注
    */
    private String summary;
    /**
    * 年份
    */
    private Integer year;
    /**
    * 开始时间
    */
    private Date startTime;
    /**
    * 结束时间
    */
    private Date endTime;
    /**
    * 是否工作日（0.节假日,1.工作日)
    */
    private Integer workorholiday;



    public HolidayEntity(){}
    /**
    * 获取 站点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;
    }
    /**
    * 获取 节日名称
    * @return String
    */
    public String getName(){
        return name;
    }
    /**
    * 设置 节日名称
    * @param name
    */
    public void setName(String name){
        this.name = name;
    }
    /**
    * 获取 备注
    * @return String
    */
    public String getSummary(){
        return summary;
    }
    /**
    * 设置 备注
    * @param summary
    */
    public void setSummary(String summary){
        this.summary = summary;
    }
    /**
    * 获取 年份
    * @return Integer
    */
    public Integer getYear(){
        return year;
    }
    /**
    * 设置 年份
    * @param year
    */
    public void setYear(Integer year){
        this.year = year;
    }
    /**
    * 获取 开始时间
    * @return Date
    */
    public Date getStartTime(){
        return startTime;
    }
    /**
    * 设置 开始时间
    * @param startTime
    */
    public void setStartTime(Date startTime){
        this.startTime = startTime;
    }
    /**
    * 获取 结束时间
    * @return Date
    */
    public Date getEndTime(){
        return endTime;
    }
    /**
    * 设置 结束时间
    * @param endTime
    */
    public void setEndTime(Date endTime){
        this.endTime = endTime;
    }
    /**
    * 获取 是否工作日（0.节假日,1.工作日)
    * @return Integer
    */
    public Integer getWorkorholiday(){
        return workorholiday;
    }
    /**
    * 设置 是否工作日（0.节假日,1.工作日)
    * @param workorholiday
    */
    public void setWorkorholiday(Integer workorholiday){
        this.workorholiday = workorholiday;
    }




    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof HolidayEntity) {
            HolidayEntity tmp = (HolidayEntity) 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(",name:").append(getName());
        sb.append(",summary:").append(getSummary());
        sb.append(",year:").append(getYear());
        sb.append(",startTime:").append(getStartTime());
        sb.append(",endTime:").append(getEndTime());
        sb.append(",workorholiday:").append(getWorkorholiday());
        return sb.toString();
    }

    public void initAttrValue(){

            this.siteId = null;

            this.siteName = null;

            this.name = null;

            this.summary = null;

            this.year = null;

            this.startTime = null;

            this.endTime = null;

            this.workorholiday = 0;
    }
}