package com.gci.boot.modules.gis.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gci.boot.annotation.Query.OrderQuery;
import com.gci.boot.annotation.Query.SelectQuery;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
public class GisVehicleFaultQuery {
    @ApiModelProperty("项目ID")
    @SelectQuery(Type = SelectQuery.SelectType.EQ,PropName = "tgvfa.projectId")
    private String projectId;

    @ApiModelProperty("车牌号")
    @SelectQuery(Type = SelectQuery.SelectType.LIKE,PropName = "tgvfa.plateNumber")
    private String plateNumber;
    @ApiModelProperty("vin码")
    @SelectQuery(PropName = "tgvfa.vinCode")
    private String vinCode;
    @ApiModelProperty("故障码")
    @SelectQuery(Type = SelectQuery.SelectType.EQ,PropName = "tgvfa.faultType")
    private String faultType;

    @OrderQuery(sort = 1)
    private Date alarmEndTime;

    /**
     * 时间
     */
    @SelectQuery(Type = SelectQuery.SelectType.BETWEEN,PropName = "tgvfa.alarmStartTime")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private List<Date> time;


    @ApiModelProperty("车辆品牌")
    @SelectQuery(Type = SelectQuery.SelectType.EQ,PropName = "tv.vehicleBrand")
    private String vehicleBrand;

    @ApiModelProperty("车辆型号")
    @SelectQuery(Type = SelectQuery.SelectType.LIKE,PropName = "tv.vehicleModel")
    private String vehicleModel;

    @ApiModelProperty("车辆种类")
    @SelectQuery(Type = SelectQuery.SelectType.EQ,PropName = "tv.vehicleType")
    private String vehicleType;

    @ApiModelProperty("所属车商")
    @SelectQuery(Type = SelectQuery.SelectType.EQ,PropName = "tv.dealer")
    private String dealer;
}
