orbitx-core-models 11.112.0 → 11.113.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.model.d.ts","sourceRoot":"","sources":["../../src/models/user.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"user.model.d.ts","sourceRoot":"","sources":["../../src/models/user.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAiPrD,eAAO,MAAM,IAAI;;;;OAA4C,CAAC"}
|
|
@@ -141,10 +141,15 @@ const userSchema = new mongoose_1.Schema({
|
|
|
141
141
|
required: true,
|
|
142
142
|
index: true,
|
|
143
143
|
},
|
|
144
|
+
// Required for Company/Partner-owned users. ORBITXPRO-owned users (Ops's
|
|
145
|
+
// own internal staff, created via Profiles) have no tenant to point to --
|
|
146
|
+
// ORBITXPRO is the platform operator, not a document that gets owned.
|
|
144
147
|
owner: {
|
|
145
148
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
146
149
|
refPath: "ownerType",
|
|
147
|
-
required:
|
|
150
|
+
required: function () {
|
|
151
|
+
return this.ownerType !== "ORBITXPRO";
|
|
152
|
+
},
|
|
148
153
|
index: true,
|
|
149
154
|
},
|
|
150
155
|
// ─────────────────────────────────────────────
|