summaryrefslogtreecommitdiff
path: root/src/models/Log.ts
blob: 24991d4979506b2f1b464704b333c98201e3dd40 (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);