@brimble/models 2.4.93 → 2.4.95

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.
@@ -13,12 +13,13 @@ const domainSchema = new mongoose_1.Schema({
13
13
  unique: true,
14
14
  },
15
15
  team_id: {
16
+ ref: "Team",
16
17
  type: mongoose_1.Schema.Types.ObjectId,
17
- required: false,
18
+ required: true
18
19
  },
19
20
  user_id: {
21
+ ref: "User",
20
22
  type: mongoose_1.Schema.Types.ObjectId,
21
- required: true,
22
23
  },
23
24
  primary: {
24
25
  type: Boolean,
@@ -13,7 +13,7 @@ const projectSchema = new mongoose_1.Schema({
13
13
  user_id: {
14
14
  type: mongoose_1.Schema.Types.ObjectId,
15
15
  ref: "User",
16
- required: true,
16
+ required: false,
17
17
  },
18
18
  monitor_id: {
19
19
  type: String,
@@ -1,11 +1,11 @@
1
1
  import { Document } from "mongoose";
2
- import { IPreview, IProject, ISubscription } from "../";
2
+ import { IPreview, IProject, ISubscription, ITeam, IUser } from "../";
3
3
  import { IDns } from "./dns";
4
4
  export interface IDomain extends Document {
5
5
  name: string;
6
6
  project: IProject;
7
- user_id: string;
8
- team_id: string;
7
+ user_id: IUser;
8
+ team_id?: ITeam;
9
9
  primary: boolean;
10
10
  preview: IPreview;
11
11
  subscription: ISubscription;
package/domain/index.ts CHANGED
@@ -14,12 +14,13 @@ const domainSchema = new Schema(
14
14
  unique: true,
15
15
  },
16
16
  team_id: {
17
+ ref: "Team",
17
18
  type: Schema.Types.ObjectId,
18
- required: false,
19
+ required: true
19
20
  },
20
21
  user_id: {
22
+ ref: "User",
21
23
  type: Schema.Types.ObjectId,
22
- required: true,
23
24
  },
24
25
  primary: {
25
26
  type: Boolean,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "2.4.93",
3
+ "version": "2.4.95",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/project/index.ts CHANGED
@@ -13,7 +13,7 @@ const projectSchema = new Schema(
13
13
  user_id: {
14
14
  type: Schema.Types.ObjectId,
15
15
  ref: "User",
16
- required: true,
16
+ required: false,
17
17
  },
18
18
  monitor_id: {
19
19
  type: String,
@@ -1,12 +1,12 @@
1
1
  import { Document } from "mongoose";
2
- import { IPreview, IProject, ISubscription } from "../";
2
+ import { IPreview, IProject, ISubscription, ITeam, IUser } from "../";
3
3
  import { IDns } from "./dns";
4
4
 
5
5
  export interface IDomain extends Document {
6
6
  name: string;
7
7
  project: IProject;
8
- user_id: string;
9
- team_id: string;
8
+ user_id: IUser;
9
+ team_id?: ITeam;
10
10
  primary: boolean;
11
11
  preview: IPreview;
12
12
  subscription: ISubscription;