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.annotation.fileUrl.FileUrl;
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_active_safety_alarm")
@ApiModel(value = "TbGisActiveSafetyAlarm对象", description = "主动安全故障记录表")
public class TbGisActiveSafetyAlarm extends GisAlarm implements Serializable {

    private static final long serialVersionUID = 1L;

    @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 driverName;

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

    @ApiModelProperty("主动安全设备标识")
    private String adasNo;

    @ApiModelProperty("事件标识")
    private String warnNo;

    @ApiModelProperty("标志状态 -1-不可用 0-开始 1-结束")
    private Integer flagStatus;

    @ApiModelProperty("一级类型 1-辅助驾驶 2-驾驶员行为")
    @Dict(dicCode = "primary_type")
    @Excel(name = "一级类型",dict = "primary_type",orderNum = "2")
    private Integer primaryType;

    @ApiModelProperty("事件类型")
    @Dict(dicCode = "event_type")
    @Excel(name = "告警类型",dict = "event_type",orderNum = "3")
    private String eventType;

    @ApiModelProperty("事件名称")
    private String eventName;

    @ApiModelProperty("前车车速，单位km/h,仅前向碰撞或车道偏离时有效")
    private Integer precedingVehicleSpeed;

    @ApiModelProperty("前车/行人距离，仅前向碰撞、车道偏离、行人碰撞有效")
    private Integer precedingDistance;

    @ApiModelProperty("偏离类型: 1-左侧偏离 2-右侧偏离 仅车道偏离时有效")
    private Integer deviationType;

    @ApiModelProperty("道路标志类型:包括1-限速、2-限高、3-限重标志。仅为道路标识超限、道路标志识别时有效")
    private Integer roadsignType;

    @ApiModelProperty("疲劳程度，范围1~10 仅在疲劳驾驶有效")
    private Integer fatigueLevel;

    @ApiModelProperty("报警级别，1-1级报警 2-2级报警")
    private Integer alertLevel;

    @ApiModelProperty("车速 单位km/h")
    @Excel(name = "车速（km/h）",orderNum = "4")
    private BigDecimal vehicleSpeed;

    @ApiModelProperty("0-正常 1-异常")
    private Integer elevation;

    @ApiModelProperty("纬度")
    @Excel(name = "纬度",orderNum = "5")
    private BigDecimal lat;

    @ApiModelProperty("经度")
    @Excel(name = "经度",orderNum = "6")
    private BigDecimal lon;

    @ApiModelProperty("高德纬度")
    @Excel(name = "高德纬度",orderNum = "7")
    private BigDecimal gdLat;

    @ApiModelProperty("高德经度")
    @Excel(name = "高德经度",orderNum = "8")
    private BigDecimal gdLon;

    @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 = "9")
    private Date alertStartTime;

    @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 = "10")
    private Date alertEndTime;

    @ApiModelProperty("acc状态 0-关闭 1-打开")
    private Integer accStatus;

    @ApiModelProperty("左转向状态 0-关闭 1-打开")
    private Integer leftTurnStatus;

    @ApiModelProperty("右转向状态 0-关闭 1-打开")
    private Integer rightTurnStatus;

    @ApiModelProperty("雨刮器状态 0-关闭 1-打开")
    private Integer wiperStatus;

    @ApiModelProperty("制动状态 0-未制动 1-制动")
    private Integer brakeStatus;

    @ApiModelProperty("插卡状态 0-未插卡 1-已插卡")
    private Integer cardInsertStatus;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("更新时间")
    private Date updateTime;

    @ApiModelProperty("语音url")
    @FileUrl
    private String voiceUrl;

    @ApiModelProperty("视频url")
    @FileUrl
    private String videoUrl;

    @ApiModelProperty("图片url")
    @FileUrl
    private String imgUrl;

    @ApiModelProperty("事件特征")
    @TableField(exist = false)
    @Excel(name = "事件特征",orderNum = "11")
    private String eventCharacteristics;
}
