package org.dromara.rfid.domain.bo;

import org.dromara.rfid.domain.RfidDevice;
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_device
 *
 * @author zch
 * @date 2025-11-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = RfidDevice.class, reverseConvertGenerate = false)
public class RfidDeviceBo extends BaseEntity {

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

    /**
     * 设备编号
     */
    @NotBlank(message = "设备编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deviceCode;

    /**
     * 设备名称
     */
    @NotBlank(message = "设备名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deviceName;

    /**
     * 所在位置，对应rfid_location.id
     */
    private Long locationId;

    /**
     * 设备地址(IP等)
     */
    private String deviceAddress;

    /**
     * 设备端口
     */
    private Long devicePort;

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

    /**
     * 在线状态(0-离线;1-在线)
     */
    @NotBlank(message = "在线状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String onlineStatus;

    /**
     * 告警状态(0-正常;1-告警)
     */
    @NotBlank(message = "告警状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String alarmStatus;

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

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 创建时间
     */
    private Date createdAt;

    /**
     * 更新人
     */
    private String updatedBy;

    /**
     * 更新时间
     */
    private Date updatedAt;


}
