package com.yida.data.common.core.entity.card;

import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Document(indexName = "card_location", shards = 5)
public class EduStudentCardLocation implements Serializable {

    private static final long serialVersionUID = 6659516247810605754L;
    @Id
    private Long id;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    /**
     * 0-gps,1-基站，2-wifi,3-gps平滑曲线
     */
    private Integer type;

    /**
     * 经度
     */
    private Double lng;

    /**
     * 纬度
     */
    private Double lat;

    /**
     * imei号
     */
    private String imei;

    /**
     * 电量
     */
    private Integer bat;

    /**
     * 可见卫星数
     */
    private Integer gps;

    /**
     * 信号强度
     */
    private Integer gsm;

    /**
     * 设备时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deviceTime;

    /**
     * 0-在线，1-离线
     */
    private Integer online;
}
