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-09
 */
@Getter
@Setter
@TableName("tb_gis_vehicle_fault_alarm")
@ApiModel(value = "TbGisVehicleFaultAlarm对象", description = "车辆车机故障异常记录表")
public class TbGisVehicleFaultAlarm 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("vin码")
    @Excel(name = "VIN码",orderNum = "1")
    private String vinCode;

    @ApiModelProperty("故障名称")
    @Excel(name = "故障名称",orderNum = "2")
    private String faultName;

    @ApiModelProperty("故障类型")
    @Dict(dicCode = "fault_type")
    private Integer faultType;

    @ApiModelProperty("故障码")
    private String faultCode;

    @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 = "5")
    private Date alarmStartTime;

    @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 = "6")
    private Date alarmEndTime;

    @ApiModelProperty("是否关闭")
    @Dict(dicCode = "yes_no")
    @Excel(name = "关闭状态",dict = "yes_no",orderNum = "7")
    private Integer isClosed;

    @ApiModelProperty("关闭时间")
    private Date closeTime;

    @ApiModelProperty("故障 等级")
    @Excel(name = "故障等级",orderNum = "3")
    private Integer faultLevel;

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

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

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

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

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

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

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

    /**
     * 关闭类型 1-自动 2-用户手动操作
     */
    @ApiModelProperty("关闭类型")
    private String closeType;

    /**
     * 备注
     */
    @ApiModelProperty("备注")
    private String remark;
}
