package com.njzscloud.dispose.cst.truck.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.njzscloud.common.core.ienum.DictItem;
import com.njzscloud.common.core.ienum.DictKey;
import com.njzscloud.common.mp.support.handler.j.DictItemTypeHandler;
import com.njzscloud.common.mp.support.handler.j.JsonTypeHandler;
import com.njzscloud.dispose.common.pojo.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.util.List;

/**
 * 车辆信息
 *
 * @author ljw
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName(value = "cst_truck", autoResultMap = true)
public class TruckEntity extends BaseEntity {

    /**
     * 归属客户 Id；cst_customer.id
     */
    private Long customerId;

    /**
     * 归属组织
     */
    private Long orgId;

    /**
     * 车牌
     */
    private String licensePlate;

    /**
     * 行驶证图片
     */
    @TableField(typeHandler = JsonTypeHandler.class)
    private List<String> truckLicense;

    /**
     * 车架号
     */
    private String vnCode;

    /**
     * 合格证图片
     */
    @TableField(typeHandler = JsonTypeHandler.class)
    private List<String> qualification;

    /**
     * 最大载重；单位：千克
     */
    private Integer carryingCapacity;

    /**
     * 皮重；单位：千克
     */
    private Integer tareWeight;

    /**
     * 行驶证有效期
     */
    private LocalDate licenseStartDate;

    /**
     * 行驶证有效期
     */
    private LocalDate licenseEndDate;

    /**
     * 合格证有效期
     */
    private LocalDate qualificationStartDate;

    /**
     * 合格证有效期
     */
    private LocalDate qualificationEndDate;

    /**
     * 车辆类型
     */
    @DictKey("truck_category")
    @TableField(typeHandler = DictItemTypeHandler.class)
    private DictItem truckCategory;

    /**
     * 车辆图片
     */
    private String picture;

    /**
     * 忙碌中
     */
    private Boolean busy;
}


