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_fence_alarm")
@ApiModel(value = "TbGisFenceAlarm对象", description = "围栏告警记录表")
public class TbGisFenceAlarm implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty("项目名称")
    @Excel(name = "项目名称",orderNum = "1")
    private String projectName;

    @ApiModelProperty("围栏名称")
    @Excel(name = "围栏名称",orderNum = "2")
    private String name;

    @ApiModelProperty("围栏id")
    private String fenceId;

    @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 = "3")
    private String driverName;

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

    @ApiModelProperty("所属项目id")
    private String projectId;

    @ApiModelProperty("围栏类型 1-停场 2-行驶")
    @Dict(dicCode = "fence_type")
    @Excel(name = "围栏类型",dict = "fence_type",orderNum = "4")
    private Integer fenceType;

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

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

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

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

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

    /**
     * 告警时间
     */
    @TableField(exist = false)
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date alarmTime;
    @ApiModelProperty("持续时间")
    @TableField(exist = false)
    @Excel(name = "持续时间",orderNum = "5")
    private String duration;

}
