package com.imdroid.secapi.dto;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.imdroid.secapi.easyexcel.LocalTimeStringConverter;
import lombok.Data;

import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * GNSS收发统计消息，每个工作周期结束的时候统计一次
 *
 * @author LiGang
 */
@Data
@TableName(value = "gnsstrxmsg")
public class GnssTrxMsg {
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelIgnore
    Long id;

    @ExcelProperty("租户id")
    Integer tenantid;

    @ExcelProperty("上报时间")
    LocalDateTime createtime;

    @ExcelProperty(value = "设备时间", converter = LocalTimeStringConverter.class)
    LocalTime devicetime;

    @ExcelProperty("设备编号")
    String deviceid;

    @ExcelProperty("串口1发")
    Integer uart1txbytes;

    @ExcelProperty("串口1收")
    Integer uart1rxbytes;

    @ExcelProperty("串口1未知")
    Integer uart1unknown;

    @ExcelProperty("串口2发")
    Integer uart2txbytes;

    @ExcelProperty("串口2收")
    Integer uart2rxbytes;

    @ExcelProperty("串口2未知")
    Integer uart2unknown;

    // 这里的收发都是服务端统计的，终端收发详细统计在msg_trx表里
    @ExcelProperty("B562")
    Integer b562bytes;

    @ExcelProperty("D3XX")
    Integer d3xxbytes;
    @ExcelProperty("使用卫星数")
    Integer satelliteinuse;
}
