package com.emergency.avenue.storage.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.sql.Timestamp;
import java.util.Date;

@Data
@Builder
@Schema(description = "司机信息")
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class DriverInfo extends Model<DriverInfo> {


	@Schema(description = "司机ID")
	@TableId(type = IdType.AUTO)
	private Integer driverId;

	@Schema(description = "姓名")
	private String name;

	@Schema(description = "性别")
	private Character gender;


	@Schema(description = "身份证号")
	private String idCard;

	@Schema(description = "出生日期")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date birthDate;


	@Schema(description = "联系电话")
	private String phoneNumber;


	@Schema(description = "驾驶证号")
	private String drivingLicense;


	@Schema(description = "民族")
	private String nationality;


	@Schema(description = "健康状况")
	private String healthStatus;


	@Schema(description = "年龄")
	private Integer age;


	@Schema(description = "籍贯")
	private String originPlace;


	@Schema(description = "文化程度")
	private String educationLevel;


	@Schema(description = "联系地址")
	private String contactAddress;


	@Schema(description = "驾照类型")
	private String drivingLicenseType;


	@Schema(description = "初领时间")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date firstIssueDate;


	@Schema(description = "准驾车型")
	private String drivingCategory;


	@Schema(description = "司机照片")
	private String driverPhoto;


	@Schema(description = "司机照片地址")
	private String driverPhotoAddress;


	@Schema(description = "创建人")
	private String createBy;


	@Schema(description = "创建时间")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Timestamp createTime;


	@Schema(description = "更新人")
	private String updateBy;


	@Schema(description = "更新时间")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Timestamp updateTime;
}
