pristine-member-nest-api-database 1.0.80 → 1.0.81

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,2 +1,96 @@
1
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
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.mongoApplicationSchema = void 0;
27
+ const mongoose_1 = __importStar(require("mongoose"));
28
+ const ApplicationSchemSchema = new mongoose_1.Schema({
29
+ branchId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Branches" },
30
+ dynamicTemplateId: { type: mongoose_1.Schema.Types.ObjectId, ref: "DynamicTemplates" },
31
+ BPCompanyTypeId: {
32
+ type: mongoose_1.Schema.Types.ObjectId,
33
+ ref: "Editor.BPCompany.Types",
34
+ },
35
+ membershipTypeId: {
36
+ type: mongoose_1.Schema.Types.ObjectId,
37
+ ref: "Membership.Types",
38
+ },
39
+ applicationName: { type: String },
40
+ applicationDescription: { type: String },
41
+ categories: {
42
+ type: [
43
+ {
44
+ categoryId: {
45
+ type: mongoose_1.Schema.Types.ObjectId,
46
+ ref: "Field.Categories",
47
+ required: true,
48
+ },
49
+ categorySequence: {
50
+ type: Number,
51
+ required: true,
52
+ },
53
+ fields: [
54
+ {
55
+ fieldId: {
56
+ type: mongoose_1.Schema.Types.ObjectId,
57
+ ref: "Field.Categories", // (optional: should be Field.Master probably)
58
+ required: true,
59
+ },
60
+ fieldSequence: {
61
+ type: Number,
62
+ required: true,
63
+ },
64
+ fieldDescription: {
65
+ type: String,
66
+ default: "",
67
+ },
68
+ activeStatus: {
69
+ type: Boolean,
70
+ default: true,
71
+ },
72
+ },
73
+ ],
74
+ },
75
+ ],
76
+ required: true,
77
+ },
78
+ approverOneEnabled: { type: Boolean, default: true },
79
+ approverTwoEnabled: { type: Boolean, default: true },
80
+ IsMembershipExtraDetailsEnabled: { type: Boolean, default: true },
81
+ IsMembershipRatesTableEnabled: { type: Boolean, default: true },
82
+ organizationApplicationEnabled: { type: Boolean, default: true },
83
+ SLITOptionEnabled: { type: Boolean, default: true },
84
+ OtherInfoEnabled: { type: Boolean, default: true },
85
+ createdDate: { type: Date, default: null },
86
+ isActive: { type: Boolean, default: true },
87
+ audit: [
88
+ {
89
+ userId: { type: String },
90
+ auditedOn: { type: Date, default: null },
91
+ actionType: { type: String },
92
+ },
93
+ ],
94
+ });
95
+ const mongoApplicationSchema = mongoose_1.default.model("Editor.Application", ApplicationSchemSchema);
96
+ exports.mongoApplicationSchema = mongoApplicationSchema;
@@ -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.mongoBranchBpCompanyTypesFieldMappingSchema = void 0;
27
+ // Editor.BPcompanyTpes.Branch.Field.Category.Mapping.ts
28
+ const mongoose_1 = __importStar(require("mongoose"));
29
+ const BranchCompanyTypesFieldMappingSchema = 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
+ fieldId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Editor.Fields.Master" },
36
+ isSystemDefined: { type: Boolean, default: false },
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 mongoBranchBpCompanyTypesFieldMappingSchema = mongoose_1.default.model("Editor.Branch.CompanyTypes.Field.Mapping", BranchCompanyTypesFieldMappingSchema);
47
+ exports.mongoBranchBpCompanyTypesFieldMappingSchema = mongoBranchBpCompanyTypesFieldMappingSchema;
@@ -27,7 +27,7 @@ exports.mongoBpCompanyBranchFieldMapping = void 0;
27
27
  // Editor.BPcompanyTpes.Branch.Field.Category.Mapping.ts
28
28
  const mongoose_1 = __importStar(require("mongoose"));
