package com.xkrs.model.entity;

import javax.persistence.*;

/**
 * @Author: XinYi Song
 * @Date: 2021/12/13 17:43
 */
@Entity
@Table(name="bank_card")
public class BankCardEntity {

    /**
     * 指定主键，建立自增序列，主键值取自序列
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    //@SequenceGenerator(name = "bank_card_seq_gen", sequenceName = "bank_card_id_seq",allocationSize = 1)
    private Integer id;

    /**
     * 银行卡号
     */
    @Column(length = 85, columnDefinition = "varchar(85)")
    private String bankCardNumber;

    /**
     * 开户行
     */
    private String accountBank;

    /**
     * 银行名称
     */
    @Column(length = 65, columnDefinition = "varchar(65)")
    private String bankName;

    /**
     * 商家用户id
     */
    private Integer businessId;

    /**
     * 商家手机号
     */
    @Column(length = 85, columnDefinition = "varchar(85)")
    private String businessPhone;

    public BankCardEntity() {
    }

    public BankCardEntity(Integer id, String bankCardNumber, String accountBank, String bankName, Integer businessId, String businessPhone) {
        this.id = id;
        this.bankCardNumber = bankCardNumber;
        this.accountBank = accountBank;
        this.bankName = bankName;
        this.businessId = businessId;
        this.businessPhone = businessPhone;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getBankCardNumber() {
        return bankCardNumber;
    }

    public void setBankCardNumber(String bankCardNumber) {
        this.bankCardNumber = bankCardNumber;
    }

    public String getAccountBank() {
        return accountBank;
    }

    public void setAccountBank(String accountBank) {
        this.accountBank = accountBank;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public Integer getBusinessId() {
        return businessId;
    }

    public void setBusinessId(Integer businessId) {
        this.businessId = businessId;
    }

    public String getBusinessPhone() {
        return businessPhone;
    }

    public void setBusinessPhone(String businessPhone) {
        this.businessPhone = businessPhone;
    }

    @Override
    public String toString() {
        return "BankCardEntity{" +
                "id=" + id +
                ", bankCardNumber='" + bankCardNumber + '\'' +
                ", accountBank='" + accountBank + '\'' +
                ", bankName='" + bankName + '\'' +
                ", businessId=" + businessId +
                ", businessPhone='" + businessPhone + '\'' +
                '}';
    }
}
