package org.dromara.rfid.domain.vo;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.rfid.domain.RfidReadRecord;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

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



/**
 * 读取记录视图对象 rfid_read_record
 *
 * @author zch
 * @date 2025-11-25
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = RfidReadRecord.class)
public class RfidReadRecordVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @ExcelProperty(value = "标识")
    private Long id;

    /**
     * 设备id，对应rfid_device.id
     */
    @ExcelProperty(value = "设备id，对应rfid_device.id")
    private Long deviceId;

    /**
     * 设备编号（连表 rfid_device.device_code）
     */
    @ExcelProperty(value = "设备编号")
    private String deviceCode;

    /**
     * 设备名称（连表 rfid_device.device_name）
     */
    @ExcelProperty(value = "设备名称")
    private String deviceName;

    /**
     * 读取状态(1-成功;0-失败)
     */
    @ExcelProperty(value = "读取状态(1-成功;0-失败)", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "read_status")
    private String readStatus;

    /**
     * 条码信息
     */
    @ExcelProperty(value = "条码信息")
    private String barcode;

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

    /**
     * 是否告警(0-否;1-是)
     */
    @ExcelProperty(value = "是否告警(0-否;1-是)", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "alarm_flag")
    private String alarmFlag;

    /**
     * 告警级别(1-一般;2-严重等)
     */
    @ExcelProperty(value = "告警级别(1-一般;2-严重等)", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "alarm_level")
    private String alarmLevel;

    /**
     * 告警类型
     */
    @ExcelProperty(value = "告警类型")
    private String alarmType;

    /**
     * 告警行为
     */
    @ExcelProperty(value = "告警行为")
    private String alarmAction;


}
