package com.ruoyi.app.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

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

/**
 * 供应商对象 supplier
 * 
 * @author coede
 * @date 2025-03-19
 */
public class Supplier extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 供应商编号 */
    @Excel(name = "供应商编号")
    private String supplierNo;

    /** 供应商名称 */
    @Excel(name = "供应商名称")
    private String supplierName;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String phone;

    /** 供应类型：1-猪、3-羊、5-牛，默认猪 */
    @Excel(name = "供应类型：1-猪、3-羊、5-牛，默认猪")
    private String supplySpecies;

    /** 经营地点 */
    @Excel(name = "经营地点")
    private String businessPlace;

    /** 产地：三选一：1-本市、2-市外、3-省外，默认本市 */
    @Excel(name = "产地：三选一：1-本市、2-市外、3-省外，默认本市")
    private String originPlace;

    /** 所在省市县 */
    @Excel(name = "所在省市县")
    private String region;

    /** 评价 */
    @Excel(name = "评价")
    private String evaluate;

    /** 黑名单：1-是、0-否 */
    @Excel(name = "黑名单：1-是、0-否")
    private String inBlacklist;

    /** 删除标志：0-存在 2-删除 */
    private String delFlag;

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

    public Long getId() 
    {
        return id;
    }

    public void setSupplierNo(String supplierNo)
    {
        this.supplierNo = supplierNo;
    }

    @NotBlank(message = "供应商编号不能为空")
    @Size(min = 1, max = 3, message = "供应商名称输入超出最大长度限制（3位）")
    public String getSupplierNo()
    {
        return supplierNo;
    }

    public void setSupplierName(String supplierName) 
    {
        this.supplierName = supplierName;
    }

    @NotBlank(message = "供应商名称不能为空")
    @Size(min = 1, max = 30, message = "供应商名称输入超出最大长度限制（30位）")
    public String getSupplierName() 
    {
        return supplierName;
    }

    public void setphone(String phone) 
    {
        this.phone = phone;
    }

    @NotBlank(message = "联系电话不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "联系电话格式输入错误")
    public String getphone() 
    {
        return phone;
    }

    public void setSupplySpecies(String supplySpecies) 
    {
        this.supplySpecies = supplySpecies;
    }

    @NotBlank(message = "供应类型不能为空")
    public String getSupplySpecies() 
    {
        return supplySpecies;
    }

    public void setBusinessPlace(String businessPlace) 
    {
        this.businessPlace = businessPlace;
    }

    @Size(min = 0, max = 50, message = "经营地点输入超出最大长度限制（50位）")
    public String getBusinessPlace() 
    {
        return businessPlace;
    }

    public void setOriginPlace(String originPlace) 
    {
        this.originPlace = originPlace;
    }

    public String getOriginPlace() 
    {
        return originPlace;
    }

    public void setRegion(String region) 
    {
        this.region = region;
    }

    public String getRegion() 
    {
        return region;
    }

    public void setEvaluate(String evaluate) 
    {
        this.evaluate = evaluate;
    }
    @NotBlank(message = "评价不能为空")
    public String getEvaluate() 
    {
        return evaluate;
    }

    public void setInBlacklist(String inBlacklist) 
    {
        this.inBlacklist = inBlacklist;
    }

    @NotBlank(message = "黑名单状态不能为空")
    public String getInBlacklist() 
    {
        return inBlacklist;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("supplierNo", getSupplierNo())
            .append("supplierName", getSupplierName())
            .append("phone", getphone())
            .append("supplySpecies", getSupplySpecies())
            .append("businessPlace", getBusinessPlace())
            .append("originPlace", getOriginPlace())
            .append("region", getRegion())
            .append("evaluate", getEvaluate())
            .append("remark", getRemark())
            .append("inBlacklist", getInBlacklist())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
