@brimble/models 2.0.2 → 2.0.4

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.d.ts CHANGED
@@ -1,30 +1,4 @@
1
- /// <reference types="mongoose/types/aggregate" />
2
- /// <reference types="mongoose/types/callback" />
3
- /// <reference types="mongoose/types/collection" />
4
- /// <reference types="mongoose/types/connection" />
5
- /// <reference types="mongoose/types/cursor" />
6
- /// <reference types="mongoose/types/document" />
7
- /// <reference types="mongoose/types/error" />
8
- /// <reference types="mongoose/types/expressions" />
9
- /// <reference types="mongoose/types/helpers" />
10
- /// <reference types="mongoose/types/middlewares" />
11
- /// <reference types="mongoose/types/indexes" />
12
- /// <reference types="mongoose/types/models" />
13
- /// <reference types="mongoose/types/mongooseoptions" />
14
- /// <reference types="mongoose/types/pipelinestage" />
15
- /// <reference types="mongoose/types/populate" />
16
- /// <reference types="mongoose/types/query" />
17
- /// <reference types="mongoose/types/schemaoptions" />
18
- /// <reference types="mongoose/types/schematypes" />
19
- /// <reference types="mongoose/types/session" />
20
- /// <reference types="mongoose/types/types" />
21
- /// <reference types="mongoose/types/utility" />
22
- /// <reference types="mongoose/types/validation" />
23
- /// <reference types="mongoose/types/virtuals" />
24
- /// <reference types="mongoose" />
25
- /// <reference types="mongoose/types/inferschematype" />
26
1
  import { ILog } from "./types";
27
- declare const _default: import("mongoose").Model<ILog, {}, {}, {}, import("mongoose").Document<unknown, {}, ILog> & ILog & {
28
- _id: import("mongoose").Types.ObjectId;
29
- }, any>;
2
+ import { SoftDeleteModel } from "soft-delete-plugin-mongoose";
3
+ declare const _default: SoftDeleteModel<ILog>;
30
4
  export default _default;
package/dist/logs.js CHANGED
@@ -2,6 +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
+ const soft_delete_plugin_mongoose_1 = require("soft-delete-plugin-mongoose");
5
6
  const LogSchema = new mongoose_1.Schema({
6
7
  name: String,
7
8
  key: String,
@@ -33,4 +34,5 @@ const LogSchema = new mongoose_1.Schema({
33
34
  endTime: mongoose_1.Schema.Types.Date,
34
35
  deleted: mongoose_1.Schema.Types.Boolean
35
36
  }, { timestamps: true });
36
- exports.default = (0, mongoose_1.model)("Log", LogSchema);
37
+ LogSchema.plugin(soft_delete_plugin_mongoose_1.softDeletePlugin);
38
+ exports.default = (0, mongoose_1.model)('Log', LogSchema);
@@ -110,6 +110,10 @@ const projectSchema = new mongoose_1.Schema({
110
110
  specs: Object,
111
111
  last_requested: mongoose_1.Schema.Types.Date,
112
112
  isPaused: Boolean,
113
+ billable: {
114
+ type: Boolean,
115
+ default: false,
116
+ },
113
117
  }, { timestamps: true });
114
118
  projectSchema.plugin(soft_delete_plugin_mongoose_1.softDeletePlugin);
115
119
  exports.default = (0, mongoose_1.model)('Project', projectSchema);
package/logs.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { model, Schema } from "mongoose";
2
2
  import { ENVIRONMENT, PROJECT_STATUS } from "./enum";
3
3
  import { ILog } from "./types";
4
+ import { SoftDeleteModel, softDeletePlugin } from "soft-delete-plugin-mongoose";
4
5
 
5
6
  const LogSchema = new Schema(
6
7
  {
@@ -37,4 +38,6 @@ const LogSchema = new Schema(
37
38
  { timestamps: true },
38
39
  );
39
40
 
40
- export default model<ILog>("Log", LogSchema);
41
+ LogSchema.plugin(softDeletePlugin);
42
+
43
+ export default model<ILog, SoftDeleteModel<ILog>>('Log', LogSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/project/index.ts CHANGED
@@ -111,6 +111,10 @@ const projectSchema = new Schema(
111
111
  specs: Object,
112
112
  last_requested: Schema.Types.Date,
113
113
  isPaused: Boolean,
114
+ billable: {
115
+ type: Boolean,
116
+ default: false,
117
+ },
114
118
  },
115
119
  { timestamps: true },
116
120
  );