package com.ssm.manage.entity;

import java.io.Serializable;
import javax.persistence.*;

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

    /**
     * 收银单ID
     */
    @Column(name = "cash_id")
    private Long cashId;

    /**
     * 通联交易单号
     */
    private String trxid;

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

    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;
    }

    /**
     * 获取收银单ID
     *
     * @return cash_id - 收银单ID
     */
    public Long getCashId() {
        return cashId;
    }

    /**
     * 设置收银单ID
     *
     * @param cashId 收银单ID
     */
    public void setCashId(Long cashId) {
        this.cashId = cashId;
    }

    /**
     * 获取通联交易单号
     *
     * @return trxid - 通联交易单号
     */
    public String getTrxid() {
        return trxid;
    }

    /**
     * 设置通联交易单号
     *
     * @param trxid 通联交易单号
     */
    public void setTrxid(String trxid) {
        this.trxid = trxid;
    }

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

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

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AllinpayCashList other = (AllinpayCashList) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCashId() == null ? other.getCashId() == null : this.getCashId().equals(other.getCashId()))
            && (this.getTrxid() == null ? other.getTrxid() == null : this.getTrxid().equals(other.getTrxid()))
            && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCashId() == null) ? 0 : getCashId().hashCode());
        result = prime * result + ((getTrxid() == null) ? 0 : getTrxid().hashCode());
        result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().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(", cashId=").append(cashId);
        sb.append(", trxid=").append(trxid);
        sb.append(", storeId=").append(storeId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}