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.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.sql.Timestamp;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "在途车辆信息表")
public class InTransitVehicleInfo extends Model<VehicleCapacityManagement> {

	@TableId(type = IdType.AUTO)
	@Schema(description = "主键ID，自增")
	private Integer id;

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

	@Schema(description = "车牌号")
	private String licensePlateNumber;


	@Schema(description = "车牌颜色")
	private String licensePlateColor;


	@Schema(description = "车牌类型")
	private String licensePlateType;


	@Schema(description = "司机姓名")
	private String driverName;


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


	@Schema(description = "运输物资")
	private String transportMaterial;


	@Schema(description = "起点")
	private String startPoint;


	@Schema(description = "终点")
	private String endPoint;


	@Schema(description = "开始送货时间")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Timestamp startDeliveryTime;


	@Schema(description = "预计送达时间")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Timestamp estimatedArrivalTime;

	@Schema(description = "车架号")
	private String vin;

	@Schema(description = "出库凭证")
	private String orderName;

	@Schema(description = "仓库名称")
	private String warehouseName;

	@TableField(exist = false)
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private String[] deliveryTime;

	@TableField(exist = false)
	private Integer car_nums;

	@Schema(description = "车辆位置")
	@TableField(exist = false)
	private String carPosition;
}