29
29
  const BpCompanyBranchFieldMappingSchema = new mongoose_1.Schema({
30
- BranchId: { type: mongoose_1.Schema.Types.ObjectId, ref: "branches" },
30
+ BranchId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Branch" },
31
31
  companyTypeId: {
32
32
  type: mongoose_1.Schema.Types.ObjectId,
33
33
  ref: "Editor.BPCompany.Types",
@@ -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,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.mongoSLITOBranchMembershipTypeFieldMapping = void 0;
27
+ const mongoose_1 = __importStar(require("mongoose"));
28
+ const SLITOCategoryFieldMappingSchema = new mongoose_1.Schema({
29
+ branchId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Editor.Fields.Master" },
30
+ fieldId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Branches" },
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
+ //(composite unique key)
46
+ SLITOCategoryFieldMappingSchema.index({ branchId: 1, membershipTypeId: 1, fieldId: 1 }, { unique: true });
47
+ const mongoSLITOBranchMembershipTypeFieldMapping = mongoose_1.default.model("Editor.SLITO.Branch.Membership.Field.Mapping", SLITOCategoryFieldMappingSchema);
48
+ exports.mongoSLITOBranchMembershipTypeFieldMapping = mongoSLITOBranchMembershipTypeFieldMapping;
@@ -0,0 +1,57 @@
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
+ fieldConfig: {
41
+ mandatory: { type: Boolean, default: false },
42
+ minLength: { type: Number, default: null },
43
+ maxLength: { type: Number, default: null },
44
+ pattern: { type: String, default: null },
45
+ },
46
+ isSystemDefined: { type: Boolean, default: false },
47
+ isActive: { type: Boolean, default: true },
48
+ audit: [
49
+ {
50
+ userId: { type: String },
51
+ auditedOn: { type: Date, default: null },
52
+ actionType: { type: String },
53
+ },
54
+ ],
55
+ });
56
+ const mongoEditorField = mongoose_1.default.model("Editor.Fields.Master", fieldSchema);
57
+ exports.mongoEditorField = mongoEditorField;
@@ -0,0 +1,93 @@
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["WHOLENUMBER"] = "WHOLENUMBER";
35
+ FieldTypeEnum["DECIMALNUMBER"] = "DECIMALNUMBER";
36
+ FieldTypeEnum["EMAIL"] = "EMAIL";
37
+ FieldTypeEnum["DATE"] = "DATE";
38
+ FieldTypeEnum["CHECKBOX"] = "CHECKBOX";
39
+ FieldTypeEnum["DROPDOWN"] = "DROPDOWN";
40
+ FieldTypeEnum["MULTISELECT"] = "MULTISELECT";
41
+ FieldTypeEnum["SINGLECOUNTRYFLAG"] = "SINGLECOUNTRYFLAG";
42
+ FieldTypeEnum["MULTIPLECOUNTRYFLAG"] = "MULTIPLECOUNTRYFLAG";
43
+ FieldTypeEnum["SINGLEATTACHMENT"] = "SINGLEATTACHMENT";
44
+ FieldTypeEnum["MULTIPLEATTACHMENT"] = "MULTIPLEATTACHMENT";
45
+ FieldTypeEnum["TABLE"] = "TABLE";
46
+ FieldTypeEnum["MATRIX"] = "MATRIX";
47
+ FieldTypeEnum["SCHEMA"] = "SCHEMA";
48
+ })(FieldTypeEnum || (exports.FieldTypeEnum = FieldTypeEnum = {}));
49
+ /* =========================
50
+ SCHEMA
51
+ ========================= */
52
+ const fieldTypeSchema = new mongoose_1.Schema({
53
+ fieldTypeCode: {
54
+ type: String,
55
+ required: true,
56
+ trim: true,
57
+ },
58
+ fieldEnum: {
59
+ type: String,
60
+ required: true,
61
+ enum: Object.values(FieldTypeEnum), // store only enum values
62
+ },
63
+ fieldTypeName: {
64
+ type: String,
65
+ required: true,
66
+ trim: true,
67
+ },
68
+ fieldTypeDescription: {
69
+ type: String,
70
+ trim: true,
71
+ },
72
+ isSystemDefined: {
73
+ type: Boolean,
74
+ default: false,
75
+ },
76
+ isActive: {
77
+ type: Boolean,
78
+ default: true,
79
+ },
80
+ audit: [
81
+ {
82
+ userId: { type: String },
83
+ auditedOn: { type: Date, default: null },
84
+ actionType: { type: String },
85
+ },
86
+ ],
87
+ }, {
88
+ timestamps: true,
89
+ });
90
+ /* =========================
91
+ MODEL
92
+ ========================= */
93
+ exports.mongoEditorFieldType = mongoose_1.default.model("Editor.FieldType", fieldTypeSchema);
@@ -0,0 +1,254 @@
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.mongoMember = void 0;
27
+ const mongoose_1 = __importStar(require("mongoose"));
28
+ mongoose_1.default.set("strictPopulate", false);
29
+ // File schema
30
+ const fileSchema = new mongoose_1.Schema({
31
+ baseURL: { type: String },
32
+ fileName: { type: String },
33
+ fileExtension: { type: String },
34
+ });
35
+ const memberSchema = new mongoose_1.Schema({
36
+ memberId: { type: Number },
37
+ memberCode: { type: String, default: "" },
38
+ memberName: { type: String },
39
+ isMemberOfMasterBranch: { type: Boolean, default: false },
40
+ taxIdentificationNo: { type: String },
41
+ vatNo: { type: String },
42
+ vatAttachment: fileSchema,
43
+ svatNo: { type: String },
44
+ svatAttachment: fileSchema,
45
+ brNo: { type: String, default: "" },
46
+ brAttachment: fileSchema,
47
+ nicNo: { type: String, default: "" },
48
+ nicAttachment: fileSchema,
49
+ webSite: { type: String, default: "" },
50
+ generalTelNo: { type: String },
51
+ generalEmail: { type: String },
52
+ isTaxRegistered: { type: Boolean, default: false },
53
+ conglomerateAddress: {
54
+ addressLine1: { type: String },
55
+ addressLine2: { type: String, default: "" },
56
+ addressLine3: { type: String, default: "" },
57
+ block: { type: String, default: "" },
58
+ city: { type: String },
59
+ country: { type: String },
60
+ },
61
+ otherAttachment: [fileSchema],
62
+ typeOfOrganization: {
63
+ type: mongoose_1.Schema.Types.ObjectId,
64
+ ref: "OrganizationType.Master",
65
+ },
66
+ natureOfBusiness: {
67
+ type: [mongoose_1.Schema.Types.ObjectId],
68
+ ref: "NatureOfBusiness.Master",
69
+ },
70
+ mainProductsOrServices: {
71
+ type: [mongoose_1.Schema.Types.ObjectId],
72
+ ref: "Products.ServicesMaster",
73
+ },
74
+ countryOfExportsOrImports: { type: [String], default: [] },
75
+ noOfExecutiveEmployees: { type: Number, default: 0 },
76
+ noOfNoneOfExecutiveEmployees: { type: Number, default: 0 },
77
+ keyExecutivesDetails: {
78
+ chairmanName: { type: String, default: "" },
79
+ chairmanEmail: { type: String, default: "" },
80
+ chairmanphone: { type: String, default: "" },
81
+ managingDirectorName: { type: String, default: "" },
82
+ managingDirectorEmail: { type: String, default: "" },
83
+ managingDirectorPhone: { type: String, default: "" },
84
+ ceoName: { type: String, default: "" },
85
+ ceoEmail: { type: String, default: "" },
86
+ ceoPhone: { type: String, default: "" },
87
+ headOfHrName: { type: String, default: "" },
88
+ headofHrEmail: { type: String, default: "" },
89
+ headofHrPhone: { type: String, default: "" },
90
+ headOfMarketingName: { type: String, default: "" },
91
+ headOfMarketingEmail: { type: String, default: "" },
92
+ headOfMarketingPhone: { type: String, default: "" },
93
+ cfoName: { type: String, default: "" },
94
+ cfoEmail: { type: String, default: "" },
95
+ cfoPhone: { type: String, default: "" },
96
+ countryManagerName: { type: String, default: "" },
97
+ countryManagerEmail: { type: String, default: "" },
98
+ countryManagerPhone: { type: String, default: "" },
99
+ },
100
+ isMemberContactSynced: { type: Boolean, default: false },
101
+ memberContactSyncedOn: { type: Date, default: null },
102
+ isCreatedInSAP: { type: Boolean, default: false },
103
+ isMemberSyncedWithSAP: { type: Boolean, default: false },
104
+ memberSyncedOn: { type: Date, default: null },
105
+ isActive: { type: Boolean },
106
+ memberAssociation: [
107
+ {
108
+ branch: {
109
+ type: mongoose_1.Schema.Types.ObjectId,
110
+ ref: "Branches", // Reference to the 'Branches' model
111
+ },
112
+ associationMemberCode: { type: String, default: "" },
113
+ membershipStatus: {
114
+ type: mongoose_1.Schema.Types.ObjectId,
115
+ ref: "Membership.Statuses", // Reference to the 'Membership.Statuses' model
116
+ },
117
+ membershipType: {
118
+ type: mongoose_1.Schema.Types.ObjectId,
119
+ ref: "Membership.Types", // Reference to the 'Membership.Types' model
120
+ },
121
+ electedDate: { type: Date, default: null },
122
+ contactInfo: {
123
+ bpShortCode: { type: String, default: "" },
124
+ firstName: { type: String },
125
+ lastName: { type: String },
126
+ contactTelNo1: { type: String },
127
+ contactEmail1: { type: String },
128
+ contactDesignation: { type: String },
129
+ contactAddress: { type: String },
130
+ contactAddress2: { type: String },
131
+ city: { type: String },
132
+ isSAPSynced: { type: Boolean, default: false },
133
+ lastSyncedOn: { type: Date, default: null },
134
+ },
135
+ isTerminated: { type: Boolean, default: false },
136
+ terminatedDate: { type: Date, default: null },
137
+ reasonForTermination: { type: String, default: "" },
138
+ barcodeAssociation: {
139
+ type: [
140
+ {
141
+ isRegisteredMembership: {
142
+ type: Boolean,
143
+ required: true,
144
+ },
145
+ isMembershipRequested: {
146
+ type: Boolean,
147
+ default: true,
148
+ },
149
+ membershipType: {
150
+ type: mongoose_1.default.Types.ObjectId,
151
+ ref: "Membership.Types",
152
+ required: true,
153
+ },
154
+ membershipStatus: {
155
+ type: mongoose_1.default.Types.ObjectId,
156
+ ref: "Membership.Statuses",
157
+ required: true,
158
+ },
159
+ remarks: {
160
+ type: String,
161
+ },
162
+ requestedDate: {
163
+ type: Date,
164
+ default: Date.now,
165
+ },
166
+ isMembershipSynced: {
167
+ type: Boolean,
168
+ default: false,
169
+ },
170
+ noOfSubscriptionMonths: {
171
+ type: Number,
172
+ },
173
+ isIssued: {
174
+ type: Boolean,
175
+ },
176
+ electedDate: {
177
+ type: Date,
178
+ },
179
+ barcodeBranchMemberCode: {
180
+ type: String,
181
+ },
182
+ barCode: {
183
+ type: Number,
184
+ },
185
+ validFrom: {
186
+ type: Date,
187
+ },
188
+ validTo: {
189
+ type: Date,
190
+ },
191
+ countryCode: {
192
+ type: Number,
193
+ },
194
+ changeDate: {
195
+ type: Date,
196
+ },
197
+ isTerminationRequested: {
198
+ type: Boolean,
199
+ default: false,
200
+ },
201
+ isTerminationSynced: {
202
+ type: Boolean,
203
+ default: false,
204
+ },
205
+ terminationRequestedDate: {
206
+ type: Date,
207
+ },
208
+ terminationDate: {
209
+ type: Date,
210
+ },
211
+ terminationReason: {
212
+ type: String,
213
+ },
214
+ },
215
+ ],
216
+ },
217
+ dynamicDetails: { type: JSON, default: null },
218
+ isTerminationRequested: { type: Boolean, default: false },
219
+ terminationRequestedDate: { type: Date, default: null },
220
+ terminationRequestedBy: { type: String, default: "" },
221
+ terminationRequestRemarks: { type: String, default: "" },
222
+ onOfSubscriptionMonths: { type: Number, default: 0 },
223
+ applicationStatus: { type: String, default: "PENDING" },
224
+ reviewedBy: {
225
+ type: mongoose_1.Schema.Types.ObjectId,
226
+ ref: "Users", // Reference to the 'Users' model
227
+ default: null,
228
+ },
229
+ reviewedOn: { type: Date, default: null },
230
+ isEnrolmentCreatedInSAP: { type: Boolean, default: false },
231
+ isEnrolmentSyncedWithSAP: { type: Boolean, default: false },
232
+ enrolmentSyncedOn: { type: Date, default: null },
233
+ isActive: { type: Boolean, default: true },
234
+ createdDate: {
235
+ type: mongoose_1.Schema.Types.Date,
236
+ required: false,
237
+ default: Date.now,
238
+ },
239
+ salesOrderDocEntry: { type: String, default: "" },
240
+ salesOrderStatus: { type: String, default: "" },
241
+ approveRemarks: { type: String, default: "" },
242
+ rejectRemarks: { type: String, default: "" },
243
+ },
244
+ ],
245
+ audit: [
246
+ {
247
+ userId: { type: String },
248
+ auditedOn: { type: Date, default: null },
249
+ actionType: { type: String },
250
+ },
251
+ ],
252
+ });
253
+ const mongoMember = mongoose_1.default.model("Members", memberSchema);
254
+ exports.mongoMember = mongoMember;
@@ -8,10 +8,12 @@ import IApplicationCategory from "../interface/IApplicationCategory.interface";
8
8
 
9
9
  interface IApplicationDocument extends Document {
10
10
  branchId: Types.ObjectId;
11
+ dynamicTemplateId: Types.ObjectId;
12
+ BPCompanyTypeId: Types.ObjectId;
13
+ membershipTypeId: Types.ObjectId;
11
14
  applicationName: string;
12
15
  applicationDescription: string;
13
16
  categories: IApplicationCategory[];
14
- dynamicTemplateId: Types.ObjectId;
15
17
 
16
18
  // STATIC VARIBLE CONFIG ON BRANCH CONFIG LEVEL
17
19
  SLITOptionEnabled: boolean;
@@ -24,5 +26,85 @@ interface IApplicationDocument extends Document {
24
26
 
25
27
  // STATIC VARIBLE CONFIG ON BRANCH CONFIG LEVEL END HERE
26
28
  createdDate: Schema.Types.Date;
29
+ isActive: boolean;
27
30
  audit: Audit[];
28
31
  }
32
+
33
+ const ApplicationSchemSchema = new Schema<IApplicationDocument>({
34
+ branchId: { type: Schema.Types.ObjectId, ref: "Branches" },
35
+ dynamicTemplateId: { type: Schema.Types.ObjectId, ref: "DynamicTemplates" },
36
+ BPCompanyTypeId: {
37
+ type: Schema.Types.ObjectId,
38
+ ref: "Editor.BPCompany.Types",
39
+ },
40
+ membershipTypeId: {
41
+ type: Schema.Types.ObjectId,
42
+ ref: "Membership.Types",
43
+ },
44
+ applicationName: { type: String },
45
+ applicationDescription: { type: String },
46
+ categories: {
47
+ type: [
48
+ {
49
+ categoryId: {
50
+ type: Schema.Types.ObjectId,
51
+ ref: "Field.Categories",
52
+ required: true,
53
+ },
54
+
55
+ categorySequence: {
56
+ type: Number,
57
+ required: true,
58
+ },
59
+
60
+ fields: [
61
+ {
62
+ fieldId: {
63
+ type: Schema.Types.ObjectId,
64
+ ref: "Field.Categories", // (optional: should be Field.Master probably)
65
+ required: true,
66
+ },
67
+
68
+ fieldSequence: {
69
+ type: Number,
70
+ required: true,
71
+ },
72
+
73
+ fieldDescription: {
74
+ type: String,
75
+ default: "",
76
+ },
77
+
78
+ activeStatus: {
79
+ type: Boolean,
80
+ default: true,
81
+ },
82
+ },
83
+ ],
84
+ },
85
+ ],
86
+ required: true,
87
+ },
88
+ approverOneEnabled: { type: Boolean, default: true },
89
+ approverTwoEnabled: { type: Boolean, default: true },
90
+ IsMembershipExtraDetailsEnabled: { type: Boolean, default: true },
91
+ IsMembershipRatesTableEnabled: { type: Boolean, default: true },
92
+ organizationApplicationEnabled: { type: Boolean, default: true },
93
+ SLITOptionEnabled: { type: Boolean, default: true },
94
+ OtherInfoEnabled: { type: Boolean, default: true },
95
+ createdDate: { type: Date, default: null },
96
+ isActive: { type: Boolean, default: true },
97
+ audit: [
98
+ {
99
+ userId: { type: String },
100
+ auditedOn: { type: Date, default: null },
101
+ actionType: { type: String },
102
+ },
103
+ ],
104
+ });
105
+
106
+ const mongoApplicationSchema = mongoose.model<IApplicationDocument>(
107
+ "Editor.Application",
108
+ ApplicationSchemSchema,
109
+ );
110
+ export { IApplicationDocument, mongoApplicationSchema };
@@ -13,7 +13,7 @@ interface BPCompanyBranchFieldMapping extends Document {
13
13
 
14
14
  const BpCompanyBranchFieldMappingSchema =
15
15
  new Schema<BPCompanyBranchFieldMapping>({
16
- BranchId: { type: Schema.Types.ObjectId, ref: "branches" },
16
+ BranchId: { type: Schema.Types.ObjectId, ref: "Branch" },
17
17
  companyTypeId: {
18
18
  type: Schema.Types.ObjectId,
19
19
  ref: "Editor.BPCompany.Types",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pristine-member-nest-api-database",
3
- "version": "1.0.80",
3
+ "version": "1.0.81",
4
4
  "description": "application verification database changes with gs1 branch. not tested. ",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {