package com.aegis.emergency.event.domain;

import java.util.Date;
import com.aegis.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 事件操作日志实体类 event_log
 *
 * 对应事件模块的操作日志记录
 *
 * @author aegis
 */
@Getter
@Setter
@ToString(callSuper = true)
@TableName("event_log")
public class EventLog extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 日志ID */
    private Long id;

    /** 事件ID */
    private Long eventId;

    /** 操作类型（枚举：{@link com.aegis.emergency.event.constant.EventAction}）：event_created/event_updated/status_changed/dispatch_linked/report_submitted等 */
    private String action;

    /** 操作详情（JSON格式） */
    private String payload;

    /** 操作人ID */
    private Long operatorId;

    /** 操作人姓名 */
    private String operatorName;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;
}