package com.ssm.manage.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;

@Table(name = "store_month_task")
public class StoreMonthTask implements Serializable {
    /**
     * 主键ID
     */
    @Id
    private Long id;

    /**
     * 门店编码
     */
    @Column(name = "store_id")
    private Long storeId;

    /**
     * 门店名称
     */
    @Column(name = "store_name")
    private String storeName;

    /**
     * 充值任务
     */
    @Column(name = "recharge_task")
    private BigDecimal rechargeTask;

    /**
     * 疗程任务
     */
    @Column(name = "course_task")
    private BigDecimal courseTask;

    /**
     * 服务任务
     */
    @Column(name = "store_cash_task")
    private BigDecimal storeCashTask;

    /**
     * 设置时间
     */
    @DateTimeFormat(pattern = "yyyy-MM")
    @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
    private Date date;

    /**
     * 0:未启用/1:启用
     */
    private Integer state;

    private static final long serialVersionUID = 1L;

    /**
     * 获取主键ID
     *
     * @return id - 主键ID
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置主键ID
     *
     * @param id 主键ID
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取门店编码
     *
     * @return store_id - 门店编码
     */
    public Long getStoreId() {
        return storeId;
    }

    /**
     * 设置门店编码
     *
     * @param storeId 门店编码
     */
    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    /**
     * 获取门店名称
     *
     * @return store_name - 门店名称
     */
    public String getStoreName() {
        return storeName;
    }

    /**
     * 设置门店名称
     *
     * @param storeName 门店名称
     */
    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    /**
     * 获取充值任务
     *
     * @return recharge_task - 充值任务
     */
    public BigDecimal getRechargeTask() {
        return rechargeTask;
    }

    /**
     * 设置充值任务
     *
     * @param rechargeTask 充值任务
     */
    public void setRechargeTask(BigDecimal rechargeTask) {
        this.rechargeTask = rechargeTask;
    }

    /**
     * 获取疗程任务
     *
     * @return course_task - 疗程任务
     */
    public BigDecimal getCourseTask() {
        return courseTask;
    }

    /**
     * 设置疗程任务
     *
     * @param courseTask 疗程任务
     */
    public void setCourseTask(BigDecimal courseTask) {
        this.courseTask = courseTask;
    }

    /**
     * 获取服务任务
     *
     * @return store_cash_task - 服务任务
     */
    public BigDecimal getStoreCashTask() {
        return storeCashTask;
    }

    /**
     * 设置服务任务
     *
     * @param storeCashTask 服务任务
     */
    public void setStoreCashTask(BigDecimal storeCashTask) {
        this.storeCashTask = storeCashTask;
    }

    /**
     * 获取设置时间
     *
     * @return date - 设置时间
     */
    public Date getDate() {
        return date;
    }

    /**
     * 设置设置时间
     *
     * @param date 设置时间
     */
    public void setDate(Date date) {
        this.date = date;
    }

    /**
     * 获取0:未启用/1:启用
     *
     * @return state - 0:未启用/1:启用
     */
    public Integer getState() {
        return state;
    }

    /**
     * 设置0:未启用/1:启用
     *
     * @param state 0:未启用/1:启用
     */
    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        StoreMonthTask other = (StoreMonthTask) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()))
            && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName()))
            && (this.getRechargeTask() == null ? other.getRechargeTask() == null : this.getRechargeTask().equals(other.getRechargeTask()))
            && (this.getCourseTask() == null ? other.getCourseTask() == null : this.getCourseTask().equals(other.getCourseTask()))
            && (this.getStoreCashTask() == null ? other.getStoreCashTask() == null : this.getStoreCashTask().equals(other.getStoreCashTask()))
            && (this.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
        result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode());
        result = prime * result + ((getRechargeTask() == null) ? 0 : getRechargeTask().hashCode());
        result = prime * result + ((getCourseTask() == null) ? 0 : getCourseTask().hashCode());
        result = prime * result + ((getStoreCashTask() == null) ? 0 : getStoreCashTask().hashCode());
        result = prime * result + ((getDate() == null) ? 0 : getDate().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", storeId=").append(storeId);
        sb.append(", storeName=").append(storeName);
        sb.append(", rechargeTask=").append(rechargeTask);
        sb.append(", courseTask=").append(courseTask);
        sb.append(", storeCashTask=").append(storeCashTask);
        sb.append(", date=").append(date);
        sb.append(", state=").append(state);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}