orbitx-core-models 11.90.0 → 11.91.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,7 +1,7 @@
1
1
  import mongoose from "mongoose";
2
2
  export interface IGroup {
3
3
  _id?: mongoose.Types.ObjectId;
4
- companyId: mongoose.Types.ObjectId;
4
+ industry: string;
5
5
  name: string;
6
6
  description?: string;
7
7
  agents: Array<{
@@ -1 +1 @@
1
- {"version":3,"file":"group.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/group.interface.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,MAAM,WAAW,MAAM;IACrB,GAAG,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC9B,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC;QACZ,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;QAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,QAAQ,EAAE,IAAI,CAAC;KAChB,CAAC,CAAC;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
1
+ {"version":3,"file":"group.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/group.interface.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,MAAM,WAAW,MAAM;IACrB,GAAG,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC;QACZ,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;QAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,QAAQ,EAAE,IAAI,CAAC;KAChB,CAAC,CAAC;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
@@ -36,10 +36,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.Group = void 0;
37
37
  const mongoose_1 = __importStar(require("mongoose"));
38
38
  const groupSchema = new mongoose_1.Schema({
39
- companyId: {
40
- type: mongoose_1.Schema.Types.ObjectId,
41
- ref: "Company",
39
+ industry: {
40
+ type: String,
42
41
  required: true,
42
+ trim: true,
43
43
  index: true,
44
44
  },
45
45
  name: {
@@ -85,6 +85,6 @@ const groupSchema = new mongoose_1.Schema({
85
85
  // ─────────────────────────────────────────────
86
86
  // INDEXES
87
87
  // ─────────────────────────────────────────────
88
- groupSchema.index({ companyId: 1, isActive: 1 });
88
+ groupSchema.index({ industry: 1, isActive: 1 });
89
89
  groupSchema.index({ "agents.userId": 1 });
90
90
  exports.Group = mongoose_1.default.model("Group", groupSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orbitx-core-models",
3
- "version": "11.90.0",
3
+ "version": "11.91.0",
4
4
  "description": "Shared Mongoose models and interfaces for OrbitX services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",