package com.fuyuanshen.equipment.domain.vo;

import java.util.Date;

import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.fuyuanshen.common.excel.annotation.ExcelDictFormat;
import com.fuyuanshen.common.excel.convert.ExcelDictConvert;
import com.fuyuanshen.equipment.domain.DeviceFenceAccessRecord;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;


/**
 * 围栏进出记录视图对象 device_fence_access_record
 *
 * @author Lion Li
 * @date 2025-09-11
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = DeviceFenceAccessRecord.class)
public class DeviceFenceAccessRecordVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 记录ID
     */
    // @ExcelProperty(value = "记录ID")
    private Long id;

    /**
     * 围栏ID
     */
    // @ExcelProperty(value = "围栏ID")
    private Long fenceId;

    /**
     * 围栏名称
     */
    @ExcelProperty(value = "围栏名称")
    private String fenceName;

    /**
     * 设备标识
     */
    // @ExcelProperty(value = "设备标识")
    private Long deviceId;

    /**
     * 设备名称
     */
    @ExcelProperty(value = "设备名称")
    private String deviceName;

    /**
     * 事件时间
     */
    @ExcelProperty(value = "事件时间")
    @ColumnWidth(120)
    private String eventTime;

    /**
     * 用户ID
     */
    // @ExcelProperty(value = "用户ID")
    private Long userId;

    /**
     * 事件类型
     */
    @ExcelProperty(value = "事件类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "1=进入围栏,2=离开围栏")
    private Long eventType;

    /**
     * 纬度
     */
    // @ExcelProperty(value = "纬度")
    private Double latitude;

    /**
     * 经度
     */
    // @ExcelProperty(value = "经度")
    private Double longitude;

    /**
     * 定位精度
     */
    // @ExcelProperty(value = "定位精度")
    private Long accuracy;

    /**
     * 事件地址
     */
    @ExcelProperty(value = "事件地址")
    private String eventAddress;

    /**
     * 记录创建时间
     */
    @ExcelProperty(value = "记录创建时间")
    private Date createTime;

}
