package com.yuchen.saas.park.api.dto.people;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author zhouhanwei
 * @create 2023/3/20 15:21
 */
@ApiModel()
@Data
public class ExternalExpressPeopleInfoSaveDTO {


    /**
     * 项目id
     */
    @ApiModelProperty(name = "projectId", value = "项目id")
    @NotNull(message = "项目id不能为空")
    private Long projectId;



    /**
     * 人员类型（14.家政人员15.装修人员)
     */
    @ApiModelProperty(name = "peopleType", value = "人员类型（13.家政人员19.装修人员)")
    @NotNull(message = "人员类型不能为空")
    @Min(value = 13,message = "人员类型有误")
    @Max(value = 19,message = "人员类型有误")
    private Integer peopleType;

    /**
     * 名字
     */
    @ApiModelProperty(name = "userName", value = "名字")
    @NotBlank(message = "名字不能为空")
    private String userName;


    /**
     * 性别
     */
    @ApiModelProperty(name = "sex", value = "性别")
    private String sex;

    /**
     * 身份ID
     */
    @ApiModelProperty(name = "idCard", value = "身份ID")
    @NotBlank(message = "身份ID不能为空")
    private String idCard;
    /**
     * 联系方式
     */
    @ApiModelProperty(name = "phone", value = "联系方式")
    @NotBlank(message = "联系方式不能为空")
    private String phone;

    /**
     * 证件类型
     */
    @ApiModelProperty(name = "idType", value = "证件类型")
    @NotBlank(message = "证件类型不能为空")
    private String idType;
    /**
     * 证件起始日期
     */
    @ApiModelProperty(name = "idStartDate", value = "证件起始日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date idStartDate;
    /**
     * 证件结束日期
     */
    @ApiModelProperty(name = "idEndDate", value = "证件结束日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date idEndDate;
    /**
     * 人脸图片路径
     */
    @ApiModelProperty(name = "faceImgSrc", value = "人脸图片路径")
    @NotBlank(message = "人脸图片路径不能为空")
    private String faceImgSrc;

    /**
     * 证件照片
     */
    @ApiModelProperty(name = "idPhoto", value = "证件照片")
    @NotBlank(message = "人证件照片路径不能为空")
    private String idPhoto;

    /**
     * 第三方平台（1：饿了吗，2：美团，3：）
     */
    @ApiModelProperty(name = "thirdType", value = "第三方平台（1：饿了吗，2：美团，3：）")
    private Integer thirdType;
}
