package com.ssm.manage.entity;

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

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

@Table(name = "repay_list")
public class RepayList implements Serializable {
    @Transient
    @Getter
    @Setter
    private int isSendSms;
    /**
     * 主键ID
     */
    @Id
    private Long id;

    /**
     * 还款单据号
     */
    @Column(name = "repay_num")
    private String repayNum;

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

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

    /**
     * 会员编码
     */
    @Column(name = "member_id")
    private Long memberId;

    /**
     * 会员名称
     */
    @Column(name = "member_name")
    private String memberName;

    /**
     * 会员身份证号
     */
    @Column(name = "member_identity_card")
    private String memberIdentityCard;

    /**
     * 手机
     */
    @Column(name = "mobile_phone")
    private String mobilePhone;

    /**
     * 还款日期
     */
    @Column(name = "repay_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date repayDate;

    /**
     * 还款金额
     */
    @Column(name = "repay_money")
    private BigDecimal repayMoney;

    /**
     * 欠款金额
     */
    @Column(name = "debt_money")
    private BigDecimal debtMoney;

    /**
     * 支付金额
     */
    @Column(name = "pay_money")
    private BigDecimal payMoney;

    /**
     * 状态（0:正常/1：作废）
     */
    @Column(name = "is_cancel")
    private Integer isCancel;

    /**
     * 作废时间
     */
    @Column(name = "cancel_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date cancelDate;

    /**
     * 作废人ID
     */
    @Column(name = "cancel_id")
    private Long cancelId;

    /**
     * 作废人名称
     */
    @Column(name = "cancel_by")
    private String cancelBy;

    /**
     * 录单人ID
     */
    @Column(name = "input_id")
    private Long inputId;

    /**
     * 录单人名称
     */
    @Column(name = "input_by")
    private String inputBy;

    /**
     * 补单时间
     */
    @Column(name = "addition_date")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date additionDate;

    /**
     * 是否补单0:不是/1:是
     */
    @Column(name = "is_addition")
    private Integer isAddition;

    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 repay_num - 还款单据号
     */
    public String getRepayNum() {
        return repayNum;
    }

    /**
     * 设置还款单据号
     *
     * @param repayNum 还款单据号
     */
    public void setRepayNum(String repayNum) {
        this.repayNum = repayNum;
    }

    /**
     * 获取门店编码
     *
     * @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 member_id - 会员编码
     */
    public Long getMemberId() {
        return memberId;
    }

    /**
     * 设置会员编码
     *
     * @param memberId 会员编码
     */
    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    /**
     * 获取会员名称
     *
     * @return member_name - 会员名称
     */
    public String getMemberName() {
        return memberName;
    }

    /**
     * 设置会员名称
     *
     * @param memberName 会员名称
     */
    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    /**
     * 获取会员身份证号
     *
     * @return member_identity_card - 会员身份证号
     */
    public String getMemberIdentityCard() {
        return memberIdentityCard;
    }

    /**
     * 设置会员身份证号
     *
     * @param memberIdentityCard 会员身份证号
     */
    public void setMemberIdentityCard(String memberIdentityCard) {
        this.memberIdentityCard = memberIdentityCard;
    }

    /**
     * 获取手机
     *
     * @return mobile_phone - 手机
     */
    public String getMobilePhone() {
        return mobilePhone;
    }

    /**
     * 设置手机
     *
     * @param mobilePhone 手机
     */
    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    /**
     * 获取还款日期
     *
     * @return repay_date - 还款日期
     */
    public Date getRepayDate() {
        return repayDate;
    }

    /**
     * 设置还款日期
     *
     * @param repayDate 还款日期
     */
    public void setRepayDate(Date repayDate) {
        this.repayDate = repayDate;
    }

    /**
     * 获取还款金额
     *
     * @return repay_money - 还款金额
     */
    public BigDecimal getRepayMoney() {
        return repayMoney;
    }

    /**
     * 设置还款金额
     *
     * @param repayMoney 还款金额
     */
    public void setRepayMoney(BigDecimal repayMoney) {
        this.repayMoney = repayMoney;
    }

    /**
     * 获取欠款金额
     *
     * @return debt_money - 欠款金额
     */
    public BigDecimal getDebtMoney() {
        return debtMoney;
    }

    /**
     * 设置欠款金额
     *
     * @param debtMoney 欠款金额
     */
    public void setDebtMoney(BigDecimal debtMoney) {
        this.debtMoney = debtMoney;
    }

    /**
     * 获取支付金额
     *
     * @return pay_money - 支付金额
     */
    public BigDecimal getPayMoney() {
        return payMoney;
    }

    /**
     * 设置支付金额
     *
     * @param payMoney 支付金额
     */
    public void setPayMoney(BigDecimal payMoney) {
        this.payMoney = payMoney;
    }

    /**
     * 获取状态（0:正常/1：作废）
     *
     * @return is_cancel - 状态（0:正常/1：作废）
     */
    public Integer getIsCancel() {
        return isCancel;
    }

    /**
     * 设置状态（0:正常/1：作废）
     *
     * @param isCancel 状态（0:正常/1：作废）
     */
    public void setIsCancel(Integer isCancel) {
        this.isCancel = isCancel;
    }

    /**
     * 获取作废时间
     *
     * @return cancel_date - 作废时间
     */
    public Date getCancelDate() {
        return cancelDate;
    }

    /**
     * 设置作废时间
     *
     * @param cancelDate 作废时间
     */
    public void setCancelDate(Date cancelDate) {
        this.cancelDate = cancelDate;
    }

    /**
     * 获取作废人ID
     *
     * @return cancel_id - 作废人ID
     */
    public Long getCancelId() {
        return cancelId;
    }

    /**
     * 设置作废人ID
     *
     * @param cancelId 作废人ID
     */
    public void setCancelId(Long cancelId) {
        this.cancelId = cancelId;
    }

    /**
     * 获取作废人名称
     *
     * @return cancel_by - 作废人名称
     */
    public String getCancelBy() {
        return cancelBy;
    }

    /**
     * 设置作废人名称
     *
     * @param cancelBy 作废人名称
     */
    public void setCancelBy(String cancelBy) {
        this.cancelBy = cancelBy;
    }

    /**
     * 获取录单人ID
     *
     * @return input_id - 录单人ID
     */
    public Long getInputId() {
        return inputId;
    }

    /**
     * 设置录单人ID
     *
     * @param inputId 录单人ID
     */
    public void setInputId(Long inputId) {
        this.inputId = inputId;
    }

    /**
     * 获取录单人名称
     *
     * @return input_by - 录单人名称
     */
    public String getInputBy() {
        return inputBy;
    }

    /**
     * 设置录单人名称
     *
     * @param inputBy 录单人名称
     */
    public void setInputBy(String inputBy) {
        this.inputBy = inputBy;
    }

    /**
     * 获取补单时间
     *
     * @return addition_date - 补单时间
     */
    public Date getAdditionDate() {
        return additionDate;
    }

    /**
     * 设置补单时间
     *
     * @param additionDate 补单时间
     */
    public void setAdditionDate(Date additionDate) {
        this.additionDate = additionDate;
    }

    /**
     * 获取是否补单0:不是/1:是
     *
     * @return is_addition - 是否补单0:不是/1:是
     */
    public Integer getIsAddition() {
        return isAddition;
    }

    /**
     * 设置是否补单0:不是/1:是
     *
     * @param isAddition 是否补单0:不是/1:是
     */
    public void setIsAddition(Integer isAddition) {
        this.isAddition = isAddition;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        RepayList other = (RepayList) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRepayNum() == null ? other.getRepayNum() == null : this.getRepayNum().equals(other.getRepayNum()))
            && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()))
            && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName()))
            && (this.getMemberId() == null ? other.getMemberId() == null : this.getMemberId().equals(other.getMemberId()))
            && (this.getMemberName() == null ? other.getMemberName() == null : this.getMemberName().equals(other.getMemberName()))
            && (this.getMemberIdentityCard() == null ? other.getMemberIdentityCard() == null : this.getMemberIdentityCard().equals(other.getMemberIdentityCard()))
            && (this.getMobilePhone() == null ? other.getMobilePhone() == null : this.getMobilePhone().equals(other.getMobilePhone()))
            && (this.getRepayDate() == null ? other.getRepayDate() == null : this.getRepayDate().equals(other.getRepayDate()))
            && (this.getRepayMoney() == null ? other.getRepayMoney() == null : this.getRepayMoney().equals(other.getRepayMoney()))
            && (this.getDebtMoney() == null ? other.getDebtMoney() == null : this.getDebtMoney().equals(other.getDebtMoney()))
            && (this.getPayMoney() == null ? other.getPayMoney() == null : this.getPayMoney().equals(other.getPayMoney()))
            && (this.getIsCancel() == null ? other.getIsCancel() == null : this.getIsCancel().equals(other.getIsCancel()))
            && (this.getCancelDate() == null ? other.getCancelDate() == null : this.getCancelDate().equals(other.getCancelDate()))
            && (this.getCancelId() == null ? other.getCancelId() == null : this.getCancelId().equals(other.getCancelId()))
            && (this.getCancelBy() == null ? other.getCancelBy() == null : this.getCancelBy().equals(other.getCancelBy()))
            && (this.getInputId() == null ? other.getInputId() == null : this.getInputId().equals(other.getInputId()))
            && (this.getInputBy() == null ? other.getInputBy() == null : this.getInputBy().equals(other.getInputBy()))
            && (this.getAdditionDate() == null ? other.getAdditionDate() == null : this.getAdditionDate().equals(other.getAdditionDate()))
            && (this.getIsAddition() == null ? other.getIsAddition() == null : this.getIsAddition().equals(other.getIsAddition()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRepayNum() == null) ? 0 : getRepayNum().hashCode());
        result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
        result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode());
        result = prime * result + ((getMemberId() == null) ? 0 : getMemberId().hashCode());
        result = prime * result + ((getMemberName() == null) ? 0 : getMemberName().hashCode());
        result = prime * result + ((getMemberIdentityCard() == null) ? 0 : getMemberIdentityCard().hashCode());
        result = prime * result + ((getMobilePhone() == null) ? 0 : getMobilePhone().hashCode());
        result = prime * result + ((getRepayDate() == null) ? 0 : getRepayDate().hashCode());
        result = prime * result + ((getRepayMoney() == null) ? 0 : getRepayMoney().hashCode());
        result = prime * result + ((getDebtMoney() == null) ? 0 : getDebtMoney().hashCode());
        result = prime * result + ((getPayMoney() == null) ? 0 : getPayMoney().hashCode());
        result = prime * result + ((getIsCancel() == null) ? 0 : getIsCancel().hashCode());
        result = prime * result + ((getCancelDate() == null) ? 0 : getCancelDate().hashCode());
        result = prime * result + ((getCancelId() == null) ? 0 : getCancelId().hashCode());
        result = prime * result + ((getCancelBy() == null) ? 0 : getCancelBy().hashCode());
        result = prime * result + ((getInputId() == null) ? 0 : getInputId().hashCode());
        result = prime * result + ((getInputBy() == null) ? 0 : getInputBy().hashCode());
        result = prime * result + ((getAdditionDate() == null) ? 0 : getAdditionDate().hashCode());
        result = prime * result + ((getIsAddition() == null) ? 0 : getIsAddition().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(", repayNum=").append(repayNum);
        sb.append(", storeId=").append(storeId);
        sb.append(", storeName=").append(storeName);
        sb.append(", memberId=").append(memberId);
        sb.append(", memberName=").append(memberName);
        sb.append(", memberIdentityCard=").append(memberIdentityCard);
        sb.append(", mobilePhone=").append(mobilePhone);
        sb.append(", repayDate=").append(repayDate);
        sb.append(", repayMoney=").append(repayMoney);
        sb.append(", debtMoney=").append(debtMoney);
        sb.append(", payMoney=").append(payMoney);
        sb.append(", isCancel=").append(isCancel);
        sb.append(", cancelDate=").append(cancelDate);
        sb.append(", cancelId=").append(cancelId);
        sb.append(", cancelBy=").append(cancelBy);
        sb.append(", inputId=").append(inputId);
        sb.append(", inputBy=").append(inputBy);
        sb.append(", additionDate=").append(additionDate);
        sb.append(", isAddition=").append(isAddition);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}