package com.xkrs.model.entity;

import javax.persistence.*;

/**
 * @Author: XinYi Song
 * @Date: 2021/12/13 16:54
 * 商家信息
 */
@Entity
@Table(name="business")
public class BusinessEntity {
    /**
     * 指定主键，建立自增序列，主键值取自序列
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    //@SequenceGenerator(name = "business_seq_gen", sequenceName = "business_id_seq",allocationSize = 1)
    private Integer id;

    /**
     * 商户名称
     */
    @Column(length = 85, columnDefinition = "varchar(85)")
    private String businessName;

    /**
     * 省
     */
    @Column(length = 32, columnDefinition = "varchar(32)")
    private String businessPro;

    /**
     * 市
     */
    @Column(length = 32, columnDefinition = "varchar(32)")
    private String businessCity;

    /**
     * 区
     */
    private String businessCountry;

    /**
     * 详细地址
     */
    private String businessAddress;

    /**
     * 商家电话
     */
    @Column(length = 85, columnDefinition = "varchar(85)")
    private String businessPhone;

    /**
     * 商家图片
     */
    private String businessPhoto;

    /**
     * 营业执照
     */
    private String businessLicense;

    /**
     * 商家折扣
     */
    private Double businessDiscount;

    /**
     * 商家状态（入驻默认0，审核通过1  审核不通过2）
     */
    @Column(length = 32, columnDefinition = "varchar(32)")
    private String businessType;

    /**
     * 团长识别码
     */
    @Column(length = 32, columnDefinition = "varchar(32)")
    private String headIdentifier;

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

    /**
     * 合同路径
     */
    private String contractPath;

    /**
     * 商家入驻时间
     */
    @Column(length = 65, columnDefinition = "varchar(65)")
    private String settleInTime;

    public BusinessEntity() {
    }

    public BusinessEntity(Integer id, String businessName, String businessPro, String businessCity, String businessCountry, String businessAddress, String businessPhone, String businessPhoto, String businessLicense, Double businessDiscount, String businessType, String headIdentifier, Integer businessId, String contractPath, String settleInTime) {
        this.id = id;
        this.businessName = businessName;
        this.businessPro = businessPro;
        this.businessCity = businessCity;
        this.businessCountry = businessCountry;
        this.businessAddress = businessAddress;
        this.businessPhone = businessPhone;
        this.businessPhoto = businessPhoto;
        this.businessLicense = businessLicense;
        this.businessDiscount = businessDiscount;
        this.businessType = businessType;
        this.headIdentifier = headIdentifier;
        this.businessId = businessId;
        this.contractPath = contractPath;
        this.settleInTime = settleInTime;
    }

    public Integer getId() {
        return id;
    }

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

    public String getBusinessName() {
        return businessName;
    }

    public void setBusinessName(String businessName) {
        this.businessName = businessName;
    }

    public String getBusinessPro() {
        return businessPro;
    }

    public void setBusinessPro(String businessPro) {
        this.businessPro = businessPro;
    }

    public String getBusinessCity() {
        return businessCity;
    }

    public void setBusinessCity(String businessCity) {
        this.businessCity = businessCity;
    }

    public String getBusinessCountry() {
        return businessCountry;
    }

    public void setBusinessCountry(String businessCountry) {
        this.businessCountry = businessCountry;
    }

    public String getBusinessAddress() {
        return businessAddress;
    }

    public void setBusinessAddress(String businessAddress) {
        this.businessAddress = businessAddress;
    }

    public String getBusinessPhone() {
        return businessPhone;
    }

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

    public String getBusinessPhoto() {
        return businessPhoto;
    }

    public void setBusinessPhoto(String businessPhoto) {
        this.businessPhoto = businessPhoto;
    }

    public String getBusinessLicense() {
        return businessLicense;
    }

    public void setBusinessLicense(String businessLicense) {
        this.businessLicense = businessLicense;
    }

    public Double getBusinessDiscount() {
        return businessDiscount;
    }

    public void setBusinessDiscount(Double businessDiscount) {
        this.businessDiscount = businessDiscount;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public String getHeadIdentifier() {
        return headIdentifier;
    }

    public void setHeadIdentifier(String headIdentifier) {
        this.headIdentifier = headIdentifier;
    }

    public Integer getBusinessId() {
        return businessId;
    }

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

    public String getSettleInTime() {
        return settleInTime;
    }

    public void setSettleInTime(String settleInTime) {
        this.settleInTime = settleInTime;
    }

    @Override
    public String toString() {
        return "BusinessEntity{" +
                "id=" + id +
                ", businessName='" + businessName + '\'' +
                ", businessPro='" + businessPro + '\'' +
                ", businessCity='" + businessCity + '\'' +
                ", businessCountry='" + businessCountry + '\'' +
                ", businessAddress='" + businessAddress + '\'' +
                ", businessPhone='" + businessPhone + '\'' +
                ", businessPhoto='" + businessPhoto + '\'' +
                ", businessLicense='" + businessLicense + '\'' +
                ", businessDiscount=" + businessDiscount +
                ", businessType='" + businessType + '\'' +
                ", headIdentifier='" + headIdentifier + '\'' +
                ", businessId=" + businessId +
                ", contractPath='" + contractPath + '\'' +
                ", settleInTime='" + settleInTime + '\'' +
                '}';
    }
}
