package com.yupi.project.model.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 lombok.Data;

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

@TableName(value = "mqtt_communication_log")
@Data
public class MqttCommunicationLog implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long id;

    private String messageId;

    private String direction; // UPSTREAM, DOWNSTREAM

    private String clientId;

    private String topic;

    private String payloadFormat; // TEXT, JSON, BINARY

    private String payload;

    private Integer qos;

    private Boolean isRetained;

    private Date logTimestamp;

    private String backendProcessingStatus; // RECEIVED, PROCESSING, SUCCESS, FAILED

    private String backendProcessingInfo;

    private Long relatedSessionId;

    private Long relatedTaskId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
} 