diff options
Diffstat (limited to 'src/models/Log.ts')
-rwxr-xr-x | src/models/Log.ts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/models/Log.ts b/src/models/Log.ts new file mode 100755 index 0000000..8f905fd --- /dev/null +++ b/src/models/Log.ts @@ -0,0 +1,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); |