package com.inkasso.factoring.creditmanagement.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;

/**
 * <p>
 * 供应商企业联系人信息
 * </p>
 *
 * @author liutao
 * @since 2023-11-25
 */
@TableName("c_supplier_contact")
public class SupplierContact {

    private static final long serialVersionUID = 1L;


    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 企业联系人姓名
     */
    @NotBlank(message = "企业联系人姓名不能为空！")
    @TableField("contact_name")
    private String contactName;

    /**
     * 企业联系电话
     */
    @NotBlank(message = "企业联系电话不能为空！")
    @TableField("mobile")
    private String mobile;

    /**
     * 电子邮箱
     */
    @Email(message = "电子邮箱格式不正确！")
    @NotBlank(message = "电子邮箱不能为空！")
    @TableField("email")
    private String email;

    /**
     * 供应商企业信息表id
     */
    @TableField("supplier_info_id")
    private Long supplierInfoId;

    /**
     * 短信验证码
     */
    @TableField(exist = false)
    @NotBlank(message = "短信验证码不能为空！")
    @JsonProperty("SMSCode")
    private String SMSCode;

    /**
     * 邮箱验证码
     */
    @TableField(exist = false)
    @NotBlank(message = "邮箱验证码不能为空！")
    private String mailCode;

    public Long getId() {
        return id;
    }

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

    public String getSMSCode() {
        return SMSCode;
    }

    public void setSMSCode(String SMSCode) {
        this.SMSCode = SMSCode;
    }

    public String getMailCode() {
        return mailCode;
    }

    public void setMailCode(String mailCode) {
        this.mailCode = mailCode;
    }

    public String getContactName() {
        return contactName;
    }

    public void setContactName(String contactName) {
        this.contactName = contactName;
    }
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
    public Long getSupplierInfoId() {
        return supplierInfoId;
    }

    public void setSupplierInfoId(Long supplierInfoId) {
        this.supplierInfoId = supplierInfoId;
    }

    @Override
    public String toString() {
        return "CSupplierContact{" +
            "contactName=" + contactName +
            ", mobile=" + mobile +
            ", email=" + email +
            ", supplierInfoId=" + supplierInfoId +
        "}";
    }
}
