@dhedge/backend-flatcoin-core 0.2.92 → 0.2.93
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.
|
@@ -22,6 +22,10 @@ __decorate([
|
|
|
22
22
|
(0, typeorm_1.Column)({ name: 'blockchain_code', nullable: false }),
|
|
23
23
|
__metadata("design:type", String)
|
|
24
24
|
], MultichainConfig.prototype, "blockchainCode", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ name: 'app_name', nullable: false }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], MultichainConfig.prototype, "appName", void 0);
|
|
25
29
|
__decorate([
|
|
26
30
|
(0, typeorm_1.Column)({ name: 'blockchain_network_name', nullable: false }),
|
|
27
31
|
__metadata("design:type", String)
|
|
@@ -4,4 +4,5 @@ export declare class MultichainConfigRepository {
|
|
|
4
4
|
private repository;
|
|
5
5
|
constructor(repository: Repository<MultichainConfig>);
|
|
6
6
|
getById(id: number): Promise<MultichainConfig | null>;
|
|
7
|
+
getByAppAndCode(appName: string, blockchainCode: string): Promise<MultichainConfig | null>;
|
|
7
8
|
}
|
|
@@ -24,6 +24,16 @@ let MultichainConfigRepository = class MultichainConfigRepository {
|
|
|
24
24
|
async getById(id) {
|
|
25
25
|
return this.repository.createQueryBuilder().where('id = :id').setParameter('id', id).take(1).getOne();
|
|
26
26
|
}
|
|
27
|
+
async getByAppAndCode(appName, blockchainCode) {
|
|
28
|
+
return this.repository
|
|
29
|
+
.createQueryBuilder()
|
|
30
|
+
.where('app_name = :appName')
|
|
31
|
+
.andWhere('blockchain_code = :blockchainCode')
|
|
32
|
+
.setParameter('appName', appName)
|
|
33
|
+
.setParameter('blockchainCode', blockchainCode)
|
|
34
|
+
.take(1)
|
|
35
|
+
.getOne();
|
|
36
|
+
}
|
|
27
37
|
};
|
|
28
38
|
exports.MultichainConfigRepository = MultichainConfigRepository;
|
|
29
39
|
exports.MultichainConfigRepository = MultichainConfigRepository = __decorate([
|