summaryrefslogtreecommitdiff
path: root/src/models/Log.ts
blob: 8f905fd74a9915c5b952f2d79159353d35f92bd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import mongoose from "mongoose";

export interface ILog extends mongoose.Document {
  status: string;
  process: string;
  message: string;
  timestamp: Date;
}

const LogSchema = new mongoose.Schema({
  status: {
    type: String,
    trim: true,
    required: true,
  },
  process: {
    type: String,
    trim: true,
    required: true,
  },
  message: {
    type: String,
    trim: true,
    required: true,
  },
  timestamp: {
    type: Date,
    trim: true,
    required: true,
  },
});

export default mongoose.model<ILog>("Log", LogSchema);