package com.sunxung.factoring.entity.customerinformation;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sunxung.factoring.entity.BaseEntity;
import org.hibernate.validator.constraints.Length;

import java.util.Date;
import java.util.List;

/**
 * @author liutao
 * 企业客户信息表（核心企业和供应商）
 */
@TableName("enterprise_customer_info")
public class Customer extends BaseEntity {
    /**
     * 企业名称
     */
    @TableField("enterprise_name")
    private String enterpriseName;
    /**
     * 统一社会信用代码
     */
    @TableField("socialCreditCode")
    private String socialCreditCode;
    /**
     * 二网认证状态 0：未认证 1：已认证
     */
    @TableField("auth_status")
    private Integer authStatus;
    /**
     * 二网认证链接
     */
    @TableField("auth_url")
    private String authUrl;
    /**
     * 二网认证短链接
     */
    @TableField("short_auth_url")
    private String shortAuthUrl;

    /**
     * 短连接的生成日期
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField("short_auth_url_create")
    private Date shortAuthUrlCreate;
    /**
     * 二网在法大大上的客户编号
     */
    @TableField("fdd_customer_id")
    private String fddCustomerId;
    /**
     * 同步时间
     */
    @TableField("synchronize_time")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date synchronizeTime;
    /**
     * 核心企业或供应商 0：核心企业 1：供应商
     */
    @TableField("supplier")
    private Boolean supplier;
    /**
     * 注册地址
     */
    @TableField("address")
    private String address;
    /**
     * 注册电话
     */
    @TableField("phone_number")
    private String phoneNumber;
    /**
     * 综合贸易平台账号
     */
    @TableField(exist = false)
    @Length(max = 50,min = 1,message = "贸易平台账户名过长，请重新输入！")
    private String account;
    /**
     * 综合贸易平台密码
     */
    @TableField(exist = false)
    private String password;

    @TableField(exist = false)
    private List<SupplierBankCardInfo>  banks;

    /**
     * 标识是否可以删除
     */
    @TableField(exist = false)
    private Boolean deleteFlag;

    public Customer() {
    }

    public Customer(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }

    public List<SupplierBankCardInfo> getBanks() {
        return banks;
    }

    public void setBanks(List<SupplierBankCardInfo> banks) {
        this.banks = banks;
    }

    public String getEnterpriseName() {
        return enterpriseName;
    }

    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }

    public String getSocialCreditCode() {
        return socialCreditCode;
    }

    public void setSocialCreditCode(String socialCreditCode) {
        this.socialCreditCode = socialCreditCode;
    }

    public Integer getAuthStatus() {
        return authStatus;
    }

    public void setAuthStatus(Integer authStatus) {
        this.authStatus = authStatus;
    }

    public String getAuthUrl() {
        return authUrl;
    }

    public void setAuthUrl(String authUrl) {
        this.authUrl = authUrl;
    }

    public String getFddCustomerId() {
        return fddCustomerId;
    }

    public void setFddCustomerId(String fddCustomerId) {
        this.fddCustomerId = fddCustomerId;
    }

    public Date getSynchronizeTime() {
        return synchronizeTime;
    }

    public void setSynchronizeTime(Date synchronizeTime) {
        this.synchronizeTime = synchronizeTime;
    }

    public Boolean getSupplier() {
        return supplier;
    }

    public void setSupplier(Boolean supplier) {
        this.supplier = supplier;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getShortAuthUrl() {
        return shortAuthUrl;
    }

    public void setShortAuthUrl(String shortAuthUrl) {
        this.shortAuthUrl = shortAuthUrl;
    }

    public Date getShortAuthUrlCreate() {
        return shortAuthUrlCreate;
    }

    public void setShortAuthUrlCreate(Date shortAuthUrlCreate) {
        this.shortAuthUrlCreate = shortAuthUrlCreate;
    }

    public Boolean getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Boolean deleteFlag) {
        this.deleteFlag = deleteFlag;
    }
}
