@brimble/models 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/logs.js +2 -2
- package/logs.ts +2 -2
- package/package.json +1 -1
package/dist/logs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const enum_1 = require("./enum");
|
|
5
|
-
|
|
5
|
+
const soft_delete_plugin_mongoose_1 = require("soft-delete-plugin-mongoose");
|
|
6
6
|
const LogSchema = new mongoose_1.Schema({
|
|
7
7
|
name: String,
|
|
8
8
|
key: String,
|
|
@@ -38,5 +38,5 @@ const LogSchema = new mongoose_1.Schema({
|
|
|
38
38
|
endTime: mongoose_1.Schema.Types.Date,
|
|
39
39
|
deleted: mongoose_1.Schema.Types.Boolean,
|
|
40
40
|
}, { timestamps: true });
|
|
41
|
-
|
|
41
|
+
LogSchema.plugin(soft_delete_plugin_mongoose_1.softDeletePlugin);
|
|
42
42
|
exports.default = (0, mongoose_1.model)("Log", LogSchema);
|
package/logs.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { model, Schema } from "mongoose";
|
|
2
2
|
import { ENVIRONMENT, PROJECT_STATUS } from "./enum";
|
|
3
3
|
import { ILog } from "./types";
|
|
4
|
-
|
|
4
|
+
import { softDeletePlugin } from "soft-delete-plugin-mongoose";
|
|
5
5
|
|
|
6
6
|
const LogSchema = new Schema(
|
|
7
7
|
{
|
|
@@ -42,6 +42,6 @@ const LogSchema = new Schema(
|
|
|
42
42
|
{ timestamps: true },
|
|
43
43
|
);
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
LogSchema.plugin(softDeletePlugin);
|
|
46
46
|
|
|
47
47
|
export default model<ILog>("Log", LogSchema);
|