pristine-member-nest-api-database 1.0.53 → 1.0.55

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.
Files changed (35) hide show
  1. package/dist/index.js +2 -1
  2. package/dist/interface/IApplicationCategory.interface.js +2 -0
  3. package/dist/interface/IApplicationFiels.interface.js +2 -0
  4. package/dist/models/Containers.model.js +3 -3
  5. package/dist/models/Editor.Application.model.js +2 -0
  6. package/dist/models/Editor.BPCompany.Types.js +43 -0
  7. package/dist/models/Editor.BPcompanyTpes.Branch.Field.Category.Mapping.js +48 -0
  8. package/dist/models/Editor.PureStatic.Category.Field.Mapping.js +43 -0
  9. package/dist/models/Editor.SLIITO.Category.Field.Mapping.js +46 -0
  10. package/dist/models/Editor.StaticVariable.Category.Field.Mapping.js +43 -0
  11. package/dist/models/EditorFieldMaster.model.js +52 -0
  12. package/dist/models/FieldCategory.model.js +0 -6
  13. package/dist/models/FieldTypes.model.js +88 -0
  14. package/dist/models/MainProductOrServices.model.js +47 -0
  15. package/dist/models/MembershipType.model.js +6 -4
  16. package/dist/models/ProductsServices.model.js +6 -0
  17. package/index.ts +3 -1
  18. package/interface/IApplicationCategory.interface.ts +8 -0
  19. package/interface/IApplicationFiels.interface.ts +11 -0
  20. package/interface/IField.interface.ts +1 -0
  21. package/models/Containers.model.ts +2 -2
  22. package/models/DynamicTemplate.model.ts +1 -1
  23. package/models/Editor.Application.model.ts +20 -0
  24. package/models/Editor.BPCompany.Types.ts +33 -0
  25. package/models/Editor.BPcompanyTpes.Branch.Field.Category.Mapping.ts +45 -0
  26. package/models/Editor.PureStatic.Category.Field.Mapping.ts +35 -0
  27. package/models/Editor.SLIITO.Category.Field.Mapping.ts +37 -0
  28. package/models/Editor.StaticVariable.Category.Field.Mapping.ts +38 -0
  29. package/models/EditorFieldMaster.model.ts +46 -0
  30. package/models/FieldCategory.model.ts +0 -7
  31. package/models/FieldTypes.model.ts +154 -0
  32. package/models/MainProductOrServices.model.ts +41 -0
  33. package/models/MembershipType.model.ts +13 -8
  34. package/models/ProductsServices.model.ts +8 -1
  35. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -33,9 +33,10 @@ __exportStar(require("./models/Member.model"), exports);
33
33
  __exportStar(require("./models/MembershipStatus.model"), exports);
34
34
  __exportStar(require("./models/MembershipType.model"), exports);
35
35
  __exportStar(require("./models/NatureOfBusiness.model"), exports);
36
+ __exportStar(require("./models/ProductsServices.model"), exports);
37
+ __exportStar(require("./models/MainProductOrServices.model"), exports);
36
38
  __exportStar(require("./models/OrganizationTypesMaster.model"), exports);
37
39
  __exportStar(require("./models/payment.model"), exports);
38
- __exportStar(require("./models/ProductsServices.model"), exports);
39
40
  __exportStar(require("./models/SeatingArrangement.ir.model"), exports);
40
41
  __exportStar(require("./models/ServiceRequest.ir.model"), exports);
