@brimble/models 1.5.36 → 1.5.37

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.
@@ -94,7 +94,7 @@ const projectSchema = new mongoose_1.Schema({
94
94
  from: mongoose_1.Schema.Types.ObjectId,
95
95
  container_stats_schedule_id: {
96
96
  type: String,
97
- default: null
97
+ default: null,
98
98
  },
99
99
  previews: [
100
100
  {
@@ -106,6 +106,7 @@ const projectSchema = new mongoose_1.Schema({
106
106
  type: Number,
107
107
  default: 3,
108
108
  },
109
- specs: Object
109
+ specs: Object,
110
+ last_requested: mongoose_1.Schema.Types.Date,
110
111
  }, { timestamps: true });
111
112
  exports.default = (0, mongoose_1.model)("Project", projectSchema);
@@ -27,5 +27,6 @@ const previewsSchema = new mongoose_1.Schema({
27
27
  ref: "Log",
28
28
  type: mongoose_1.Schema.Types.ObjectId,
29
29
  },
30
+ last_requested: mongoose_1.Schema.Types.Date,
30
31
  }, { timestamps: true });
31
32
  exports.default = (0, mongoose_1.model)("Preview", previewsSchema);
@@ -55,4 +55,5 @@ export interface IProject extends Document {
55
55
  memory: number;
56
56
  cpu: number;
57
57
  };
58
+ last_requested: Date;
58
59
  }
@@ -15,4 +15,5 @@ export interface IPreview extends Document {
15
15
  issue_comment_id: number;
16
16
  status: PROJECT_STATUS;
17
17
  log: ILog;
18
+ last_requested: Date;
18
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "1.5.36",
3
+ "version": "1.5.37",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/project/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { model, Schema } from "mongoose";
1
+ import { model, Schema, } from "mongoose";
2
2
  import { PROJECT_STATUS } from "../enum";
3
3
  import { IProject } from "../types";
4
4
 
@@ -94,8 +94,8 @@ const projectSchema = new Schema(
94
94
  tracking_token: String,
95
95
  from: Schema.Types.ObjectId,
96
96
  container_stats_schedule_id: {
97
- type: String,
98
- default: null
97
+ type: String,
98
+ default: null,
99
99
  },
100
100
  previews: [
101
101
  {
@@ -107,7 +107,8 @@ const projectSchema = new Schema(
107
107
  type: Number,
108
108
  default: 3,
109
109
  },
110
- specs: Object
110
+ specs: Object,
111
+ last_requested: Schema.Types.Date,
111
112
  },
112
113
  { timestamps: true },
113
114
  );
@@ -28,6 +28,7 @@ const previewsSchema = new Schema(
28
28
  ref: "Log",
29
29
  type: Schema.Types.ObjectId,
30
30
  },
31
+ last_requested: Schema.Types.Date,
31
32
  },
32
33
  { timestamps: true },
33
34
  );
@@ -56,4 +56,5 @@ export interface IProject extends Document {
56
56
  memory: number;
57
57
  cpu: number;
58
58
  };
59
+ last_requested: Date;
59
60
  }
@@ -16,4 +16,5 @@ export interface IPreview extends Document {
16
16
  issue_comment_id: number;
17
17
  status: PROJECT_STATUS;
18
18
  log: ILog;
19
+ last_requested: Date;
19
20
  }