package com.zsc.edu.gateway.modules.iot.tsl.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zsc.edu.gateway.modules.iot.record.entity.RecordData;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * @author zhuang
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@TableName("iot_event_log")
public class EventLog {
    /**
     * 序列化主键（有数据库提供，非自增）
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 名称
     */
    private String name;

    /**
     * 关联上报数据id
     */
    private String recordId;

    /**
     * 关联上报数据
     */
    @TableField(exist = false)
    private RecordData recordData;

    /**
     * 触发时间
     */
    private LocalDateTime triggerTime;

    /**
     * 是否已读
     */
    private Boolean isRead;
}
