package com.xunhong.erp.turbo.api.biz.dto.common;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.xunhong.erp.turbo.api.biz.dto.enums.OrderVehiclePriceTypeEnum;
import com.xunhong.erp.turbo.base.dto.Command;
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.time.LocalDate;

/**
 * @author shenyifei
 */
@Data
@Schema(title = "采购订单车辆运输信息创建")
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrderVehicle extends Command {

	/**
	 * 记录ID
	 */
	@Schema(title = "记录ID", type = "string")
	private Long vehicleId;

	/**
	 * 订单ID
	 */
	@Schema(title = "订单ID", type = "string")
	private Long orderId;

	/**
	 * 车货编码
	 */
	@Schema(title = "车货编码")
	private String vehicleNo;

	/**
	 * 车牌号
	 */
	@Schema(title = "车牌号", requiredMode = Schema.RequiredMode.REQUIRED)
	private String plate;

	/**
	 * 司机姓名
	 */
	@Schema(title = "司机姓名", requiredMode = Schema.RequiredMode.REQUIRED)
	private String driver;

	/**
	 * 司机电话
	 */
	@Schema(title = "司机电话", requiredMode = Schema.RequiredMode.REQUIRED)
	private String phone;

	/**
	 * 出发地
	 */
	@Schema(title = "出发地", requiredMode = Schema.RequiredMode.REQUIRED)
	private String origin;

	/**
	 * 目的地
	 */
	@Schema(title = "目的地", requiredMode = Schema.RequiredMode.REQUIRED)
	private String destination;

	/**
	 * 运费类型：1-主运费；2-短驳费；
	 */
	@Schema(title = "运费类型：1-主运费；2-短驳费；")
	private OrderVehiclePriceTypeEnum priceType;

	/**
	 * 运输价格
	 */
	@Schema(title = "运输价格", requiredMode = Schema.RequiredMode.REQUIRED)
	private BigDecimal price;

	/**
	 * 经销商ID
	 */
	@Schema(title = "经销商ID", type = "string")
	private Long dealerId;

	/**
	 * 经销商名称
	 */
	@Schema(title = "经销商名称", requiredMode = Schema.RequiredMode.REQUIRED)
	private String dealerName;

	/**
	 * 是否开启草帘
	 */
	@Schema(title = "是否开启草帘", requiredMode = Schema.RequiredMode.REQUIRED)
	private Boolean openStrawCurtain;

	/**
	 * 草帘费用
	 */
	@Schema(title = "草帘费用")
	private BigDecimal strawCurtainPrice;

	/**
	 * 采购日期
	 */
	@Schema(title = "采购日期", requiredMode = Schema.RequiredMode.REQUIRED)
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private LocalDate deliveryTime;

}

