package com.zd.airbottle.domain.dto;

import com.zd.system.api.dto.SysUserDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

@Data
public class QpSupplierDto implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 主键 */
    @ApiModelProperty(value = "数据主键",notes = "数据主键，数据产生修改时由前端带入，新增可忽略")
    private Long id;

    /** 企业名称 */
    @Length(message = "企业名称长度不能超过50")
    @ApiModelProperty(value = "企业名称",required = true)
    @NotBlank(message = "请填写企业名称")
    private String companyName;
    /** 企业简称 */
    @Length(message = "企业简称长度不能超过500")
    @ApiModelProperty(value = "企业简称")
    private String companyShort;
    /** 联系人 */
    @Length(message = "联系人长度不能超过20")
    @ApiModelProperty(value = "联系人",required = true)
    private String contacts;
    /** 手机号码 */
    @Length(message = "手机号码长度不能超过11")
    @ApiModelProperty(value = "手机号码",required = true)
    @Pattern(regexp = "^((13\\d)|(14[5,6,7,9])|(15[^4])|(16[5,6])|(17[0-9])|(18[0-9])|(19[1,8,9]))\\d{8}$", message = "请输入正确的手机号码")
    private String phone;

    /** 经营备案 */
    @ApiModelProperty(value = "经营备案")
    private String businessRecord;
    /** 经营地址 */
    @Length(message = "经营地址长度不能超过200")
    @ApiModelProperty(value = "经营地址")
    private String businessAddress;

    @NotEmpty(message = "请上传资质文件")
    @ApiModelProperty(value = "资质文件")
    private List<QpSupplierCredentialsDto> qpSupplierCredentialsDtos;

    @ApiModelProperty(value = "登录账号")
    private transient SysUserDto sysUserDto;
}
