package com.ruemu.springops.model;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import java.time.Instant;

@Document(collection = "audit_events")
public class AuditEvent {
    @Id private String id;
    private Long requestId;
    private String type;
    private String message;
    private Instant createdAt;

    public AuditEvent() {}
    public AuditEvent(Long requestId, String type, String message) {
        this.requestId = requestId;
        this.type = type;
        this.message = message;
        this.createdAt = Instant.now();
    }
    public String getId() { return id; }
    public Long getRequestId() { return requestId; }
    public String getType() { return type; }
    public String getMessage() { return message; }
    public Instant getCreatedAt() { return createdAt; }
}
