pristine-member-nest-api-database 1.0.72 → 1.0.74
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.
|
@@ -43,5 +43,7 @@ const BpCompanyBranchFieldMappingSchema = new mongoose_1.Schema({
|
|
|
43
43
|
},
|
|
44
44
|
],
|
|
45
45
|
});
|
|
46
|
+
// (composite unique key)
|
|
47
|
+
BpCompanyBranchFieldMappingSchema.index({ BranchId: 1, companyTypeId: 1, fieldId: 1 }, { unique: true });
|
|
46
48
|
const mongoBpCompanyBranchFieldMapping = mongoose_1.default.model("Editor.Branch.CompanyTypes.Field.Mapping", BpCompanyBranchFieldMappingSchema);
|
|
47
49
|
exports.mongoBpCompanyBranchFieldMapping = mongoBpCompanyBranchFieldMapping;
|
|
@@ -23,10 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.mongoSLITOBranchMembershipTypeFieldMapping = void 0;
|
|
27
27
|
const mongoose_1 = __importStar(require("mongoose"));
|
|
28
28
|
const SLITOCategoryFieldMappingSchema = new mongoose_1.Schema({
|
|
29
|
-
categoryId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Field.Categories" },
|
|
30
29
|
fieldId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Editor.Fields.Master" },
|
|
31
30
|
membershipTypeId: {
|
|
32
31
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
@@ -42,5 +41,5 @@ const SLITOCategoryFieldMappingSchema = new mongoose_1.Schema({
|
|
|
42
41
|
},
|
|
43
42
|
],
|
|
44
43
|
});
|
|
45
|
-
const
|
|
46
|
-
exports.
|
|
44
|
+
const mongoSLITOBranchMembershipTypeFieldMapping = mongoose_1.default.model("Editor.SLITO.Branch.Membership.Field.Mapping", SLITOCategoryFieldMappingSchema);
|
|
45
|
+
exports.mongoSLITOBranchMembershipTypeFieldMapping = mongoSLITOBranchMembershipTypeFieldMapping;
|
|
@@ -29,7 +29,11 @@ const BpCompanyBranchFieldMappingSchema =
|
|
|
29
29
|
},
|
|
30
30
|
],
|
|
31
31
|
});
|
|
32
|
-
|
|
32
|
+
// (composite unique key)
|
|
33
|
+
BpCompanyBranchFieldMappingSchema.index(
|
|
34
|
+
{ BranchId: 1, companyTypeId: 1, fieldId: 1 },
|
|
35
|
+
{ unique: true },
|
|
36
|
+
);
|
|
33
37
|
const mongoBpCompanyBranchFieldMapping =
|
|
34
38
|
mongoose.model<BPCompanyBranchFieldMapping>(
|
|
35
39
|
"Editor.Branch.CompanyTypes.Field.Mapping",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import mongoose, { Document, Schema } from "mongoose";
|
|
2
2
|
import { Audit } from "../interface/Audit.interface";
|
|
3
3
|
|
|
4
|
-
interface
|
|
5
|
-
categoryId: mongoose.Types.ObjectId;
|
|
4
|
+
interface SLITOBranchMembershipTypeFieldMapping extends Document {
|
|
6
5
|
fieldId: mongoose.Types.ObjectId;
|
|
7
6
|
membershipTypeId: mongoose.Types.ObjectId;
|
|
8
7
|
isSystemDefined: boolean;
|
|
@@ -10,28 +9,31 @@ interface SLITOCategoryFieldMapping extends Document {
|
|
|
10
9
|
audit: Audit[];
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
const SLITOCategoryFieldMappingSchema =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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 },
|
|
12
|
+
const SLITOCategoryFieldMappingSchema =
|
|
13
|
+
new Schema<SLITOBranchMembershipTypeFieldMapping>({
|
|
14
|
+
fieldId: { type: Schema.Types.ObjectId, ref: "Editor.Fields.Master" },
|
|
15
|
+
membershipTypeId: {
|
|
16
|
+
type: Schema.Types.ObjectId,
|
|
17
|
+
ref: "Membership.Types",
|
|
27
18
|
},
|
|
28
|
-
|
|
29
|
-
}
|
|
19
|
+
isSystemDefined: { type: Boolean, default: false },
|
|
20
|
+
isActive: { type: Boolean, default: true },
|
|
21
|
+
audit: [
|
|
22
|
+
{
|
|
23
|
+
userId: { type: String },
|
|
24
|
+
auditedOn: { type: Date, default: null },
|
|
25
|
+
actionType: { type: String },
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
});
|
|
30
29
|
|
|
31
|
-
const
|
|
32
|
-
mongoose.model<
|
|
33
|
-
"Editor.SLITO.
|
|
30
|
+
const mongoSLITOBranchMembershipTypeFieldMapping =
|
|
31
|
+
mongoose.model<SLITOBranchMembershipTypeFieldMapping>(
|
|
32
|
+
"Editor.SLITO.Branch.Membership.Field.Mapping",
|
|
34
33
|
SLITOCategoryFieldMappingSchema,
|
|
35
34
|
);
|
|
36
35
|
|
|
37
|
-
export {
|
|
36
|
+
export {
|
|
37
|
+
SLITOBranchMembershipTypeFieldMapping,
|
|
38
|
+
mongoSLITOBranchMembershipTypeFieldMapping,
|
|
39
|
+
};
|