@brimble/models 2.4.3 → 2.4.5

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 CHANGED
@@ -20,6 +20,10 @@ const LogSchema = new mongoose_1.Schema({
20
20
  ref: "User",
21
21
  type: mongoose_1.Schema.Types.ObjectId,
22
22
  },
23
+ team: {
24
+ ref: "Team",
25
+ type: mongoose_1.Schema.Types.ObjectId,
26
+ },
23
27
  preview: {
24
28
  ref: "Preview",
25
29
  type: mongoose_1.Schema.Types.ObjectId,
@@ -144,6 +144,11 @@ const projectSchema = new mongoose_1.Schema({
144
144
  replica_ready: {
145
145
  type: Boolean,
146
146
  default: false
147
+ },
148
+ autoscaling_group: {
149
+ ref: "AutoScalingGroup",
150
+ type: mongoose_1.Schema.Types.ObjectId,
151
+ required: false,
147
152
  }
148
153
  }, { timestamps: true });
149
154
  exports.default = (0, mongoose_1.model)("Project", projectSchema);
@@ -3,6 +3,7 @@ import { ENVIRONMENT, PROJECT_STATUS } from "../enum";
3
3
  import { IProject } from "./project";
4
4
  import { IUser } from "./user";
5
5
  import { IPreview } from "./project/preview";
6
+ import { ITeam } from "./team";
6
7
  export interface ILog extends Document {
7
8
  name: string;
8
9
  key: string;
@@ -19,6 +20,7 @@ export interface ILog extends Document {
19
20
  status: PROJECT_STATUS;
20
21
  project: IProject;
21
22
  user?: IUser;
23
+ team?: ITeam;
22
24
  jobs: {
23
25
  id: number;
24
26
  name: string;
@@ -1,4 +1,4 @@
1
- import { Document } from "mongoose";
1
+ import { Document, Types } from "mongoose";
2
2
  import { GIT_TYPE, PROJECT_STATUS, ServiceType } from "../../enum";
3
3
  import { IDomain } from "../domain";
4
4
  import { IEnv } from "../env";
@@ -72,5 +72,6 @@ export interface IProject extends Document {
72
72
  last_backup_url?: string;
73
73
  last_backup_at?: Date;
74
74
  replica_ready: boolean;
75
+ autoscaling_group: Types.ObjectId;
75
76
  isPaid: boolean;
76
77
  }
package/logs.ts CHANGED
@@ -21,6 +21,10 @@ const LogSchema = new Schema(
21
21
  ref: "User",
22
22
  type: Schema.Types.ObjectId,
23
23
  },
24
+ team: {
25
+ ref: "Team",
26
+ type: Schema.Types.ObjectId,
27
+ },
24
28
  preview: {
25
29
  ref: "Preview",
26
30
  type: Schema.Types.ObjectId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "2.4.3",
3
+ "version": "2.4.5",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/project/index.ts CHANGED
@@ -144,6 +144,11 @@ const projectSchema = new Schema(
144
144
  replica_ready: {
145
145
  type: Boolean,
146
146
  default: false
147
+ },
148
+ autoscaling_group: {
149
+ ref: "AutoScalingGroup",
150
+ type: Schema.Types.ObjectId,
151
+ required: false,
147
152
  }
148
153
  },
149
154
  { timestamps: true },
package/types/logs.ts CHANGED
@@ -3,6 +3,7 @@ import { ENVIRONMENT, PROJECT_STATUS } from "../enum";
3
3
  import { IProject } from "./project";
4
4
  import { IUser } from "./user";
5
5
  import { IPreview } from "./project/preview";
6
+ import { ITeam } from "./team";
6
7
 
7
8
  export interface ILog extends Document {
8
9
  name: string;
@@ -20,6 +21,7 @@ export interface ILog extends Document {
20
21
  status: PROJECT_STATUS;
21
22
  project: IProject;
22
23
  user?: IUser;
24
+ team?: ITeam;
23
25
  jobs: {
24
26
  id: number;
25
27
  name: string;
@@ -1,4 +1,4 @@
1
- import { Document } from "mongoose";
1
+ import { Document, Types } from "mongoose";
2
2
  import { GIT_TYPE, PROJECT_STATUS, ServiceType } from "../../enum";
3
3
  import { IDomain } from "../domain";
4
4
  import { IEnv } from "../env";
@@ -73,5 +73,6 @@ export interface IProject extends Document {
73
73
  last_backup_url?: string;
74
74
  last_backup_at?: Date;
75
75
  replica_ready: boolean;
76
+ autoscaling_group: Types.ObjectId;
76
77
  isPaid: boolean;
77
78
  }