package com.ningdatech.carapi.driver.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ningdatech.carapi.common.constant.ApprovedMotorcycleTypeEnum;
import com.ningdatech.carapi.driver.constant.DriverContinuingEducationRegistrationStatusEnum;
import com.ningdatech.carapi.driver.constant.DriverRegistrationStatusEnum;
import com.ningdatech.carapi.driver.constant.DriverReplacementRegistrationStatusEnum;
import com.ningdatech.carapi.driver.constant.DriverStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author LiuXinXin
 * @since 2022-10-09
 */
@TableName("nd_driver_info")
@Data
public class DriverInfo implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty("驾驶员姓名")
    private String driverName;

    @ApiModelProperty("驾驶头像文件")
    private String avatarFile;

    @ApiModelProperty("性别")
    private Integer gender;

    @ApiModelProperty("身份证号")
    private String idCard;

    @ApiModelProperty("出生年月")
    private LocalDateTime birth;

    @ApiModelProperty("籍贯")
    private String nativePlace;

    @ApiModelProperty("籍贯")
    @NotBlank(message = "籍贯编码")
    private String nativePlaceRegionCode;

    @ApiModelProperty("手机号码")
    private String phoneNo;

    @ApiModelProperty("健康状况")
    private String health;

    @ApiModelProperty("住址")
    private String address;

    @ApiModelProperty("驾驶员证号")
    private String driverLicenseNo;

    @ApiModelProperty("驾驶证类型")
    private String driverLicenseType;

    @ApiModelProperty("服务企业唯一标识id")
    private Long companyId;

    @ApiModelProperty("企业名称")
    private String companyName;

    @ApiModelProperty("创建时间")
    private LocalDateTime createOn;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateOn;

    /**
     * {@link DriverStatusEnum}
     */
    @ApiModelProperty(value = "驾驶员状态",
            allowableValues = " induction 入职,quit 离职")
    private String driverStatus;

    @ApiModelProperty("系统用户ID")
    private Long userId;

    @ApiModelProperty("区域id")
    private Long regionId;

    /**
     * {@link DriverRegistrationStatusEnum}
     */
    @ApiModelProperty("驾驶员取证报名状态")
    private String driverRegistrationStatus;

    @ApiModelProperty("违法违规信息")
    private String illegalAndIllegalInfo;

    @ApiModelProperty("初次领证时间")
    private LocalDateTime initialLicenseTime;

    @ApiModelProperty("离职时间")
    private LocalDateTime quitTime;

    @ApiModelProperty("入职时间")
    private LocalDateTime inductionTime;

    /**
     * {@link DriverReplacementRegistrationStatusEnum}
     */
    @ApiModelProperty("驾驶员换证培训报名状态")
    private String replacementRegistrationStatus;

    /**
     * {@link DriverContinuingEducationRegistrationStatusEnum}
     */
    @ApiModelProperty("驾驶员继续教育报名状态")
    private String continuingEducationStatus;

    /**
     * {@link DriverContinuingEducationRegistrationStatusEnum}
     */
    @ApiModelProperty("驾驶员跳槽审核报名状态")
    private String jobChangeStatus;

    /**
     * {@link ApprovedMotorcycleTypeEnum}
     */
    @ApiModelProperty("拟驾车型列表")
    private String motorcycleTypeList;

    @ApiModelProperty("驾驶员是否可以参加取证报名")
    private Integer driverRegistrationFlag;

    @ApiModelProperty("驾驶员是否可以参加继续教育报名")
    private Integer continuingEducationFlag;

    @ApiModelProperty("驾驶员是否可以参加换证培训报名")
    private Integer replacementRegistrationFlag;
}
