package com.xunhong.erp.turbo.biz.infrastructure.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xunhong.erp.turbo.api.biz.dto.enums.OrderVehiclePriceTypeEnum;
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @author shenyifei
 */
@Data
@TableName(value = "order_vehicle")
@EqualsAndHashCode(callSuper = true)
public class OrderVehicleDO extends BaseDO<OrderVehicleDO> {

	/**
	 * 记录ID
	 */
	@TableId(value = "vehicle_id", type = IdType.ASSIGN_ID)
	private Long vehicleId;

	/**
	 * 订单ID
	 */
	@TableField(value = "order_id")
	private Long orderId;

	/**
	 * 车货编码
	 */
	@TableField(value = "vehicle_no")
	private String vehicleNo;

	/**
	 * 车牌号
	 */
	@TableField(value = "plate")
	private String plate;

	/**
	 * 司机姓名
	 */
	@TableField(value = "driver")
	private String driver;

	/**
	 * 司机电话
	 */
	@TableField(value = "phone")
	private String phone;

	/**
	 * 出发地
	 */
	@TableField(value = "origin")
	private String origin;

	/**
	 * 目的地
	 */
	@TableField(value = "destination")
	private String destination;

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

	/**
	 * 运输价格
	 */
	@TableField(value = "price")
	private BigDecimal price;

	/**
	 * 经销商ID
	 */
	@TableField(value = "dealer_id")
	private Long dealerId;

	/**
	 * 经销商名称
	 */
	@TableField(value = "dealer_name")
	private String dealerName;

	/**
	 * 是否开启草帘
	 */
	@TableField(value = "open_straw_curtain")
	private Boolean openStrawCurtain;

	/**
	 * 草帘费用
	 */
	@TableField(value = "straw_curtain_price")
	private BigDecimal strawCurtainPrice;

	/**
	 * 采购日期
	 */
	@TableField(value = "delivery_time")
	private LocalDate deliveryTime;

}

