File size: 357 Bytes
55db701 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import mongoose from "mongoose";
const AuditLogSchema = new mongoose.Schema(
{
userId: mongoose.Schema.Types.ObjectId,
action: String,
severity: String,
ip: String,
userAgent: String,
isAnomaly: { type: Boolean, default: false },
},
{ timestamps: true }
);
export const AuditLog = mongoose.model("AuditLog", AuditLogSchema);
|