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

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gci.boot.common.dict.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 超速记录表
 * </p>
 *
 * @author 2464
 * @since 2023-09-01
 */
@Getter
@Setter
@TableName("tb_gis_speeding_alarm")
@ApiModel(value = "TbGisSpeedingAlarm对象", description = "超速记录表")
public class TbGisSpeedingAlarm extends GisAlarm implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;


    @ApiModelProperty("车牌号")
    @Excel(name = "车牌号",orderNum = "0")
    private String plateNumber;

    @ApiModelProperty("车辆品牌")
    @Dict(dicCode = "vehicle_brand")
    @Excel(name = "车辆品牌",dict = "vehicle_brand")
    @TableField(exist = false)
    private String vehicleBrand;

    @ApiModelProperty("车辆型号")
    @Excel(name = "车辆型号")
    @TableField(exist = false)
    private String vehicleModel;

    @ApiModelProperty("车辆种类")
    @Dict(dicCode = "vehicle_type")
    @Excel(name = "车辆种类",dict = "vehicle_type")
    @TableField(exist = false)
    private String vehicleType;

    @ApiModelProperty("所属车商")
    @Dict(dicCode = "id",dictTable = "tb_vehicle_supplier_archives",dicText = "shortened")
    @Excel(name = "所属车商",dict = "tb_vehicle_supplier_archives,shortened,id")
    @TableField(exist = false)
    private String dealer;

    @ApiModelProperty("定位终端设备号")
    @Excel(name = "定位终端设备号",orderNum = "1")
    private String gpsNo;

    @ApiModelProperty("驾驶员名称")
    @Excel(name = "驾驶员名称",orderNum = "2")
    private String driverName;

    @ApiModelProperty("驾驶员id")
    private String driverId;


    @ApiModelProperty("规定车速")
    @Excel(name = "规定车速(km/h)",numFormat = "#.##",orderNum = "3")
    private BigDecimal ruleSpeed;

    /**
     * 车速（最高速度）
     */
    @ApiModelProperty("车速（最高速度）")
    @Excel(name = "最高车速(km/h)",numFormat = "#.##",orderNum = "4")
    private BigDecimal speed;
    /**
     * 车速（平均速度）
     */
    @ApiModelProperty("车速（平均速度）")
    @Excel(name = "平均车速(km/h",numFormat = "#.##",orderNum = "5")
    private BigDecimal averageSpeed;


    @ApiModelProperty("告警开始时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Excel(name = "告警开始时间",format = "yyyy-MM-dd HH:mm:ss",orderNum = "7")
    private Date startTime;

    @ApiModelProperty("告警结束时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Excel(name = "告警开始时间",format = "yyyy-MM-dd HH:mm:ss",orderNum = "8")
    private Date endTime;

    @ApiModelProperty("所属机构")
    private String sysOrgCode;

    @ApiModelProperty("创建时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty("开始经度(高德)")
    @Excel(name = "开始经度(高德)",orderNum = "9")
    private BigDecimal startLon;

    @ApiModelProperty("开始纬度(高德)")
    @Excel(name = "开始纬度(高德)",orderNum = "10")
    private BigDecimal startLat;

    @ApiModelProperty("结束经度(高德)")
    @Excel(name = "结束经度(高德)",orderNum = "11")
    private BigDecimal endLon;

    @ApiModelProperty("结束纬度(高德)")
    @Excel(name = "结束纬度(高德)",orderNum = "12")
    private BigDecimal endLat;

    @ApiModelProperty("持续时间")
    @TableField(exist = false)
    @Excel(name = "持续时间",orderNum = "6")
    private String duration;

    @ApiModelProperty("规则名称")
    @Excel(name = "规则名称",orderNum = "3")
    private String thresholdName;
}
