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 com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
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;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

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

    private static final long serialVersionUID = 1L;
    @JsonPropertyDescription("id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

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

    @JsonPropertyDescription("所属项目")
    @Excel(name = "所属项目",orderNum = "2")
    private String projectName;

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

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

    @JsonPropertyDescription("车辆型号")
    @Excel(name = "车辆型号",orderNum = "3")
    @TableField(exist = false)
    private String vehicleModel;

    @JsonPropertyDescription("车架号")
    @Excel(name = "车架号",orderNum = "4")
    private String frameNumber;

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

    @JsonPropertyDescription("所属车商")
    @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;

    @JsonPropertyDescription("停车时长")
    @Excel(name = "停车时长",orderNum = "6")
    private Integer stopTime;

    @JsonPropertyDescription("告警开始时间")
    @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;

    @JsonPropertyDescription("告警结束时间")
    @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;

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

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

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

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

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

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

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

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