@chevre/domain 21.0.0-alpha.7 → 21.0.0-alpha.9
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.
- package/lib/chevre/errorHandler.d.ts +1 -0
- package/lib/chevre/errorHandler.js +6 -2
- package/lib/chevre/repo/account.d.ts +0 -2
- package/lib/chevre/repo/account.js +9 -5
- package/lib/chevre/repo/accountTitle.js +5 -1
- package/lib/chevre/repo/accountTransaction.d.ts +0 -2
- package/lib/chevre/repo/accountTransaction.js +8 -5
- package/lib/chevre/repo/accountingReport.js +6 -2
- package/lib/chevre/repo/action.d.ts +1 -2
- package/lib/chevre/repo/action.js +8 -5
- package/lib/chevre/repo/additionalProperty.js +7 -3
- package/lib/chevre/repo/aggregation.js +5 -1
- package/lib/chevre/repo/assetTransaction.d.ts +1 -2
- package/lib/chevre/repo/assetTransaction.js +8 -5
- package/lib/chevre/repo/categoryCode.js +7 -3
- package/lib/chevre/repo/code.d.ts +1 -1
- package/lib/chevre/repo/code.js +7 -3
- package/lib/chevre/repo/comment.js +7 -3
- package/lib/chevre/repo/creativeWork.d.ts +0 -2
- package/lib/chevre/repo/creativeWork.js +8 -5
- package/lib/chevre/repo/customer.js +7 -3
- package/lib/chevre/repo/emailMessage.js +7 -3
- package/lib/chevre/repo/event.js +7 -3
- package/lib/chevre/repo/member.js +15 -8
- package/lib/chevre/repo/merchantReturnPolicy.d.ts +0 -2
- package/lib/chevre/repo/merchantReturnPolicy.js +8 -5
- package/lib/chevre/repo/mongoose/onIndexCreated.d.ts +2 -0
- package/lib/chevre/repo/mongoose/onIndexCreated.js +11 -0
- package/lib/chevre/repo/offer.js +9 -4
- package/lib/chevre/repo/offerCatalog.js +7 -3
- package/lib/chevre/repo/order.d.ts +0 -2
- package/lib/chevre/repo/order.js +11 -8
- package/lib/chevre/repo/ownershipInfo.d.ts +0 -2
- package/lib/chevre/repo/ownershipInfo.js +9 -6
- package/lib/chevre/repo/permit.js +5 -1
- package/lib/chevre/repo/place.js +15 -11
- package/lib/chevre/repo/priceSpecification.js +7 -3
- package/lib/chevre/repo/product.js +7 -3
- package/lib/chevre/repo/project.js +7 -3
- package/lib/chevre/repo/reservation.js +7 -20
- package/lib/chevre/repo/role.js +7 -3
- package/lib/chevre/repo/seller.js +7 -3
- package/lib/chevre/repo/serviceOutput.js +7 -3
- package/lib/chevre/repo/task.js +7 -3
- package/lib/chevre/repo/telemetry.js +5 -1
- package/lib/chevre/repo/transaction.d.ts +1 -2
- package/lib/chevre/repo/transaction.js +8 -5
- package/lib/chevre/repo/trip.js +7 -3
- package/lib/chevre/service/accountTransaction/deposit.js +0 -5
- package/lib/chevre/service/accountTransaction/transfer.js +0 -5
- package/lib/chevre/service/accountTransaction/withdraw.js +0 -5
- package/lib/chevre/service/assetTransaction/moneyTransfer.js +0 -5
- package/lib/chevre/service/assetTransaction/refund.js +0 -5
- package/lib/chevre/service/assetTransaction/registerService.js +0 -5
- package/lib/chevre/service/assetTransaction/reserve.js +0 -10
- package/lib/chevre/service/transaction/moneyTransfer.js +0 -5
- package/lib/chevre/service/transaction/placeOrderInProgress.js +2 -2
- package/lib/chevre/service/transaction/returnOrder.js +1 -1
- package/package.json +1 -1
- /package/lib/chevre/repo/mongoose/{model → schemas}/account.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/account.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/accountTitle.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/accountTitle.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/accountTransaction.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/accountTransaction.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/accountingReport.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/accountingReport.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/action.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/action.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/additionalProperty.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/additionalProperty.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/aggregation.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/aggregation.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/assetTransaction.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/assetTransaction.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/authorization.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/authorization.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/categoryCode.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/categoryCode.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/comments.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/comments.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/creativeWork.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/creativeWork.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/customer.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/customer.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/emailMessages.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/emailMessages.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/event.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/event.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/member.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/member.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/merchantReturnPolicy.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/merchantReturnPolicy.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/offer.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/offer.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/offerCatalog.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/offerCatalog.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/order.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/order.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/ownershipInfo.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/ownershipInfo.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/place.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/place.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/priceSpecification.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/priceSpecification.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/product.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/product.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/project.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/project.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/reservation.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/reservation.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/role.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/role.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/seller.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/seller.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/serviceOutput.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/serviceOutput.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/task.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/task.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/telemetry.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/telemetry.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/transaction.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/transaction.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/trip.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/trip.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.handleAWSError = exports.handleMvtkReserveError = exports.handlePecorinoError = exports.handleCOAError = exports.handleMongoError = exports.MongoErrorCode = void 0;
|
|
3
|
+
exports.handleAWSError = exports.handleMvtkReserveError = exports.handlePecorinoError = exports.handleCOAError = exports.handleMongoError = exports.isMongoError = exports.MongoErrorCode = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* エラーハンドラー
|
|
6
6
|
* 外部サービスと連携している場合に、サービス(API)のエラーを本ドメインのエラーに変換する責任を担います。
|
|
@@ -14,9 +14,13 @@ var MongoErrorCode;
|
|
|
14
14
|
MongoErrorCode[MongoErrorCode["MaxTimeMSExpired"] = 50] = "MaxTimeMSExpired";
|
|
15
15
|
MongoErrorCode[MongoErrorCode["ExceededTimeLimit"] = 262] = "ExceededTimeLimit";
|
|
16
16
|
})(MongoErrorCode = exports.MongoErrorCode || (exports.MongoErrorCode = {}));
|
|
17
|
+
function isMongoError(error) {
|
|
18
|
+
return (error instanceof mongoose_1.mongo.MongoError || error instanceof mongoose_1.mongo.MongoServerError);
|
|
19
|
+
}
|
|
20
|
+
exports.isMongoError = isMongoError;
|
|
17
21
|
function handleMongoError(error) {
|
|
18
22
|
let handledError = error;
|
|
19
|
-
if (handledError instanceof mongoose_1.mongo.MongoError) {
|
|
23
|
+
if (handledError instanceof mongoose_1.mongo.MongoError || handledError instanceof mongoose_1.mongo.MongoServerError) {
|
|
20
24
|
switch (handledError.code) {
|
|
21
25
|
case MongoErrorCode.DuplicateKey:
|
|
22
26
|
handledError = new factory_1.errors.AlreadyInUse('', [], `Some fields already in use. code:${handledError.code} message:${handledError.message}`);
|
|
@@ -9,9 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MongoRepository =
|
|
13
|
-
const
|
|
14
|
-
|
|
12
|
+
exports.MongoRepository = void 0;
|
|
13
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
14
|
+
const account_1 = require("./mongoose/schemas/account");
|
|
15
15
|
const factory = require("../factory");
|
|
16
16
|
/**
|
|
17
17
|
* 口座リポジトリ
|
|
@@ -19,6 +19,9 @@ const factory = require("../factory");
|
|
|
19
19
|
class MongoRepository {
|
|
20
20
|
constructor(connection) {
|
|
21
21
|
this.accountModel = connection.model(account_1.modelName, account_1.schema);
|
|
22
|
+
if (connection.get('autoIndex') === true) {
|
|
23
|
+
this.accountModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
24
|
+
}
|
|
22
25
|
}
|
|
23
26
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
24
27
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -410,9 +413,10 @@ class MongoRepository {
|
|
|
410
413
|
});
|
|
411
414
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
412
415
|
/* istanbul ignore else */
|
|
413
|
-
if (params.limit
|
|
416
|
+
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
417
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
414
418
|
query.limit(params.limit)
|
|
415
|
-
.skip(params.limit * (
|
|
419
|
+
.skip(params.limit * (page - 1));
|
|
416
420
|
}
|
|
417
421
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
418
422
|
/* istanbul ignore else */
|
|
@@ -11,13 +11,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MongoRepository = void 0;
|
|
13
13
|
const factory = require("../factory");
|
|
14
|
-
const
|
|
14
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
15
|
+
const accountTitle_1 = require("./mongoose/schemas/accountTitle");
|
|
15
16
|
/**
|
|
16
17
|
* 科目リポジトリ
|
|
17
18
|
*/
|
|
18
19
|
class MongoRepository {
|
|
19
20
|
constructor(connection) {
|
|
20
21
|
this.accountTitleModel = connection.model(accountTitle_1.modelName, accountTitle_1.schema);
|
|
22
|
+
if (connection.get('autoIndex') === true) {
|
|
23
|
+
this.accountTitleModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
24
|
+
}
|
|
21
25
|
}
|
|
22
26
|
deleteByProject(params) {
|
|
23
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -9,10 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MongoRepository =
|
|
12
|
+
exports.MongoRepository = void 0;
|
|
13
13
|
const moment = require("moment");
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
15
|
+
const accountTransaction_1 = require("./mongoose/schemas/accountTransaction");
|
|
16
16
|
const factory = require("../factory");
|
|
17
17
|
/**
|
|
18
18
|
* 口座取引リポジトリ
|
|
@@ -20,6 +20,9 @@ const factory = require("../factory");
|
|
|
20
20
|
class MongoRepository {
|
|
21
21
|
constructor(connection) {
|
|
22
22
|
this.transactionModel = connection.model(accountTransaction_1.modelName, accountTransaction_1.schema);
|
|
23
|
+
if (connection.get('autoIndex') === true) {
|
|
24
|
+
this.transactionModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
25
|
+
}
|
|
23
26
|
}
|
|
24
27
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
25
28
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
@@ -304,8 +307,8 @@ class MongoRepository {
|
|
|
304
307
|
createdAt: 0,
|
|
305
308
|
updatedAt: 0
|
|
306
309
|
});
|
|
307
|
-
if (typeof params.limit === 'number') {
|
|
308
|
-
const page = (typeof params.page === 'number') ? params.page : 1;
|
|
310
|
+
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
311
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
309
312
|
query.limit(params.limit)
|
|
310
313
|
.skip(params.limit * (page - 1));
|
|
311
314
|
}
|
|
@@ -10,7 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MongoRepository = void 0;
|
|
13
|
-
const
|
|
13
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
14
|
+
const accountingReport_1 = require("./mongoose/schemas/accountingReport");
|
|
14
15
|
const errorHandler_1 = require("../errorHandler");
|
|
15
16
|
/**
|
|
16
17
|
* 経理レポートリポジトリ
|
|
@@ -18,6 +19,9 @@ const errorHandler_1 = require("../errorHandler");
|
|
|
18
19
|
class MongoRepository {
|
|
19
20
|
constructor(connection) {
|
|
20
21
|
this.accountingReportModel = connection.model(accountingReport_1.modelName, accountingReport_1.schema);
|
|
22
|
+
if (connection.get('autoIndex') === true) {
|
|
23
|
+
this.accountingReportModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
24
|
+
}
|
|
21
25
|
}
|
|
22
26
|
/**
|
|
23
27
|
* なければ作成する
|
|
@@ -30,7 +34,7 @@ class MongoRepository {
|
|
|
30
34
|
}
|
|
31
35
|
catch (error) {
|
|
32
36
|
let throwsError = true;
|
|
33
|
-
if (
|
|
37
|
+
if ((0, errorHandler_1.isMongoError)(error)) {
|
|
34
38
|
// すでにorderNumberが存在する場合ok
|
|
35
39
|
if (error.code === errorHandler_1.MongoErrorCode.DuplicateKey) {
|
|
36
40
|
throwsError = false;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Connection } from 'mongoose';
|
|
2
2
|
import * as factory from '../factory';
|
|
3
|
-
import { modelName } from './mongoose/model/action';
|
|
4
3
|
export declare type IAction<T extends factory.actionType> = T extends factory.actionType.OrderAction ? factory.action.trade.order.IAction : T extends factory.actionType.AuthorizeAction ? factory.action.authorize.IAction<factory.action.authorize.IAttributes<any, any>> : factory.action.IAction<factory.action.IAttributes<T, any, any>>;
|
|
5
4
|
export declare type IPayAction = factory.action.trade.pay.IAction;
|
|
6
5
|
export interface IUseActionCountByOffer {
|
|
@@ -24,7 +23,6 @@ interface IStatus {
|
|
|
24
23
|
interface IAggregateAction {
|
|
25
24
|
statuses: IStatus[];
|
|
26
25
|
}
|
|
27
|
-
export { modelName };
|
|
28
26
|
/**
|
|
29
27
|
* アクションリポジトリ
|
|
30
28
|
*/
|
|
@@ -184,3 +182,4 @@ export declare class MongoRepository {
|
|
|
184
182
|
}): Promise<IAggregateAction>;
|
|
185
183
|
private agggregateByStatus;
|
|
186
184
|
}
|
|
185
|
+
export {};
|
|
@@ -9,16 +9,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MongoRepository =
|
|
12
|
+
exports.MongoRepository = void 0;
|
|
13
13
|
const factory = require("../factory");
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
15
|
+
const action_1 = require("./mongoose/schemas/action");
|
|
16
16
|
/**
|
|
17
17
|
* アクションリポジトリ
|
|
18
18
|
*/
|
|
19
19
|
class MongoRepository {
|
|
20
20
|
constructor(connection) {
|
|
21
21
|
this.actionModel = connection.model(action_1.modelName, action_1.schema);
|
|
22
|
+
if (connection.get('autoIndex') === true) {
|
|
23
|
+
this.actionModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
24
|
+
}
|
|
22
25
|
}
|
|
23
26
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
24
27
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -409,8 +412,8 @@ class MongoRepository {
|
|
|
409
412
|
}
|
|
410
413
|
}
|
|
411
414
|
const query = this.actionModel.find((conditions.length > 0) ? { $and: conditions } : {}, projection);
|
|
412
|
-
if (typeof params.limit === 'number') {
|
|
413
|
-
const page = (typeof params.page === 'number') ? params.page : 1;
|
|
415
|
+
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
416
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
414
417
|
query.limit(params.limit)
|
|
415
418
|
.skip(params.limit * (page - 1));
|
|
416
419
|
}
|
|
@@ -21,7 +21,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.MongoRepository = void 0;
|
|
24
|
-
const
|
|
24
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
25
|
+
const additionalProperty_1 = require("./mongoose/schemas/additionalProperty");
|
|
25
26
|
const factory = require("../factory");
|
|
26
27
|
/**
|
|
27
28
|
* 追加特性リポジトリ
|
|
@@ -29,6 +30,9 @@ const factory = require("../factory");
|
|
|
29
30
|
class MongoRepository {
|
|
30
31
|
constructor(connection) {
|
|
31
32
|
this.additionalPropertyModel = connection.model(additionalProperty_1.modelName, additionalProperty_1.schema);
|
|
33
|
+
if (connection.get('autoIndex') === true) {
|
|
34
|
+
this.additionalPropertyModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
34
38
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -135,8 +139,8 @@ class MongoRepository {
|
|
|
135
139
|
createdAt: 0,
|
|
136
140
|
updatedAt: 0
|
|
137
141
|
});
|
|
138
|
-
if (typeof params.limit === 'number') {
|
|
139
|
-
const page = (typeof params.page === 'number') ? params.page : 1;
|
|
142
|
+
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
143
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
140
144
|
query.limit(params.limit)
|
|
141
145
|
.skip(params.limit * (page - 1));
|
|
142
146
|
}
|
|
@@ -21,7 +21,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.MongoRepository = exports.AggregationType = void 0;
|
|
24
|
-
const
|
|
24
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
25
|
+
const aggregation_1 = require("./mongoose/schemas/aggregation");
|
|
25
26
|
var AggregationType;
|
|
26
27
|
(function (AggregationType) {
|
|
27
28
|
AggregationType["AggregateAuthorizeEventServiceOfferAction"] = "AggregateAuthorizeEventServiceOfferAction";
|
|
@@ -42,6 +43,9 @@ var AggregationType;
|
|
|
42
43
|
class MongoRepository {
|
|
43
44
|
constructor(connection) {
|
|
44
45
|
this.aggregationModel = connection.model(aggregation_1.modelName, aggregation_1.schema);
|
|
46
|
+
if (connection.get('autoIndex') === true) {
|
|
47
|
+
this.aggregationModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
48
|
+
}
|
|
45
49
|
}
|
|
46
50
|
saveAggregation(params) {
|
|
47
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -23,9 +23,7 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import { Connection } from 'mongoose';
|
|
26
|
-
import { modelName } from './mongoose/model/assetTransaction';
|
|
27
26
|
import * as factory from '../factory';
|
|
28
|
-
export { modelName };
|
|
29
27
|
interface IAggregationByStatus {
|
|
30
28
|
transactionCount: number;
|
|
31
29
|
avgDuration: number;
|
|
@@ -181,3 +179,4 @@ export declare class MongoRepository {
|
|
|
181
179
|
}): Promise<IAggregateReserve>;
|
|
182
180
|
private agggregateByStatus;
|
|
183
181
|
}
|
|
182
|
+
export {};
|
|
@@ -9,10 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MongoRepository =
|
|
12
|
+
exports.MongoRepository = void 0;
|
|
13
13
|
const moment = require("moment");
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
15
|
+
const assetTransaction_1 = require("./mongoose/schemas/assetTransaction");
|
|
16
16
|
const factory = require("../factory");
|
|
17
17
|
/**
|
|
18
18
|
* 資産取引リポジトリ
|
|
@@ -20,6 +20,9 @@ const factory = require("../factory");
|
|
|
20
20
|
class MongoRepository {
|
|
21
21
|
constructor(connection) {
|
|
22
22
|
this.transactionModel = connection.model(assetTransaction_1.modelName, assetTransaction_1.schema);
|
|
23
|
+
if (connection.get('autoIndex') === true) {
|
|
24
|
+
this.transactionModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
25
|
+
}
|
|
23
26
|
}
|
|
24
27
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
25
28
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -477,8 +480,8 @@ class MongoRepository {
|
|
|
477
480
|
const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
|
|
478
481
|
const query = this.transactionModel.find((conditions.length > 0) ? { $and: conditions } : {})
|
|
479
482
|
.select(Object.assign({ __v: 0, createdAt: 0, updatedAt: 0 }, projection));
|
|
480
|
-
if (typeof params.limit === 'number') {
|
|
481
|
-
const page = (typeof params.page === 'number') ? params.page : 1;
|
|
483
|
+
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
484
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
482
485
|
query.limit(params.limit)
|
|
483
486
|
.skip(params.limit * (page - 1));
|
|
484
487
|
}
|
|
@@ -21,7 +21,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.MongoRepository = void 0;
|
|
24
|
-
const
|
|
24
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
25
|
+
const categoryCode_1 = require("./mongoose/schemas/categoryCode");
|
|
25
26
|
const factory = require("../factory");
|
|
26
27
|
/**
|
|
27
28
|
* 区分リポジトリ
|
|
@@ -29,6 +30,9 @@ const factory = require("../factory");
|
|
|
29
30
|
class MongoRepository {
|
|
30
31
|
constructor(connection) {
|
|
31
32
|
this.categoryCodeModel = connection.model(categoryCode_1.modelName, categoryCode_1.schema);
|
|
33
|
+
if (connection.get('autoIndex') === true) {
|
|
34
|
+
this.categoryCodeModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
34
38
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -170,8 +174,8 @@ class MongoRepository {
|
|
|
170
174
|
createdAt: 0,
|
|
171
175
|
updatedAt: 0
|
|
172
176
|
});
|
|
173
|
-
if (typeof params.limit === 'number') {
|
|
174
|
-
const page = (typeof params.page === 'number') ? params.page : 1;
|
|
177
|
+
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
178
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
175
179
|
query.limit(params.limit)
|
|
176
180
|
.skip(params.limit * (page - 1));
|
|
177
181
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Connection } from 'mongoose';
|
|
2
2
|
import * as factory from '../factory';
|
|
3
|
-
import { modelName } from './mongoose/
|
|
3
|
+
import { modelName } from './mongoose/schemas/authorization';
|
|
4
4
|
export declare type IObject = factory.authorization.IObject;
|
|
5
5
|
export declare type ICode = string;
|
|
6
6
|
export { modelName };
|
package/lib/chevre/repo/code.js
CHANGED
|
@@ -13,7 +13,8 @@ exports.MongoRepository = exports.modelName = void 0;
|
|
|
13
13
|
const moment = require("moment");
|
|
14
14
|
const uuid = require("uuid");
|
|
15
15
|
const factory = require("../factory");
|
|
16
|
-
const
|
|
16
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
17
|
+
const authorization_1 = require("./mongoose/schemas/authorization");
|
|
17
18
|
Object.defineProperty(exports, "modelName", { enumerable: true, get: function () { return authorization_1.modelName; } });
|
|
18
19
|
/**
|
|
19
20
|
* 承認コードリポジトリ
|
|
@@ -21,6 +22,9 @@ Object.defineProperty(exports, "modelName", { enumerable: true, get: function ()
|
|
|
21
22
|
class MongoRepository {
|
|
22
23
|
constructor(connection) {
|
|
23
24
|
this.authorizationModel = connection.model(authorization_1.modelName, authorization_1.schema);
|
|
25
|
+
if (connection.get('autoIndex') === true) {
|
|
26
|
+
this.authorizationModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
27
|
+
}
|
|
24
28
|
}
|
|
25
29
|
// tslint:disable-next-line:max-func-body-length
|
|
26
30
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -190,8 +194,8 @@ class MongoRepository {
|
|
|
190
194
|
createdAt: 0,
|
|
191
195
|
updatedAt: 0
|
|
192
196
|
});
|
|
193
|
-
if (typeof params.limit === 'number') {
|
|
194
|
-
const page = (typeof params.page === 'number') ? params.page : 1;
|
|
197
|
+
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
198
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
195
199
|
query.limit(params.limit)
|
|
196
200
|
.skip(params.limit * (page - 1));
|
|
197
201
|
}
|
|
@@ -10,7 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MongoRepository = void 0;
|
|
13
|
-
const
|
|
13
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
14
|
+
const comments_1 = require("./mongoose/schemas/comments");
|
|
14
15
|
const factory = require("../factory");
|
|
15
16
|
/**
|
|
16
17
|
* コメントリポジトリ
|
|
@@ -18,6 +19,9 @@ const factory = require("../factory");
|
|
|
18
19
|
class MongoRepository {
|
|
19
20
|
constructor(connection) {
|
|
20
21
|
this.commentModel = connection.model(comments_1.modelName, comments_1.schema);
|
|
22
|
+
if (connection.get('autoIndex') === true) {
|
|
23
|
+
this.commentModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
24
|
+
}
|
|
21
25
|
}
|
|
22
26
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
23
27
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -48,8 +52,8 @@ class MongoRepository {
|
|
|
48
52
|
createdAt: 0,
|
|
49
53
|
updatedAt: 0
|
|
50
54
|
});
|
|
51
|
-
if (typeof params.limit === 'number') {
|
|
52
|
-
const page = (typeof params.page === 'number') ? params.page : 1;
|
|
55
|
+
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
56
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
53
57
|
query.limit(params.limit)
|
|
54
58
|
.skip(params.limit * (page - 1));
|
|
55
59
|
}
|
|
@@ -23,9 +23,7 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import { Connection } from 'mongoose';
|
|
26
|
-
import { modelName } from './mongoose/model/creativeWork';
|
|
27
26
|
import * as factory from '../factory';
|
|
28
|
-
export { modelName };
|
|
29
27
|
/**
|
|
30
28
|
* コンテンツリポジトリ
|
|
31
29
|
*/
|
|
@@ -20,9 +20,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.MongoRepository =
|
|
24
|
-
const
|
|
25
|
-
|
|
23
|
+
exports.MongoRepository = void 0;
|
|
24
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
25
|
+
const creativeWork_1 = require("./mongoose/schemas/creativeWork");
|
|
26
26
|
const factory = require("../factory");
|
|
27
27
|
/**
|
|
28
28
|
* コンテンツリポジトリ
|
|
@@ -30,6 +30,9 @@ const factory = require("../factory");
|
|
|
30
30
|
class MongoRepository {
|
|
31
31
|
constructor(connection) {
|
|
32
32
|
this.creativeWorkModel = connection.model(creativeWork_1.modelName, creativeWork_1.schema);
|
|
33
|
+
if (connection.get('autoIndex') === true) {
|
|
34
|
+
this.creativeWorkModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
// tslint:disable-next-line:max-func-body-length
|
|
35
38
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -222,8 +225,8 @@ class MongoRepository {
|
|
|
222
225
|
createdAt: 0,
|
|
223
226
|
updatedAt: 0
|
|
224
227
|
});
|
|
225
|
-
if (typeof params.limit === 'number') {
|
|
226
|
-
const page = (typeof params.page === 'number') ? params.page : 1;
|
|
228
|
+
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
229
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
227
230
|
query.limit(params.limit)
|
|
228
231
|
.skip(params.limit * (page - 1));
|
|
229
232
|
}
|
|
@@ -21,7 +21,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.MongoRepository = void 0;
|
|
24
|
-
const
|
|
24
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
25
|
+
const customer_1 = require("./mongoose/schemas/customer");
|
|
25
26
|
const factory = require("../factory");
|
|
26
27
|
/**
|
|
27
28
|
* 顧客リポジトリ
|
|
@@ -29,6 +30,9 @@ const factory = require("../factory");
|
|
|
29
30
|
class MongoRepository {
|
|
30
31
|
constructor(connection) {
|
|
31
32
|
this.customerModel = connection.model(customer_1.modelName, customer_1.schema);
|
|
33
|
+
if (connection.get('autoIndex') === true) {
|
|
34
|
+
this.customerModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
// tslint:disable-next-line:max-func-body-length
|
|
34
38
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -110,8 +114,8 @@ class MongoRepository {
|
|
|
110
114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
111
115
|
const andConditions = MongoRepository.CREATE_MONGO_CONDITIONS(conditions);
|
|
112
116
|
const query = this.customerModel.find((andConditions.length > 0) ? { $and: andConditions } : {}, Object.assign({ __v: 0, createdAt: 0, updatedAt: 0 }, projection));
|
|
113
|
-
if (typeof conditions.limit === 'number') {
|
|
114
|
-
const page = (typeof conditions.page === 'number') ? conditions.page : 1;
|
|
117
|
+
if (typeof conditions.limit === 'number' && conditions.limit > 0) {
|
|
118
|
+
const page = (typeof conditions.page === 'number' && conditions.page > 0) ? conditions.page : 1;
|
|
115
119
|
query.limit(conditions.limit)
|
|
116
120
|
.skip(conditions.limit * (page - 1));
|
|
117
121
|
}
|
|
@@ -21,7 +21,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.MongoRepository = void 0;
|
|
24
|
-
const
|
|
24
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
25
|
+
const emailMessages_1 = require("./mongoose/schemas/emailMessages");
|
|
25
26
|
const factory = require("../factory");
|
|
26
27
|
/**
|
|
27
28
|
* Eメールメッセージリポジトリ
|
|
@@ -29,6 +30,9 @@ const factory = require("../factory");
|
|
|
29
30
|
class MongoRepository {
|
|
30
31
|
constructor(connection) {
|
|
31
32
|
this.emailMessageModel = connection.model(emailMessages_1.modelName, emailMessages_1.schema);
|
|
33
|
+
if (connection.get('autoIndex') === true) {
|
|
34
|
+
this.emailMessageModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
34
38
|
var _a, _b, _c, _d, _e;
|
|
@@ -97,8 +101,8 @@ class MongoRepository {
|
|
|
97
101
|
createdAt: 0,
|
|
98
102
|
updatedAt: 0
|
|
99
103
|
});
|
|
100
|
-
if (typeof params.limit === 'number') {
|
|
101
|
-
const page = (typeof params.page === 'number') ? params.page : 1;
|
|
104
|
+
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
105
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
102
106
|
query.limit(params.limit)
|
|
103
107
|
.skip(params.limit * (page - 1));
|
|
104
108
|
}
|
package/lib/chevre/repo/event.js
CHANGED
|
@@ -23,7 +23,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
exports.MongoRepository = exports.PROJECTION_MINIMIZED_EVENT = void 0;
|
|
24
24
|
const uniqid = require("uniqid");
|
|
25
25
|
const factory = require("../factory");
|
|
26
|
-
const
|
|
26
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
27
|
+
const event_1 = require("./mongoose/schemas/event");
|
|
27
28
|
exports.PROJECTION_MINIMIZED_EVENT = {
|
|
28
29
|
project: 1,
|
|
29
30
|
_id: 1,
|
|
@@ -46,6 +47,9 @@ exports.PROJECTION_MINIMIZED_EVENT = {
|
|
|
46
47
|
class MongoRepository {
|
|
47
48
|
constructor(connection) {
|
|
48
49
|
this.eventModel = connection.model(event_1.modelName, event_1.schema);
|
|
50
|
+
if (connection.get('autoIndex') === true) {
|
|
51
|
+
this.eventModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
52
|
+
}
|
|
49
53
|
}
|
|
50
54
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
51
55
|
static CREATE_MONGO_CONDITIONS(conditions) {
|
|
@@ -647,8 +651,8 @@ class MongoRepository {
|
|
|
647
651
|
(positiveProjectionExists)
|
|
648
652
|
? projection
|
|
649
653
|
: Object.assign(Object.assign({}, projection), { __v: 0, createdAt: 0, updatedAt: 0 }));
|
|
650
|
-
if (typeof params.limit === 'number') {
|
|
651
|
-
const page = (typeof params.page === 'number') ? params.page : 1;
|
|
654
|
+
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
655
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
652
656
|
query.limit(params.limit)
|
|
653
657
|
.skip(params.limit * (page - 1));
|
|
654
658
|
}
|
|
@@ -11,13 +11,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MongoRepository = void 0;
|
|
13
13
|
const factory = require("../factory");
|
|
14
|
-
const
|
|
14
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
15
|
+
const member_1 = require("./mongoose/schemas/member");
|
|
15
16
|
/**
|
|
16
17
|
* IAMメンバーリポジトリ
|
|
17
18
|
*/
|
|
18
19
|
class MongoRepository {
|
|
19
20
|
constructor(connection) {
|
|
20
21
|
this.memberModel = connection.model(member_1.modelName, member_1.schema);
|
|
22
|
+
if (connection.get('autoIndex') === true) {
|
|
23
|
+
this.memberModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
24
|
+
}
|
|
21
25
|
}
|
|
22
26
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
23
27
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -114,8 +118,8 @@ class MongoRepository {
|
|
|
114
118
|
createdAt: 0,
|
|
115
119
|
updatedAt: 0
|
|
116
120
|
});
|
|
117
|
-
if (typeof params.limit === 'number') {
|
|
118
|
-
const page = (typeof params.page === 'number') ? params.page : 1;
|
|
121
|
+
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
122
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
119
123
|
query.limit(params.limit)
|
|
120
124
|
.skip(params.limit * (page - 1));
|
|
121
125
|
}
|
|
@@ -219,12 +223,15 @@ class MongoRepository {
|
|
|
219
223
|
const searchConditions = Object.assign({ 'member.id': { $eq: params.member.id } }, (typeof ((_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$regex) === 'string' && params.project.id.$regex.length > 0)
|
|
220
224
|
? { 'project.id': { $regex: new RegExp(params.project.id.$regex) } }
|
|
221
225
|
: undefined);
|
|
222
|
-
const
|
|
226
|
+
const query = this.memberModel.find(searchConditions, { project: 1 })
|
|
223
227
|
// sortを保証する
|
|
224
|
-
.sort({ 'project.id': factory.sortType.Ascending })
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
.
|
|
228
|
+
.sort({ 'project.id': factory.sortType.Ascending });
|
|
229
|
+
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
230
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
231
|
+
query.limit(params.limit)
|
|
232
|
+
.skip(params.limit * (page - 1));
|
|
233
|
+
}
|
|
234
|
+
const projectMembers = yield query.setOptions({ maxTimeMS: 10000 })
|
|
228
235
|
.exec()
|
|
229
236
|
.then((docs) => docs.map((doc) => doc.toObject()));
|
|
230
237
|
return projectMembers.map((m) => m.project.id);
|
|
@@ -23,9 +23,7 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import { Connection } from 'mongoose';
|
|
26
|
-
import { modelName } from './mongoose/model/merchantReturnPolicy';
|
|
27
26
|
import * as factory from '../factory';
|
|
28
|
-
export { modelName };
|
|
29
27
|
/**
|
|
30
28
|
* 返品ポリシーリポジトリ
|
|
31
29
|
*/
|