package com.sckw.fleet.model.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;

/**
 * @author zk
 * @desc 司机信息导入
 * @date 2023/7/6 0006
 */
@Data
public class KwfDriverExcelImportDto implements Serializable {
    private static final long serialVersionUID = 370622351109421619L;

    /**
     * 司机姓名
     */
    @ExcelProperty(index = 0)
    @NotBlank(message = "司机姓名不能为空!")
    @Size(max=10, message = "司机姓名长度不能大于10个字符！")
    private String name;

    /**
     * 手机号码
     */
    @ExcelProperty(index = 1)
    @NotBlank(message = "电话号码不能为空!")
    @Pattern(regexp = "^1[3456789]\\d{9}$", message = "电话号码格式不正确！")
    private String phone;

    /**
     * 身份证号码
     */
    @ExcelProperty(index = 2)
    @NotBlank(message = "司机身份证号不能为空!")
    @Pattern(regexp = "[0-9A-Za-z]{18}", message = "身份证号码格式不正确！")
    private String idcard;
}
