package org.dromara.rfid.domain.vo;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.rfid.domain.RfidDevice;
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_device
 *
 * @author zch
 * @date 2025-11-25
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = RfidDevice.class)
public class RfidDeviceVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

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

    /**
     * 设备编号
     */
    @ExcelProperty(value = "设备编号")
    private String deviceCode;

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

    /**
     * 所在位置，对应rfid_location.id
     */
    @ExcelProperty(value = "所在位置，对应rfid_location.id")
    private Long locationId;

    /**
     * 所在位置名称（连表 rfid_location.location_alias）
     */
    @ExcelProperty(value = "所在位置")
    private String locationAlias;

    /**
     * 设备地址(IP等)
     */
    @ExcelProperty(value = "设备地址(IP等)")
    private String deviceAddress;

    /**
     * 设备端口
     */
    @ExcelProperty(value = "设备端口")
    private Long devicePort;

    /**
     * 读取频率(单位：自定义，如次/秒)
     */
    @ExcelProperty(value = "读取频率(单位：自定义，如次/秒)")
    private Long readFrequency;

    /**
     * 在线状态(0-离线;1-在线)
     */
    @ExcelProperty(value = "在线状态(0-离线;1-在线)", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "online_status")
    private String onlineStatus;

    /**
     * 告警状态(0-正常;1-告警)
     */
    @ExcelProperty(value = "告警状态(0-正常;1-告警)", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "alarm_status")
    private String alarmStatus;

    /**
     * 是否标识(1-是;0-否)
     */
    @ExcelProperty(value = "是否标识(1-是;0-否)", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "is_marked")
    private String isMarked;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 创建人
     */
    @ExcelProperty(value = "创建人")
    private String createdBy;

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

    /**
     * 更新人
     */
    @ExcelProperty(value = "更新人")
    private String updatedBy;

    /**
     * 更新时间
     */
    @ExcelProperty(value = "更新时间")
    private Date updatedAt;


}
