package org.dromara.rfid.domain.bo;

import org.dromara.rfid.domain.RfidReadRecord;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 读取记录业务对象 rfid_read_record
 *
 * @author zch
 * @date 2025-11-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = RfidReadRecord.class, reverseConvertGenerate = false)
public class RfidReadRecordBo extends BaseEntity {

    /**
     * 标识
     */
    @NotNull(message = "标识不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 设备id，对应rfid_device.id
     */
    @NotNull(message = "设备id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long deviceId;

    /**
     * 读取状态(1-成功;0-失败)
     */
    @NotBlank(message = "读取状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String readStatus;

    /**
     * 条码信息
     */
    @NotBlank(message = "条码信息不能为空", groups = { AddGroup.class, EditGroup.class })
    private String barcode;

    /**
     * 记录时间
     */
    @NotNull(message = "记录时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date recordTime;

    /**
     * 是否告警(0-否;1-是)
     */
    @NotBlank(message = "是否告警不能为空", groups = { AddGroup.class, EditGroup.class })
    private String alarmFlag;

    /**
     * 告警级别(1-一般;2-严重等)
     */
    private String alarmLevel;

    /**
     * 告警类型
     */
    private String alarmType;

    /**
     * 告警行为
     */
    private String alarmAction;


}
