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

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
//import com.zsc.edu.gateway.framework.json.MapJsonTypeHandler;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * @author zhuang
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@TableName("iot_record_data")
public class RecordData {
    @TableId
    private String id;

    private String clientId;

    private String attachmentId;

    //    @TableField(typeHandler = MapJsonTypeHandler.class)
    private Map<String, Object> content;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime recordTime;
}
