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

import com.baomidou.mybatisplus.annotation.IdType;
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.math.BigDecimal;
import java.security.Timestamp;
import java.util.Date;


@Data
@Schema(description = "车辆信息")
@EqualsAndHashCode(callSuper = true)
public class VehicleInfo extends Model<VehicleInfo> {

	@TableId(type = IdType.AUTO)
	@Schema(description = "主键ID", required = true)
	private Integer vehicleId;

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

	@Schema(description = "车辆类型")
	private String vehicleType;

	@Schema(description = "车辆品牌")
	private String vehicleBrand;

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

	@Schema(description = "购入日期")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date purchaseDate;

	@Schema(description = "车辆状态")
	private String vehicleStatus;

	@Schema(description = "驾驶员")
	private String driver;

	@Schema(description = "购入单位")
	private String purchaseUnit;

	@Schema(description = "购买价格")
	private BigDecimal purchasePrice;

	@Schema(description = "初始公里数")
	private Integer initialKilometers;

	@Schema(description = "耗油量")
	private BigDecimal fuelConsumption;

	@Schema(description = "发动机号")
	private String engineNumber;

	@Schema(description = "载重", format = "decimal")
	private BigDecimal loadCapacity;

	@Schema(description = "座位数")
	private Integer seatCount;

	@Schema(description = "年审日期")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date annualInspectionDate;

	@Schema(description = "年审项目")
	private String annualInspectionItems;

	@Schema(description = "年审情况")
	private String annualInspectionStatus;

	@Schema(description = "下次年审日期")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date nextAnnualInspectionDate;

	@Schema(description = "入保时间")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date insuranceStartDate;

	@Schema(description = "保险公司")
	private String insuranceCompany;

	@Schema(description = "投保情况")
	private String insuranceStatus;

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

	@Schema(description = "正面照片地址")
	private String frontPhotoUrl;

	@Schema(description = "侧面照片地址")
	private String sidePhotoUrl;

	@Schema(description = "记录创建时间", readOnly = true)
	private Timestamp createdTime;

	@Schema(description = "记录更新时间", readOnly = true)
	private Timestamp updatedTime;


}