@chevre/domain 22.14.0-alpha.25 → 22.14.0-alpha.26
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.
|
@@ -12,6 +12,7 @@ async function main() {
|
|
|
12
12
|
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
13
13
|
|
|
14
14
|
await chevre.repository.Product.createInstance(mongoose.connection);
|
|
15
|
+
await chevre.repository.ProductOffer.createInstance(mongoose.connection);
|
|
15
16
|
console.log('success!');
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -50,10 +50,10 @@ const indexes = [
|
|
|
50
50
|
{ productID: 1 },
|
|
51
51
|
{ name: 'searchByProductID' }
|
|
52
52
|
],
|
|
53
|
-
[
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
],
|
|
53
|
+
// [
|
|
54
|
+
// { 'project.id': 1, productID: 1 },
|
|
55
|
+
// { name: 'searchByProjectId-v20220721' }
|
|
56
|
+
// ], // migrate to uniqueProductID(2025-09-30~)
|
|
57
57
|
[
|
|
58
58
|
{ 'hasOfferCatalog.id': 1, productID: 1 },
|
|
59
59
|
{
|
|
@@ -129,6 +129,16 @@ const indexes = [
|
|
|
129
129
|
additionalProperty: { $exists: true }
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
+
],
|
|
133
|
+
[
|
|
134
|
+
{
|
|
135
|
+
'project.id': 1,
|
|
136
|
+
productID: 1
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'uniqueProductID',
|
|
140
|
+
unique: true
|
|
141
|
+
}
|
|
132
142
|
]
|
|
133
143
|
];
|
|
134
144
|
exports.indexes = indexes;
|
|
@@ -47,6 +47,42 @@ const indexes = [
|
|
|
47
47
|
[
|
|
48
48
|
{ validFrom: 1 },
|
|
49
49
|
{ name: 'validFrom' }
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
{
|
|
53
|
+
'project.id': 1,
|
|
54
|
+
'itemOffered.identifier': 1,
|
|
55
|
+
identifier: 1
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'uniqueByItemOfferedAndIdentifier',
|
|
59
|
+
unique: true
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
[
|
|
63
|
+
{ 'project.id': 1, validFrom: 1 },
|
|
64
|
+
{ name: 'projectId' }
|
|
65
|
+
],
|
|
66
|
+
[
|
|
67
|
+
{ identifier: 1, validFrom: 1 },
|
|
68
|
+
{ name: 'identifier' }
|
|
69
|
+
],
|
|
70
|
+
[
|
|
71
|
+
{ 'itemOffered.identifier': 1, validFrom: 1 },
|
|
72
|
+
{ name: 'itemOfferedIdentifier' }
|
|
73
|
+
],
|
|
74
|
+
[
|
|
75
|
+
{ validThrough: 1, validFrom: 1 },
|
|
76
|
+
{ name: 'validThrough' }
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
{ 'validForMemberTier.identifier': 1, validFrom: 1 },
|
|
80
|
+
{
|
|
81
|
+
name: 'validForMemberTierIdentifier',
|
|
82
|
+
partialFilterExpression: {
|
|
83
|
+
'validForMemberTier.identifier': { $exists: true }
|
|
84
|
+
}
|
|
85
|
+
}
|
|
50
86
|
]
|
|
51
87
|
];
|
|
52
88
|
exports.indexes = indexes;
|
package/package.json
CHANGED