pristine-member-nest-api-database 1.0.81 → 1.0.82
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.
|
@@ -31,10 +31,12 @@ const ApplicationSchemSchema = new mongoose_1.Schema({
|
|
|
31
31
|
BPCompanyTypeId: {
|
|
32
32
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
33
33
|
ref: "Editor.BPCompany.Types",
|
|
34
|
+
default: null,
|
|
34
35
|
},
|
|
35
36
|
membershipTypeId: {
|
|
36
37
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
37
38
|
ref: "Membership.Types",
|
|
39
|
+
default: null,
|
|
38
40
|
},
|
|
39
41
|
applicationName: { type: String },
|
|
40
42
|
applicationDescription: { type: String },
|
|
@@ -92,5 +94,15 @@ const ApplicationSchemSchema = new mongoose_1.Schema({
|
|
|
92
94
|
},
|
|
93
95
|
],
|
|
94
96
|
});
|
|
97
|
+
ApplicationSchemSchema.index({
|
|
98
|
+
branchId: 1,
|
|
99
|
+
BPCompanyTypeId: 1,
|
|
100
|
+
membershipTypeId: 1,
|
|
101
|
+
}, {
|
|
102
|
+
unique: true,
|
|
103
|
+
partialFilterExpression: {
|
|
104
|
+
branchId: { $exists: true },
|
|
105
|
+
},
|
|
106
|
+
});
|
|
95
107
|
const mongoApplicationSchema = mongoose_1.default.model("Editor.Application", ApplicationSchemSchema);
|
|
96
108
|
exports.mongoApplicationSchema = mongoApplicationSchema;
|
|
@@ -36,10 +36,12 @@ const ApplicationSchemSchema = new Schema<IApplicationDocument>({
|
|
|
36
36
|
BPCompanyTypeId: {
|
|
37
37
|
type: Schema.Types.ObjectId,
|
|
38
38
|
ref: "Editor.BPCompany.Types",
|
|
39
|
+
default: null,
|
|
39
40
|
},
|
|
40
41
|
membershipTypeId: {
|
|
41
42
|
type: Schema.Types.ObjectId,
|
|
42
43
|
ref: "Membership.Types",
|
|
44
|
+
default: null,
|
|
43
45
|
},
|
|
44
46
|
applicationName: { type: String },
|
|
45
47
|
applicationDescription: { type: String },
|
|
@@ -103,8 +105,22 @@ const ApplicationSchemSchema = new Schema<IApplicationDocument>({
|
|
|
103
105
|
],
|
|
104
106
|
});
|
|
105
107
|
|
|
108
|
+
ApplicationSchemSchema.index(
|
|
109
|
+
{
|
|
110
|
+
branchId: 1,
|
|
111
|
+
BPCompanyTypeId: 1,
|
|
112
|
+
membershipTypeId: 1,
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
unique: true,
|
|
116
|
+
partialFilterExpression: {
|
|
117
|
+
branchId: { $exists: true },
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
);
|
|
106
121
|
const mongoApplicationSchema = mongoose.model<IApplicationDocument>(
|
|
107
122
|
"Editor.Application",
|
|
108
123
|
ApplicationSchemSchema,
|
|
109
124
|
);
|
|
125
|
+
|
|
110
126
|
export { IApplicationDocument, mongoApplicationSchema };
|