41
42
  __exportStar(require("./models/User.model"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Container = void 0;
26
+ exports.mongoContainer = void 0;
27
27
  const mongoose_1 = __importStar(require("mongoose"));
28
28
  const ContainerSchema = new mongoose_1.Schema({
29
29
  ContainerCode: { type: String },
@@ -39,5 +39,5 @@ const ContainerSchema = new mongoose_1.Schema({
39
39
  },
40
40
  ],
41
41
  });
42
- const Container = mongoose_1.default.model("Editor.Container", ContainerSchema);
43
- exports.Container = Container;
42
+ const mongoContainer = mongoose_1.default.model("Editor.Container", ContainerSchema);
43
+ exports.mongoContainer = mongoContainer;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ // Editor.BPCompany.Types.ts
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || function (mod) {
20
+ if (mod && mod.__esModule) return mod;
21
+ var result = {};
22
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
+ __setModuleDefault(result, mod);
24
+ return result;
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.mongoBpCompanySchema = void 0;
28
+ const mongoose_1 = __importStar(require("mongoose"));
29
+ const BPCompanyTypesSchema = new mongoose_1.Schema({
30
+ BPCompanyTypeName: { type: String, required: true },
31
+ BPCompanyTypeCode: { type: mongoose_1.Schema.Types.ObjectId, ref: "Field.Categories" },
32
+ isSystemDefined: { type: Boolean, default: false },
33
+ isActive: { type: Boolean, default: true },
34
+ audit: [
35
+ {
36
+ userId: { type: String },
37
+ auditedOn: { type: Date, default: null },
38
+ actionType: { type: String },
39
+ },
40
+ ],
41
+ });
42
+ const mongoBpCompanySchema = mongoose_1.default.model("Editor.BPCompany.Types", BPCompanyTypesSchema);
43
+ exports.mongoBpCompanySchema = mongoBpCompanySchema;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.mongoBranchBpCompanyTypesFieldCategoryMappingSchema = void 0;
27
+ // Editor.BPcompanyTpes.Branch.Field.Category.Mapping.ts
28
+ const mongoose_1 = __importStar(require("mongoose"));
29
+ const BranchCompanyTypesFieldCategoryMappingSchema = new mongoose_1.Schema({
30
+ BranchId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Branch" },
31
+ companyTypeId: {
32
+ type: mongoose_1.Schema.Types.ObjectId,
33
+ ref: "Editor.BPCompany.Types",
34
+ },
35
+ categoryId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Field.Categories" },
36
+ fieldId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Editor.Fields.Master" },
37
+ isSystemDefined: { type: Boolean, default: false },
38
+ isActive: { type: Boolean, default: true },
39
+ audit: [
40
+ {
41
+ userId: { type: String },
42
+ auditedOn: { type: Date, default: null },
43
+ actionType: { type: String },
44
+ },
45
+ ],
46
+ });
47
+ const mongoBranchBpCompanyTypesFieldCategoryMappingSchema = mongoose_1.default.model("Editor.Branch.CompanyTypes.Field.Category.Mapping", BranchCompanyTypesFieldCategoryMappingSchema);
48
+ exports.mongoBranchBpCompanyTypesFieldCategoryMappingSchema = mongoBranchBpCompanyTypesFieldCategoryMappingSchema;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ //Editor.PureStaticFieldsMapping.ts
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || function (mod) {
20
+ if (mod && mod.__esModule) return mod;
21
+ var result = {};
22
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
+ __setModuleDefault(result, mod);
24
+ return result;
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.mongopureStaticFieldMappingSchema = void 0;
28
+ const mongoose_1 = __importStar(require("mongoose"));
29
+ const pureStaticFieldMappingSchema = new mongoose_1.Schema({
30
+ categoryId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Field.Categories" },
31
+ fieldId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Editor.Fields.Master" },
32
+ isSystemDefined: { type: Boolean, default: false },
33
+ isActive: { type: Boolean, default: true },
34
+ audit: [
35
+ {
36
+ userId: { type: String },
37
+ auditedOn: { type: Date, default: null },
38
+ actionType: { type: String },
39
+ },
40
+ ],
41
+ });
42
+ const mongopureStaticFieldMappingSchema = mongoose_1.default.model("Editor.PureStatic.Category.Field.Mapping", pureStaticFieldMappingSchema);
43
+ exports.mongopureStaticFieldMappingSchema = mongopureStaticFieldMappingSchema;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.mongoSLITOCategoryFieldMappingSchema = void 0;
27
+ const mongoose_1 = __importStar(require("mongoose"));
28
+ const SLITOCategoryFieldMappingSchema = new mongoose_1.Schema({
29
+ categoryId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Field.Categories" },
30
+ fieldId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Editor.Fields.Master" },
31
+ membershipTypeId: {
32
+ type: mongoose_1.Schema.Types.ObjectId,
33
+ ref: "Membership.Types",
34
+ },
35
+ isSystemDefined: { type: Boolean, default: false },
36
+ isActive: { type: Boolean, default: true },
37
+ audit: [
38
+ {
39
+ userId: { type: String },
40
+ auditedOn: { type: Date, default: null },
41
+ actionType: { type: String },
42
+ },
43
+ ],
44
+ });
45
+ const mongoSLITOCategoryFieldMappingSchema = mongoose_1.default.model("Editor.SLITO.Category.Field.Mapping", SLITOCategoryFieldMappingSchema);
46
+ exports.mongoSLITOCategoryFieldMappingSchema = mongoSLITOCategoryFieldMappingSchema;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ //Editor.PureStaticFieldsMapping.ts
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || function (mod) {
20
+ if (mod && mod.__esModule) return mod;
21
+ var result = {};
22
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
+ __setModuleDefault(result, mod);
24
+ return result;
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.mongostaticVariableFieldMappingSchema = void 0;
28
+ const mongoose_1 = __importStar(require("mongoose"));
29
+ const staticVariableFieldMappingSchema = new mongoose_1.Schema({
30
+ categoryId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Field.Categories" },
31
+ fieldId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Editor.Fields.Master" },
32
+ isSystemDefined: { type: Boolean, default: false },
33
+ isActive: { type: Boolean, default: true },
34
+ audit: [
35
+ {
36
+ userId: { type: String },
37
+ auditedOn: { type: Date, default: null },
38
+ actionType: { type: String },
39
+ },
40
+ ],
41
+ });
42
+ const mongostaticVariableFieldMappingSchema = mongoose_1.default.model("Editor.StaticVariable.Category.Field.Mapping", staticVariableFieldMappingSchema);
43
+ exports.mongostaticVariableFieldMappingSchema = mongostaticVariableFieldMappingSchema;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.mongoEditorField = void 0;
27
+ const mongoose_1 = __importStar(require("mongoose"));
28
+ const fieldSchema = new mongoose_1.Schema({
29
+ fieldCode: { type: String },
30
+ fieldName: { type: String },
31
+ FieldTypeId: {
32
+ type: mongoose_1.Schema.Types.ObjectId,
33
+ ref: "Field.Types", // Reference to the 'Container' model
34
+ required: false,
35
+ default: null,
36
+ },
37
+ ManagerEdit: { type: Boolean, default: false },
38
+ MemberEdit: { type: Boolean, default: false },
39
+ SapSync: { type: Boolean, default: false },
40
+ Mandatory: { type: Boolean, default: false },
41
+ isSystemDefined: { type: Boolean, default: false },
42
+ isActive: { type: Boolean, default: true },
43
+ audit: [
44
+ {
45
+ userId: { type: String },
46
+ auditedOn: { type: Date, default: null },
47
+ actionType: { type: String },
48
+ },
49
+ ],
50
+ });
51
+ const mongoEditorField = mongoose_1.default.model("Editor.Fields.Master", fieldSchema);
52
+ exports.mongoEditorField = mongoEditorField;
@@ -29,12 +29,6 @@ const fieldCategorySchema = new mongoose_1.Schema({
29
29
  fieldUUId: { type: String },
30
30
  fieldCategoryCode: { type: String },
31
31
  fieldCategoryName: { type: String },
32
- containerId: {
33
- type: mongoose_1.Schema.Types.ObjectId,
34
- ref: "Editor.Container", // Reference to the 'Container' model
35
- required: false,
36
- default: null,
37
- },
38
32
  isSystemDefined: { type: Boolean, default: false },
39
33
  isActive: { type: Boolean, default: true },
40
34
  audit: [
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.mongoEditorFieldType = exports.FieldTypeEnum = void 0;
27
+ const mongoose_1 = __importStar(require("mongoose"));
28
+ /* =========================
29
+ FIELD TYPE ENUM
30
+ ========================= */
31
+ var FieldTypeEnum;
32
+ (function (FieldTypeEnum) {
33
+ FieldTypeEnum["TEXT"] = "TEXT";
34
+ FieldTypeEnum["NUMBER"] = "NUMBER";
35
+ FieldTypeEnum["CHECKBOX"] = "CHECKBOX";
36
+ FieldTypeEnum["DROPDOWN"] = "DROPDOWN";
37
+ FieldTypeEnum["TABLE"] = "TABLE";
38
+ FieldTypeEnum["MATRIX"] = "MATRIX";
39
+ })(FieldTypeEnum || (exports.FieldTypeEnum = FieldTypeEnum = {}));
40
+ /* =========================
41
+ SCHEMA
42
+ ========================= */
43
+ const fieldSchema = new mongoose_1.Schema({
44
+ fieldTypeCode: {
45
+ type: String,
46
+ required: true,
47
+ trim: true,
48
+ },
49
+ fieldEnum: {
50
+ type: String,
51
+ required: true,
52
+ enum: Object.values(FieldTypeEnum), // store only enum values
53
+ },
54
+ fieldTypeName: {
55
+ type: String,
56
+ required: true,
57
+ trim: true,
58
+ },
59
+ fieldTypeDescription: {
60
+ type: String,
61
+ trim: true,
62
+ },
63
+ config: {
64
+ type: mongoose_1.Schema.Types.Mixed,
65
+ default: {},
66
+ },
67
+ isSystemDefined: {
68
+ type: Boolean,
69
+ default: false,
70
+ },
71
+ isActive: {
72
+ type: Boolean,
73
+ default: true,
74
+ },
75
+ audit: [
76
+ {
77
+ userId: { type: String },
78
+ auditedOn: { type: Date, default: null },
79
+ actionType: { type: String },
80
+ },
81
+ ],
82
+ }, {
83
+ timestamps: true,
84
+ });
85
+ /* =========================
86
+ MODEL
87
+ ========================= */
88
+ exports.mongoEditorFieldType = mongoose_1.default.model("Editor.FieldType", fieldSchema);
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.mongoMainProductsOrServicesMaster = void 0;
27
+ const mongoose_1 = __importStar(require("mongoose"));
28
+ const MainProductsOrServicesMasterSchema = new mongoose_1.Schema({
29
+ MainProductsOrServicesMasterCode: { type: String },
30
+ MainProductsOrServicesName: { type: String },
31
+ prodcutServiceId: {
32
+ type: mongoose_1.Schema.Types.ObjectId,
33
+ ref: "Products.ServicesMaster", // Reference to the 'Products.ServicesMaster' model
34
+ required: false,
35
+ default: null,
36
+ },
37
+ isActive: { type: Boolean, default: true },
38
+ audit: [
39
+ {
40
+ userId: { type: String },
41
+ auditedOn: { type: Date, default: null },
42
+ actionType: { type: String },
43
+ },
44
+ ],
45
+ });
46
+ const mongoMainProductsOrServicesMaster = mongoose_1.default.model("MainProductsOrServices.Master", MainProductsOrServicesMasterSchema);
47
+ exports.mongoMainProductsOrServicesMaster = mongoMainProductsOrServicesMaster;
@@ -29,11 +29,13 @@ const membershipTypeSchema = new mongoose_1.Schema({
29
29
  membershipTypeCode: { type: String },
30
30
  membershipTypeName: { type: String },
31
31
  isActive: { type: Boolean, default: true },
32
- audit: [{
32
+ audit: [
33
+ {
33
34
  userId: { type: String },
34
35
  auditedOn: { type: Date, default: Date.now() },
35
- actionType: { type: String }
36
- }]
36
+ actionType: { type: String },
37
+ },
38
+ ],
37
39
  });
38
- const mongoMembershipType = mongoose_1.default.model('Membership.Types', membershipTypeSchema);
40
+ const mongoMembershipType = mongoose_1.default.model("Membership.Types", membershipTypeSchema);
39
41
  exports.mongoMembershipType = mongoMembershipType;
@@ -28,6 +28,12 @@ const mongoose_1 = __importStar(require("mongoose"));
28
28
  const ProductsAndServicesMasterSchema = new mongoose_1.Schema({
29
29
  ProductsAndServicesMasterCode: { type: String },
30
30
  ProductsAndServicesMasterName: { type: String },
31
+ NatureOfBusinessId: {
32
+ type: mongoose_1.Schema.Types.ObjectId,
33
+ ref: "NatureOfBusiness.Master", // Reference to the 'NatureOfBusiness' model
34
+ required: false,
35
+ default: null,
36
+ },
31
37
  isActive: { type: Boolean, default: true },
32
38
  audit: [
33
39
  {
package/index.ts CHANGED
@@ -17,9 +17,11 @@ export * from "./models/Member.model";
17
17
  export * from "./models/MembershipStatus.model";
18
18
  export * from "./models/MembershipType.model";
19
19
  export * from "./models/NatureOfBusiness.model";
20
+ export * from "./models/ProductsServices.model";
21
+ export * from "./models/MainProductOrServices.model";
22
+
20
23
  export * from "./models/OrganizationTypesMaster.model";
21
24
  export * from "./models/payment.model";
22
- export * from "./models/ProductsServices.model";
23
25
  export * from "./models/SeatingArrangement.ir.model";
24
26
  export * from "./models/ServiceRequest.ir.model";
25
27
  export * from "./models/User.model";
@@ -0,0 +1,8 @@
1
+ import { Types } from "mongoose";
2
+ import IFieldApplication from "./IApplicationFiels.interface";
3
+
4
+ export default interface IApplicationCategory {
5
+ categoryId: Types.ObjectId;
6
+ categorySequence: number;
7
+ fields: IFieldApplication[];
8
+ }
@@ -0,0 +1,11 @@
1
+ import mongoose from "mongoose";
2
+
3
+ /**
4
+ * Interface for a appication fields
5
+ */
6
+
7
+ export default interface IFieldApplication {
8
+ fieldId: mongoose.Types.ObjectId;
9
+ fieldSequence: number;
10
+ fieldDescription: string;
11
+ }
@@ -4,6 +4,7 @@ import IFile from "./IFile.interface";
4
4
  /**
5
5
  * Interface for a fields contains in a category
6
6
  */
7
+
7
8
  export default interface IField {
8
9
  fieldSequence: number;
9
10
  fieldCode: string;
@@ -26,9 +26,9 @@ const ContainerSchema = new Schema<ContainerDocument>({
26
26
  ],
27
27
  });
28
28
 
29
- const Container = mongoose.model<ContainerDocument>(
29
+ const mongoContainer = mongoose.model<ContainerDocument>(
30
30
  "Editor.Container",
31
31
  ContainerSchema,
32
32
  );
33
33
 
34
- export { ContainerDocument, Container };
34
+ export { ContainerDocument, mongoContainer };
@@ -139,7 +139,7 @@ const dynamicTemplateModel = mongoose.model<IDynamicTemplateDocument>(
139
139
  actionType: { type: String },
140
140
  },
141
141
  ],
142
- })
142
+ }),
143
143
  );
144
144
 
145
145
  export { dynamicTemplateModel, IDynamicTemplateDocument };
@@ -0,0 +1,20 @@
1
+ import mongoose, { Document, Schema, Types } from "mongoose";
2
+ import { Audit } from "../interface/Audit.interface";
3
+ import IApplicationCategory from "../interface/IApplicationCategory.interface";
4
+
5
+ /**
6
+ * Interface for Full Application Creation
7
+ */
8
+
9
+ interface IApplicationDocument extends Document {
10
+ branchId: Types.ObjectId;
11
+ applicationName: string;
12
+ applicationDescription: string;
13
+ categories: IApplicationCategory[];
14
+ SLITOOptionEnabled: boolean;
15
+ organizationApplicationEnabled: boolean;
16
+ approverOneEnabled: boolean;
17
+ approverTwoEnabled: boolean;
18
+ createdDate: Schema.Types.Date;
19
+ audit: Audit[];
20
+ }
@@ -0,0 +1,33 @@
1
+ // Editor.BPCompany.Types.ts
2
+
3
+ import mongoose, { Document, Schema } from "mongoose";
4
+ import { Audit } from "../interface/Audit.interface";
5
+
6
+ interface BPCompanyTypes extends Document {
7
+ BPCompanyTypeName: string;
8
+ BPCompanyTypeCode: mongoose.Types.ObjectId;
9
+ isSystemDefined: boolean;
10
+ isActive: boolean;
11
+ audit: Audit[];
12
+ }
13
+
14
+ const BPCompanyTypesSchema = new Schema<BPCompanyTypes>({
15
+ BPCompanyTypeName: { type: String, required: true },
16
+ BPCompanyTypeCode: { type: Schema.Types.ObjectId, ref: "Field.Categories" },
17
+ isSystemDefined: { type: Boolean, default: false },
18
+ isActive: { type: Boolean, default: true },
19
+ audit: [
20
+ {
21
+ userId: { type: String },
22
+ auditedOn: { type: Date, default: null },
23
+ actionType: { type: String },
24
+ },
25
+ ],
26
+ });
27
+
28
+ const mongoBpCompanySchema = mongoose.model<BPCompanyTypes>(
29
+ "Editor.BPCompany.Types",
30
+ BPCompanyTypesSchema,
31
+ );
32
+
33
+ export { BPCompanyTypes, mongoBpCompanySchema };
@@ -0,0 +1,45 @@
1
+ // Editor.BPcompanyTpes.Branch.Field.Category.Mapping.ts
2
+ import mongoose, { Document, Schema } from "mongoose";
3
+ import { Audit } from "../interface/Audit.interface";
4
+
5
+ interface BranchCompanyTypesFieldCategoryMapping extends Document {
6
+ BranchId: mongoose.Types.ObjectId;
7
+ companyTypeId: mongoose.Types.ObjectId;
8
+ categoryId: mongoose.Types.ObjectId;
9
+ fieldId: mongoose.Types.ObjectId;
10
+ isSystemDefined: boolean;
11
+ isActive: boolean;
12
+ audit: Audit[];
13
+ }
14
+
15
+ const BranchCompanyTypesFieldCategoryMappingSchema =
16
+ new Schema<BranchCompanyTypesFieldCategoryMapping>({
17
+ BranchId: { type: Schema.Types.ObjectId, ref: "Branch" },
18
+ companyTypeId: {
19
+ type: Schema.Types.ObjectId,
20
+ ref: "Editor.BPCompany.Types",
21
+ },
22
+ categoryId: { type: Schema.Types.ObjectId, ref: "Field.Categories" },
23
+ fieldId: { type: Schema.Types.ObjectId, ref: "Editor.Fields.Master" },
24
+
25
+ isSystemDefined: { type: Boolean, default: false },
26
+ isActive: { type: Boolean, default: true },
27
+ audit: [
28
+ {
29
+ userId: { type: String },
30
+ auditedOn: { type: Date, default: null },
31
+ actionType: { type: String },
32
+ },
33
+ ],
34
+ });
35
+
36
+ const mongoBranchBpCompanyTypesFieldCategoryMappingSchema =
37
+ mongoose.model<BranchCompanyTypesFieldCategoryMapping>(
38
+ "Editor.Branch.CompanyTypes.Field.Category.Mapping",
39
+ BranchCompanyTypesFieldCategoryMappingSchema,
40
+ );
41
+
42
+ export {
43
+ BranchCompanyTypesFieldCategoryMapping,
44
+ mongoBranchBpCompanyTypesFieldCategoryMappingSchema,
45
+ };
@@ -0,0 +1,35 @@
1
+ //Editor.PureStaticFieldsMapping.ts
2
+
3
+ import mongoose, { Document, ObjectId, Schema, Types } from "mongoose";
4
+ import { Audit } from "../interface/Audit.interface";
5
+
6
+ interface PureStaticFieldsCategoryMapping extends Document {
7
+ categoryId: mongoose.Types.ObjectId;
8
+ fieldId: mongoose.Types.ObjectId;
9
+ isSystemDefined: boolean;
10
+ isActive: boolean;
11
+ audit: Audit[];
12
+ }
13
+
14
+ const pureStaticFieldMappingSchema =
15
+ new Schema<PureStaticFieldsCategoryMapping>({
16
+ categoryId: { type: Schema.Types.ObjectId, ref: "Field.Categories" },
17
+ fieldId: { type: Schema.Types.ObjectId, ref: "Editor.Fields.Master" },
18
+ isSystemDefined: { type: Boolean, default: false },
19
+ isActive: { type: Boolean, default: true },
20
+ audit: [
21
+ {
22
+ userId: { type: String },
23
+ auditedOn: { type: Date, default: null },
24
+ actionType: { type: String },
25
+ },
26
+ ],
27
+ });
28
+
29
+ const mongopureStaticFieldMappingSchema =
30
+ mongoose.model<PureStaticFieldsCategoryMapping>(
31
+ "Editor.PureStatic.Category.Field.Mapping",
32
+ pureStaticFieldMappingSchema,
33
+ );
34
+
35
+ export { PureStaticFieldsCategoryMapping, mongopureStaticFieldMappingSchema };
@@ -0,0 +1,37 @@
1
+ import mongoose, { Document, Schema } from "mongoose";
2
+ import { Audit } from "../interface/Audit.interface";
3
+
4
+ interface SLITOCategoryFieldMapping extends Document {
5
+ categoryId: mongoose.Types.ObjectId;
6
+ fieldId: mongoose.Types.ObjectId;
7
+ membershipTypeId: mongoose.Types.ObjectId;
8
+ isSystemDefined: boolean;
9
+ isActive: boolean;
10
+ audit: Audit[];
11
+ }
12
+
13
+ const SLITOCategoryFieldMappingSchema = new Schema<SLITOCategoryFieldMapping>({
14
+ categoryId: { type: Schema.Types.ObjectId, ref: "Field.Categories" },
15
+ fieldId: { type: Schema.Types.ObjectId, ref: "Editor.Fields.Master" },
16
+ membershipTypeId: {
17
+ type: Schema.Types.ObjectId,
18
+ ref: "Membership.Types",
19
+ },
20
+ isSystemDefined: { type: Boolean, default: false },
21
+ isActive: { type: Boolean, default: true },
22
+ audit: [
23
+ {
24
+ userId: { type: String },
25
+ auditedOn: { type: Date, default: null },
26
+ actionType: { type: String },
27
+ },
28
+ ],
29
+ });
30
+
31
+ const mongoSLITOCategoryFieldMappingSchema =
32
+ mongoose.model<SLITOCategoryFieldMapping>(
33
+ "Editor.SLITO.Category.Field.Mapping",
34
+ SLITOCategoryFieldMappingSchema,
35
+ );
36
+
37
+ export { SLITOCategoryFieldMapping, mongoSLITOCategoryFieldMappingSchema };
@@ -0,0 +1,38 @@
1
+ //Editor.PureStaticFieldsMapping.ts
2
+
3
+ import mongoose, { Document, ObjectId, Schema, Types } from "mongoose";
4
+ import { Audit } from "../interface/Audit.interface";
5
+
6
+ interface StaticVariableFieldsCategoryMapping extends Document {
7
+ categoryId: mongoose.Types.ObjectId;
8
+ fieldId: mongoose.Types.ObjectId;
9
+ isSystemDefined: boolean;
10
+ isActive: boolean;
11
+ audit: Audit[];
12
+ }
13
+
14
+ const staticVariableFieldMappingSchema =
15
+ new Schema<StaticVariableFieldsCategoryMapping>({
16
+ categoryId: { type: Schema.Types.ObjectId, ref: "Field.Categories" },
17
+ fieldId: { type: Schema.Types.ObjectId, ref: "Editor.Fields.Master" },
18
+ isSystemDefined: { type: Boolean, default: false },
19
+ isActive: { type: Boolean, default: true },
20
+ audit: [
21
+ {
22
+ userId: { type: String },
23
+ auditedOn: { type: Date, default: null },
24
+ actionType: { type: String },
25
+ },
26
+ ],
27
+ });
28
+
29
+ const mongostaticVariableFieldMappingSchema =
30
+ mongoose.model<StaticVariableFieldsCategoryMapping>(
31
+ "Editor.StaticVariable.Category.Field.Mapping",
32
+ staticVariableFieldMappingSchema,
33
+ );
34
+
35
+ export {
36
+ StaticVariableFieldsCategoryMapping,
37
+ mongostaticVariableFieldMappingSchema,
38
+ };
@@ -0,0 +1,46 @@
1
+ import mongoose, { Document, Schema } from "mongoose";
2
+ import { Audit } from "../interface/Audit.interface";
3
+
4
+ interface EditorField extends Document {
5
+ fieldCode: string;
6
+ fieldName: string;
7
+ FieldTypeId: mongoose.Types.ObjectId;
8
+ isSystemDefined: boolean;
9
+ SapSync: boolean;
10
+ MemberEdit: boolean;
11
+ ManagerEdit: boolean;
12
+ Mandatory: boolean;
13
+ isActive: boolean;
14
+ audit: Audit[];
15
+ }
16
+
17
+ const fieldSchema = new Schema<EditorField>({
18
+ fieldCode: { type: String },
19
+ fieldName: { type: String },
20
+ FieldTypeId: {
21
+ type: Schema.Types.ObjectId,
22
+ ref: "Field.Types", // Reference to the 'Container' model
23
+ required: false,
24
+ default: null,
25
+ },
26
+ ManagerEdit: { type: Boolean, default: false },
27
+ MemberEdit: { type: Boolean, default: false },
28
+ SapSync: { type: Boolean, default: false },
29
+ Mandatory: { type: Boolean, default: false },
30
+ isSystemDefined: { type: Boolean, default: false },
31
+ isActive: { type: Boolean, default: true },
32
+ audit: [
33
+ {
34
+ userId: { type: String },
35
+ auditedOn: { type: Date, default: null },
36
+ actionType: { type: String },
37
+ },
38
+ ],
39
+ });
40
+
41
+ const mongoEditorField = mongoose.model<EditorField>(
42
+ "Editor.Fields.Master",
43
+ fieldSchema,
44
+ );
45
+
46
+ export { EditorField, mongoEditorField };
@@ -5,7 +5,6 @@ interface FieldCategoryDocument extends Document {
5
5
  fieldUUId: string;
6
6
  fieldCategoryCode: string;
7
7
  fieldCategoryName: string;
8
- containerId: mongoose.Types.ObjectId;
9
8
  isSystemDefined: boolean;
10
9
  isActive: boolean;
11
10
  audit: Audit[];
@@ -15,12 +14,6 @@ const fieldCategorySchema = new Schema<FieldCategoryDocument>({
15
14
  fieldUUId: { type: String },
16
15
  fieldCategoryCode: { type: String },
17
16
  fieldCategoryName: { type: String },
18
- containerId: {
19
- type: Schema.Types.ObjectId,
20
- ref: "Editor.Container", // Reference to the 'Container' model
21
- required: false,
22
- default: null,
23
- },
24
17
  isSystemDefined: { type: Boolean, default: false },
25
18
  isActive: { type: Boolean, default: true },
26
19
  audit: [
@@ -0,0 +1,154 @@
1
+ import mongoose, { Document, Schema } from "mongoose";
2
+ import { Audit } from "../interface/Audit.interface";
3
+
4
+ /* =========================
5
+ FIELD TYPE ENUM
6
+ ========================= */
7
+ export enum FieldTypeEnum {
8
+ TEXT = "TEXT",
9
+ NUMBER = "NUMBER",
10
+ CHECKBOX = "CHECKBOX",
11
+ DROPDOWN = "DROPDOWN",
12
+ TABLE = "TABLE",
13
+ MATRIX = "MATRIX",
14
+ }
15
+
16
+ /* =========================
17
+ CONFIG INTERFACES
18
+ ========================= */
19
+
20
+ // TEXT
21
+ export interface TextFieldConfig {
22
+ maxLength?: number;
23
+ minLength?: number;
24
+ placeholder?: string;
25
+ }
26
+
27
+ // OPTIONS (checkbox / dropdown)
28
+ export interface OptionConfig {
29
+ value: string;
30
+ label: string;
31
+ }
32
+
33
+ export interface OptionFieldConfig {
34
+ options: OptionConfig[];
35
+ allowMultiple?: boolean;
36
+ }
37
+
38
+ // TABLE
39
+ export interface TableColumn {
40
+ columnId: string;
41
+ label: string;
42
+ type: string; // can be dynamic
43
+ required?: boolean;
44
+ }
45
+
46
+ export interface TableFieldConfig {
47
+ columns: TableColumn[];
48
+ minRows?: number;
49
+ maxRows?: number;
50
+ }
51
+
52
+ // MATRIX
53
+ export interface MatrixRow {
54
+ rowId: string;
55
+ label: string;
56
+ }
57
+
58
+ export interface MatrixColumn {
59
+ columnId: string;
60
+ label: string;
61
+ type: string; // can be dynamic
62
+ }
63
+
64
+ export interface MatrixFieldConfig {
65
+ rows: MatrixRow[];
66
+ columns: MatrixColumn[];
67
+ }
68
+
69
+ /* =========================
70
+ UNION CONFIG TYPE
71
+ ========================= */
72
+ export type FieldConfig =
73
+ | TextFieldConfig
74
+ | OptionFieldConfig
75
+ | TableFieldConfig
76
+ | MatrixFieldConfig;
77
+
78
+ /* =========================
79
+ MAIN DOCUMENT INTERFACE
80
+ ========================= */
81
+ export interface EditorFieldType extends Document {
82
+ fieldTypeCode: string; // dynamic string code
83
+ fieldEnum: FieldTypeEnum; // holds enum value
84
+ fieldTypeName: string;
85
+ fieldTypeDescription?: string;
86
+ config: FieldConfig;
87
+ isSystemDefined: boolean;
88
+ isActive: boolean;
89
+ audit: Audit[];
90
+ }
91
+
92
+ /* =========================
93
+ SCHEMA
94
+ ========================= */
95
+ const fieldSchema = new Schema<EditorFieldType>(
96
+ {
97
+ fieldTypeCode: {
98
+ type: String,
99
+ required: true,
100
+ trim: true,
101
+ },
102
+
103
+ fieldEnum: {
104
+ type: String,
105
+ required: true,
106
+ enum: Object.values(FieldTypeEnum), // store only enum values
107
+ },
108
+
109
+ fieldTypeName: {
110
+ type: String,
111
+ required: true,
112
+ trim: true,
113
+ },
114
+
115
+ fieldTypeDescription: {
116
+ type: String,
117
+ trim: true,
118
+ },
119
+
120
+ config: {
121
+ type: Schema.Types.Mixed,
122
+ default: {},
123
+ },
124
+
125
+ isSystemDefined: {
126
+ type: Boolean,
127
+ default: false,
128
+ },
129
+
130
+ isActive: {
131
+ type: Boolean,
132
+ default: true,
133
+ },
134
+
135
+ audit: [
136
+ {
137
+ userId: { type: String },
138
+ auditedOn: { type: Date, default: null },
139
+ actionType: { type: String },
140
+ },
141
+ ],
142
+ },
143
+ {
144
+ timestamps: true,
145
+ },
146
+ );
147
+
148
+ /* =========================
149
+ MODEL
150
+ ========================= */
151
+ export const mongoEditorFieldType = mongoose.model<EditorFieldType>(
152
+ "Editor.FieldType",
153
+ fieldSchema,
154
+ );
@@ -0,0 +1,41 @@
1
+ import mongoose, { Document, Schema } from "mongoose";
2
+ import { Audit } from "../interface/Audit.interface";
3
+
4
+ interface MainProductsOrServicesMasterDocument extends Document {
5
+ MainProductsOrServicesMasterCode: string;
6
+ MainProductsOrServicesName: string;
7
+ prodcutServiceId: mongoose.Types.ObjectId;
8
+ isActive: boolean;
9
+ audit: Audit[];
10
+ }
11
+
12
+ const MainProductsOrServicesMasterSchema =
13
+ new Schema<MainProductsOrServicesMasterDocument>({
14
+ MainProductsOrServicesMasterCode: { type: String },
15
+ MainProductsOrServicesName: { type: String },
16
+ prodcutServiceId: {
17
+ type: Schema.Types.ObjectId,
18
+ ref: "Products.ServicesMaster", // Reference to the 'Products.ServicesMaster' model
19
+ required: false,
20
+ default: null,
21
+ },
22
+ isActive: { type: Boolean, default: true },
23
+ audit: [
24
+ {
25
+ userId: { type: String },
26
+ auditedOn: { type: Date, default: null },
27
+ actionType: { type: String },
28
+ },
29
+ ],
30
+ });
31
+
32
+ const mongoMainProductsOrServicesMaster =
33
+ mongoose.model<MainProductsOrServicesMasterDocument>(
34
+ "MainProductsOrServices.Master",
35
+ MainProductsOrServicesMasterSchema,
36
+ );
37
+
38
+ export {
39
+ MainProductsOrServicesMasterDocument,
40
+ mongoMainProductsOrServicesMaster,
41
+ };
@@ -1,5 +1,5 @@
1
- import mongoose, { Document, Schema } from 'mongoose';
2
- import { Audit } from '../interface/Audit.interface';
1
+ import mongoose, { Document, Schema } from "mongoose";
2
+ import { Audit } from "../interface/Audit.interface";
3
3
 
4
4
  interface MembershipTypeDocument extends Document {
5
5
  membershipTypeCode: string;
@@ -12,13 +12,18 @@ const membershipTypeSchema = new Schema<MembershipTypeDocument>({
12
12
  membershipTypeCode: { type: String },
13
13
  membershipTypeName: { type: String },
14
14
  isActive: { type: Boolean, default: true },
15
- audit: [{
16
- userId: { type: String },
17
- auditedOn: { type: Date, default: Date.now() },
18
- actionType: { type: String }
19
- }]
15
+ audit: [
16
+ {
17
+ userId: { type: String },
18
+ auditedOn: { type: Date, default: Date.now() },
19
+ actionType: { type: String },
20
+ },
21
+ ],
20
22
  });
21
23
 
22
- const mongoMembershipType = mongoose.model<MembershipTypeDocument>('Membership.Types', membershipTypeSchema);
24
+ const mongoMembershipType = mongoose.model<MembershipTypeDocument>(
25
+ "Membership.Types",
26
+ membershipTypeSchema,
27
+ );
23
28
 
24
29
  export { MembershipTypeDocument, mongoMembershipType };
@@ -4,6 +4,7 @@ import { Audit } from "../interface/Audit.interface";
4
4
  interface ProductsAndServicesMasterDocument extends Document {
5
5
  ProductsAndServicesMasterCode: string;
6
6
  ProductsAndServicesMasterName: string;
7
+ NatureOfBusinessId: mongoose.Types.ObjectId;
7
8
  isActive: boolean;
8
9
  audit: Audit[];
9
10
  }
@@ -12,6 +13,12 @@ const ProductsAndServicesMasterSchema =
12
13
  new Schema<ProductsAndServicesMasterDocument>({
13
14
  ProductsAndServicesMasterCode: { type: String },
14
15
  ProductsAndServicesMasterName: { type: String },
16
+ NatureOfBusinessId: {
17
+ type: Schema.Types.ObjectId,
18
+ ref: "NatureOfBusiness.Master", // Reference to the 'NatureOfBusiness' model
19
+ required: false,
20
+ default: null,
21
+ },
15
22
  isActive: { type: Boolean, default: true },
16
23
  audit: [
17
24
  {
@@ -25,7 +32,7 @@ const ProductsAndServicesMasterSchema =
25
32
  const mongoProductsAndServicesMaster =
26
33
  mongoose.model<ProductsAndServicesMasterDocument>(
27
34
  "Products.ServicesMaster",
28
- ProductsAndServicesMasterSchema
35
+ ProductsAndServicesMasterSchema,
29
36
  );
30
37
 
31
38
  export { ProductsAndServicesMasterDocument, mongoProductsAndServicesMaster };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pristine-member-nest-api-database",
3
- "version": "1.0.53",
3
+ "version": "1.0.55",
4
4
  "description": "application verification database changes with gs1 branch. not tested. ",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {