@aldb2b/common 1.0.1058 → 1.0.1059
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/build/entities/models/companies/entities/companies/sector.schema.d.ts +2 -1
- package/build/entities/models/companies/entities/companies/sector.schema.js +7 -1
- package/build/entities/models/companies/entities/companies/sector.schema.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -50,12 +50,13 @@
|
|
|
50
50
|
/// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
|
|
51
51
|
import { Schema } from 'mongoose';
|
|
52
52
|
import { CustomModel } from '../../../../../db/CustomModel';
|
|
53
|
+
import { Category } from "./category.schema";
|
|
53
54
|
export type SectorModel = CustomModel<Sector>;
|
|
54
55
|
export declare class Sector {
|
|
55
56
|
_id: string;
|
|
56
57
|
verticals: string[];
|
|
57
58
|
keywords: string[];
|
|
58
|
-
categories:
|
|
59
|
+
categories: Category[];
|
|
59
60
|
createdAt: Date;
|
|
60
61
|
updatedAt: Date;
|
|
61
62
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getSectorSchema = exports.Sector = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
|
+
const services_1 = require("../../../../services");
|
|
5
6
|
const ObjectId = mongoose_1.Schema.Types.ObjectId;
|
|
6
7
|
class Sector {
|
|
7
8
|
}
|
|
@@ -10,7 +11,12 @@ const getSectorSchema = () => {
|
|
|
10
11
|
const sectorSchema = new mongoose_1.Schema({
|
|
11
12
|
verticals: { type: [String], default: [] },
|
|
12
13
|
keywords: { type: [String], default: [] },
|
|
13
|
-
categories:
|
|
14
|
+
categories: [
|
|
15
|
+
{
|
|
16
|
+
type: ObjectId,
|
|
17
|
+
ref: (0, services_1.getModelRef)('Category', mongoose_1.connection),
|
|
18
|
+
},
|
|
19
|
+
],
|
|
14
20
|
createdAt: { type: Date, required: true, default: Date.now },
|
|
15
21
|
updatedAt: { type: Date, required: true, default: Date.now },
|
|
16
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sector.schema.js","sourceRoot":"","sources":["../../../../../../src/entities/models/companies/entities/companies/sector.schema.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"sector.schema.js","sourceRoot":"","sources":["../../../../../../src/entities/models/companies/entities/companies/sector.schema.ts"],"names":[],"mappings":";;;AAAA,uCAA2C;AAE3C,mDAAiD;AAEjD,MAAM,QAAQ,GAAG,iBAAM,CAAC,KAAK,CAAC,QAAQ,CAAA;AAItC,MAAa,MAAM;CAOlB;AAPD,wBAOC;AAEM,MAAM,eAAe,GAAG,GAAgC,EAAE;IAC/D,MAAM,YAAY,GAAG,IAAI,iBAAM,CAAsB;QACnD,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;QACzC,UAAU,EAAE;YACV;gBACE,IAAI,EAAE,QAAQ;gBACd,GAAG,EAAE,IAAA,sBAAW,EAA0B,UAAU,EAAE,qBAAU,CAAC;aAClE;SACF;QACD,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;QAC5D,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;KAC7D,CAAC,CAAA;IAEF,OAAO,YAAY,CAAA;AACrB,CAAC,CAAA;AAfY,QAAA,eAAe,mBAe3B"}
|