package com.ssm.manage.entity;

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

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

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

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

    /**
     * 日期时间
     */
    private Date date;

    /**
     * 期初
     */
    @Column(name = "start_money")
    private BigDecimal startMoney;

    /**
     * 结存
     */
    @Column(name = "end_money")
    private BigDecimal endMoney;

    /**
     * 1:充值/2:疗程
     */
    private Integer type;

    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 date - 日期时间
     */
    public Date getDate() {
        return date;
    }

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

    /**
     * 获取期初
     *
     * @return start_money - 期初
     */
    public BigDecimal getStartMoney() {
        return startMoney;
    }

    /**
     * 设置期初
     *
     * @param startMoney 期初
     */
    public void setStartMoney(BigDecimal startMoney) {
        this.startMoney = startMoney;
    }

    /**
     * 获取结存
     *
     * @return end_money - 结存
     */
    public BigDecimal getEndMoney() {
        return endMoney;
    }

    /**
     * 设置结存
     *
     * @param endMoney 结存
     */
    public void setEndMoney(BigDecimal endMoney) {
        this.endMoney = endMoney;
    }

    /**
     * 获取1:充值/2:疗程
     *
     * @return type - 1:充值/2:疗程
     */
    public Integer getType() {
        return type;
    }

    /**
     * 设置1:充值/2:疗程
     *
     * @param type 1:充值/2:疗程
     */
    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        NegativeCardDayRecord other = (NegativeCardDayRecord) 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.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate()))
            && (this.getStartMoney() == null ? other.getStartMoney() == null : this.getStartMoney().equals(other.getStartMoney()))
            && (this.getEndMoney() == null ? other.getEndMoney() == null : this.getEndMoney().equals(other.getEndMoney()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()));
    }

    @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 + ((getDate() == null) ? 0 : getDate().hashCode());
        result = prime * result + ((getStartMoney() == null) ? 0 : getStartMoney().hashCode());
        result = prime * result + ((getEndMoney() == null) ? 0 : getEndMoney().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().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(", date=").append(date);
        sb.append(", startMoney=").append(startMoney);
        sb.append(", endMoney=").append(endMoney);
        sb.append(", type=").append(type);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}