/*
 * Author: wangjian
 * 生成entity
 */
package com.tofly.es;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 车载设备上报位置上报
 * @author BZ-DJJ
 */
@Data
@Document(indexName = "dcswcargps_"+"#{T(com.tofly.common.core.util.Date8Util).getYearMonth()}", type = "cargps")
public class CarGpsUpload implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "ID",type= IdType.INPUT)
    @ApiModelProperty(value = "分类ID")
    private String id;
    @ApiModelProperty(value = "用户id")
    private Long userId;
    @ApiModelProperty(value = "GPS经度")
    private BigDecimal locationLongitude;
    @ApiModelProperty(value = "GPS纬度")
    private BigDecimal locationLatitude;
    @ApiModelProperty(value = "速度(触发器计算)")
    private BigDecimal speed;
    @ApiModelProperty(value = "方向")
    private BigDecimal direction;
    @ApiModelProperty(value = "上传时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Field(type = FieldType.Date,fielddata=true)
    private Date uploadTime;
    @ApiModelProperty(value = "定位时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Field(type = FieldType.Date,fielddata=true)
    private Date gpsTime;
    @ApiModelProperty(value = "上传轨迹速度")
    private BigDecimal gpsSpeed;
    @ApiModelProperty(value = "设备ID")
    private String gpsId;
    @ApiModelProperty(value = "0:无效 1：有效")
    private BigDecimal isValid;


}
