rez_core 0.0.6 → 1.0.2-o
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/.idea/250218_nodejs_core.iml +12 -0
- package/.idea/codeStyles/Project.xml +59 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/dataSources.xml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/data/master.xlsx +0 -0
- package/dist/app.module.d.ts +0 -2
- package/dist/app.module.js +0 -31
- package/dist/app.module.js.map +1 -1
- package/dist/config/config.module.js +1 -1
- package/dist/config/config.module.js.map +1 -1
- package/dist/config/database.config.d.ts +3 -0
- package/dist/config/database.config.js +14 -6
- package/dist/config/database.config.js.map +1 -1
- package/dist/constant/global.constant.d.ts +6 -2
- package/dist/constant/global.constant.js +7 -3
- package/dist/constant/global.constant.js.map +1 -1
- package/dist/core.module.js +6 -0
- package/dist/core.module.js.map +1 -1
- package/dist/decorators/roles.decorator.js.map +1 -1
- package/dist/main.js +2 -1
- package/dist/main.js.map +1 -1
- package/dist/module/auth/auth.module.js +1 -1
- package/dist/module/auth/auth.module.js.map +1 -1
- package/dist/module/auth/guards/role.guard.js +3 -3
- package/dist/module/auth/strategies/google.strategy.d.ts +3 -1
- package/dist/module/auth/strategies/google.strategy.js +7 -5
- package/dist/module/auth/strategies/google.strategy.js.map +1 -1
- package/dist/module/auth/strategies/jwt.strategy.d.ts +4 -4
- package/dist/module/auth/strategies/jwt.strategy.js +8 -9
- package/dist/module/auth/strategies/jwt.strategy.js.map +1 -1
- package/dist/module/enterprise/enterprise.module.js +1 -1
- package/dist/module/enterprise/enterprise.module.js.map +1 -1
- package/dist/module/enterprise/service/organization.service.d.ts +9 -7
- package/dist/module/enterprise/service/organization.service.js +35 -14
- package/dist/module/enterprise/service/organization.service.js.map +1 -1
- package/dist/module/layout/controller/layout.controller.d.ts +11 -0
- package/dist/module/layout/controller/layout.controller.js +61 -0
- package/dist/module/layout/controller/layout.controller.js.map +1 -0
- package/dist/module/layout/dto/header.dto.d.ts +0 -0
- package/dist/module/layout/dto/header.dto.js +1 -0
- package/dist/module/layout/dto/header.dto.js.map +1 -0
- package/dist/module/layout/entity/header-items.entity.d.ts +10 -0
- package/dist/module/layout/entity/header-items.entity.js +52 -0
- package/dist/module/layout/entity/header-items.entity.js.map +1 -0
- package/dist/module/layout/entity/header-section.entity.d.ts +7 -0
- package/dist/module/layout/entity/header-section.entity.js +40 -0
- package/dist/module/layout/entity/header-section.entity.js.map +1 -0
- package/dist/module/layout/layout.module.d.ts +2 -0
- package/dist/module/layout/layout.module.js +30 -0
- package/dist/module/layout/layout.module.js.map +1 -0
- package/dist/module/layout/repository/header-items.repository.d.ts +7 -0
- package/dist/module/layout/repository/header-items.repository.js +36 -0
- package/dist/module/layout/repository/header-items.repository.js.map +1 -0
- package/dist/module/layout/repository/header-section.repository.d.ts +7 -0
- package/dist/module/layout/repository/header-section.repository.js +36 -0
- package/dist/module/layout/repository/header-section.repository.js.map +1 -0
- package/dist/module/layout/service/header-section.service.d.ts +8 -0
- package/dist/module/layout/service/header-section.service.js +37 -0
- package/dist/module/layout/service/header-section.service.js.map +1 -0
- package/dist/module/meta/controller/entity.controller.d.ts +1 -0
- package/dist/module/meta/controller/entity.controller.js +37 -1
- package/dist/module/meta/controller/entity.controller.js.map +1 -1
- package/dist/module/meta/entity/base-entity.entity.d.ts +1 -2
- package/dist/module/meta/entity/base-entity.entity.js +1 -2
- package/dist/module/meta/entity/base-entity.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-master.entity.d.ts +1 -0
- package/dist/module/meta/entity/entity-master.entity.js +4 -0
- package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-table-column.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-table.entity.d.ts +1 -0
- package/dist/module/meta/entity/entity-table.entity.js +4 -0
- package/dist/module/meta/entity/entity-table.entity.js.map +1 -1
- package/dist/module/meta/entity/media-data.entity.d.ts +11 -0
- package/dist/module/meta/entity/media-data.entity.js +55 -0
- package/dist/module/meta/entity/media-data.entity.js.map +1 -0
- package/dist/module/meta/entity.module.js +15 -1
- package/dist/module/meta/entity.module.js.map +1 -1
- package/dist/module/meta/repository/entity-table-column.repository.js +2 -2
- package/dist/module/meta/repository/entity-table.repository.d.ts +1 -0
- package/dist/module/meta/repository/entity-table.repository.js +9 -0
- package/dist/module/meta/repository/entity-table.repository.js.map +1 -1
- package/dist/module/meta/repository/media-data.repository.d.ts +9 -0
- package/dist/module/meta/repository/media-data.repository.js +55 -0
- package/dist/module/meta/repository/media-data.repository.js.map +1 -0
- package/dist/module/meta/service/entity-list.service.d.ts +3 -1
- package/dist/module/meta/service/entity-list.service.js +26 -3
- package/dist/module/meta/service/entity-list.service.js.map +1 -1
- package/dist/module/meta/service/entity-service-impl.service.d.ts +13 -5
- package/dist/module/meta/service/entity-service-impl.service.js +92 -15
- package/dist/module/meta/service/entity-service-impl.service.js.map +1 -1
- package/dist/module/meta/service/entity-table-column.service.d.ts +1 -0
- package/dist/module/meta/service/entity-table-column.service.js +4 -0
- package/dist/module/meta/service/entity-table-column.service.js.map +1 -1
- package/dist/module/meta/service/entity-table.service.d.ts +1 -0
- package/dist/module/meta/service/entity-table.service.js +3 -0
- package/dist/module/meta/service/entity-table.service.js.map +1 -1
- package/dist/module/meta/service/entity.service.d.ts +3 -1
- package/dist/module/meta/service/media-data.service.d.ts +9 -0
- package/dist/module/meta/service/media-data.service.js +36 -0
- package/dist/module/meta/service/media-data.service.js.map +1 -0
- package/dist/module/meta/service/preference.service.d.ts +1 -5
- package/dist/module/meta/service/preference.service.js +3 -11
- package/dist/module/meta/service/preference.service.js.map +1 -1
- package/dist/module/module/entity/menu.entity.d.ts +1 -2
- package/dist/module/module/entity/menu.entity.js +1 -2
- package/dist/module/module/entity/menu.entity.js.map +1 -1
- package/dist/module/module/entity/module.entity.d.ts +1 -2
- package/dist/module/module/entity/module.entity.js +1 -2
- package/dist/module/module/entity/module.entity.js.map +1 -1
- package/dist/module/module/module.module.js +2 -2
- package/dist/module/module/module.module.js.map +1 -1
- package/dist/module/module/repository/menu.repository.js +3 -3
- package/dist/module/module/repository/menu.repository.js.map +1 -1
- package/dist/module/module/repository/module-access.repository.js +31 -20
- package/dist/module/module/repository/module-access.repository.js.map +1 -1
- package/dist/module/module/service/menu.service.js +2 -2
- package/dist/module/module/service/menu.service.js.map +1 -1
- package/dist/module/module/service/module-access.service.js.map +1 -1
- package/dist/module/notification/controller/otp.controller.d.ts +17 -0
- package/dist/module/notification/controller/otp.controller.js +67 -0
- package/dist/module/notification/controller/otp.controller.js.map +1 -0
- package/dist/module/notification/entity/otp.entity.d.ts +10 -0
- package/dist/module/notification/entity/otp.entity.js +52 -0
- package/dist/module/notification/entity/otp.entity.js.map +1 -0
- package/dist/module/notification/notification.module.d.ts +2 -0
- package/dist/module/notification/notification.module.js +27 -0
- package/dist/module/notification/notification.module.js.map +1 -0
- package/dist/module/notification/repository/otp.repository.d.ts +9 -0
- package/dist/module/notification/repository/otp.repository.js +44 -0
- package/dist/module/notification/repository/otp.repository.js.map +1 -0
- package/dist/module/notification/service/otp.service.d.ts +16 -0
- package/dist/module/notification/service/otp.service.js +66 -0
- package/dist/module/notification/service/otp.service.js.map +1 -0
- package/dist/module/user/controller/login.controller.d.ts +1 -3
- package/dist/module/user/controller/login.controller.js +0 -1
- package/dist/module/user/controller/login.controller.js.map +1 -1
- package/dist/module/user/dto/create-user.dto.js.map +1 -1
- package/dist/module/user/dto/update-user.dto.d.ts +5 -0
- package/dist/module/user/dto/update-user.dto.js +9 -0
- package/dist/module/user/dto/update-user.dto.js.map +1 -0
- package/dist/module/user/entity/role.entity.js.map +1 -1
- package/dist/module/user/repository/user-role-mapping.repository.js +4 -1
- package/dist/module/user/repository/user-role-mapping.repository.js.map +1 -1
- package/dist/module/user/repository/user.repository.js.map +1 -1
- package/dist/module/user/service/login.service.d.ts +12 -4
- package/dist/module/user/service/login.service.js +24 -9
- package/dist/module/user/service/login.service.js.map +1 -1
- package/dist/module/user/service/role.service.d.ts +1 -5
- package/dist/module/user/service/role.service.js +3 -10
- package/dist/module/user/service/role.service.js.map +1 -1
- package/dist/module/user/service/user-session.service.d.ts +1 -3
- package/dist/module/user/service/user-session.service.js +1 -1
- package/dist/module/user/service/user-session.service.js.map +1 -1
- package/dist/module/user/service/user.service.d.ts +7 -8
- package/dist/module/user/service/user.service.js +14 -20
- package/dist/module/user/service/user.service.js.map +1 -1
- package/dist/module/user/user.module.js +1 -0
- package/dist/module/user/user.module.js.map +1 -1
- package/dist/resources/dev.properties.yaml +15 -0
- package/dist/resources/properties.module.d.ts +2 -0
- package/dist/resources/properties.module.js +25 -0
- package/dist/resources/properties.module.js.map +1 -0
- package/dist/resources/properties.yaml.d.ts +2 -0
- package/dist/resources/properties.yaml.js +10 -0
- package/dist/resources/properties.yaml.js.map +1 -0
- package/dist/resources/uat.properties.yaml +15 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/dto/excel-data.dto.d.ts +7 -0
- package/dist/utils/dto/excel-data.dto.js +16 -0
- package/dist/utils/dto/excel-data.dto.js.map +1 -0
- package/dist/utils/dto/excelsheet-data.dto.d.ts +5 -0
- package/dist/utils/dto/excelsheet-data.dto.js +3 -0
- package/dist/utils/dto/excelsheet-data.dto.js.map +1 -0
- package/dist/utils/service/excel-helper.service.d.ts +3 -1
- package/dist/utils/service/excel-helper.service.js +12 -3
- package/dist/utils/service/excel-helper.service.js.map +1 -1
- package/dist/utils/service/loggingUtil.service.js +6 -6
- package/dist/utils/service/loggingUtil.service.js.map +1 -1
- package/dist/utils/utils.module.js.map +1 -1
- package/nest-cli.json +6 -0
- package/package.json +1 -1
- package/src/app.module.ts +0 -0
- package/src/config/config.module.ts +1 -1
- package/src/config/database.config.ts +10 -5
- package/src/constant/global.constant.ts +13 -4
- package/src/core.module.ts +6 -0
- package/src/decorators/roles.decorator.ts +5 -2
- package/src/module/auth/auth.module.ts +3 -2
- package/src/module/auth/guards/google-auth.guard.ts +1 -1
- package/src/module/auth/guards/jwt.guard.ts +22 -22
- package/src/module/auth/guards/role.guard.ts +68 -68
- package/src/module/auth/services/auth.service.ts +29 -29
- package/src/module/auth/services/jwt.service.ts +11 -11
- package/src/module/auth/strategies/google.strategy.ts +7 -4
- package/src/module/auth/strategies/jwt.strategy.ts +5 -6
- package/src/module/auth/strategies/local.strategy.ts +13 -13
- package/src/module/dev/dev.module.ts +12 -12
- package/src/module/dev/service/dev.service.ts +7 -7
- package/src/module/enterprise/enterprise.module.ts +2 -3
- package/src/module/enterprise/entity/enterprise.entity.ts +37 -37
- package/src/module/enterprise/entity/organization.entity.ts +80 -80
- package/src/module/enterprise/service/organization.service.ts +48 -13
- package/src/module/layout/controller/layout.controller.ts +32 -0
- package/src/module/layout/dto/header.dto.ts +0 -0
- package/src/module/layout/entity/header-items.entity.ts +28 -0
- package/src/module/layout/entity/header-section.entity.ts +19 -0
- package/src/module/layout/layout.module.ts +17 -0
- package/src/module/layout/repository/header-items.repository.ts +18 -0
- package/src/module/layout/repository/header-section.repository.ts +18 -0
- package/src/module/layout/service/header-section.service.ts +26 -0
- package/src/module/master/controller/master.controller.ts +22 -22
- package/src/module/meta/controller/entity.controller.ts +56 -3
- package/src/module/meta/dto/entity-list-data.dto.ts +6 -6
- package/src/module/meta/entity/attribute-master.entity.ts +67 -67
- package/src/module/meta/entity/base-entity.entity.ts +2 -3
- package/src/module/meta/entity/entity-master.entity.ts +3 -0
- package/src/module/meta/entity/entity-table-column.entity.ts +1 -1
- package/src/module/meta/entity/entity-table.entity.ts +4 -2
- package/src/module/meta/entity/media-data.entity.ts +32 -0
- package/src/module/meta/entity/preference.entity.ts +65 -65
- package/src/module/meta/entity.module.ts +15 -1
- package/src/module/meta/repository/attribute-master.repository.ts +28 -28
- package/src/module/meta/repository/entity-table-column.repository.ts +3 -3
- package/src/module/meta/repository/entity-table.repository.ts +14 -0
- package/src/module/meta/repository/media-data.repository.ts +50 -0
- package/src/module/meta/repository/preference.repository.ts +20 -20
- package/src/module/meta/service/entity-list.service.ts +36 -7
- package/src/module/meta/service/entity-service-impl.service.ts +138 -20
- package/src/module/meta/service/entity-table-column.service.ts +14 -1
- package/src/module/meta/service/entity-table.service.ts +8 -1
- package/src/module/meta/service/entity.service.ts +13 -1
- package/src/module/meta/service/media-data.service.ts +44 -0
- package/src/module/meta/service/preference.service.ts +2 -17
- package/src/module/module/controller/menu.controller.ts +15 -15
- package/src/module/module/controller/module-access.controller.ts +1 -1
- package/src/module/module/entity/menu.entity.ts +10 -11
- package/src/module/module/entity/module-access.entity.ts +22 -22
- package/src/module/module/entity/module-action.entity.ts +19 -19
- package/src/module/module/entity/module.entity.ts +9 -10
- package/src/module/module/module.module.ts +2 -4
- package/src/module/module/repository/menu.repository.ts +7 -10
- package/src/module/module/repository/module-access.repository.ts +57 -42
- package/src/module/module/service/menu.service.ts +9 -10
- package/src/module/module/service/module-access.service.ts +8 -3
- package/src/module/notification/controller/otp.controller.ts +41 -0
- package/src/module/notification/entity/otp.entity.ts +28 -0
- package/src/module/notification/notification.module.ts +14 -0
- package/src/module/notification/repository/otp.repository.ts +27 -0
- package/src/module/notification/service/otp.service.ts +56 -0
- package/src/module/user/controller/login.controller.ts +2 -1
- package/src/module/user/controller/user.controller.ts +28 -28
- package/src/module/user/dto/create-user.dto.ts +43 -43
- package/src/module/user/dto/update-user.dto.ts +4 -0
- package/src/module/user/entity/role.entity.ts +1 -1
- package/src/module/user/entity/user-role-mapping.entity.ts +21 -21
- package/src/module/user/entity/user-session.entity.ts +61 -61
- package/src/module/user/entity/user.entity.ts +35 -35
- package/src/module/user/repository/role.repository.ts +16 -16
- package/src/module/user/repository/user-role-mapping.repository.ts +9 -3
- package/src/module/user/repository/user.repository.ts +2 -2
- package/src/module/user/repository/userSession.repository.ts +33 -33
- package/src/module/user/service/login.service.ts +25 -8
- package/src/module/user/service/role.service.ts +2 -13
- package/src/module/user/service/user-role-mapping.service.ts +1 -1
- package/src/module/user/service/user-session.service.ts +2 -2
- package/src/module/user/service/user.service.ts +18 -30
- package/src/module/user/user.module.ts +1 -1
- package/src/resources/dev.properties.yaml +15 -0
- package/src/resources/properties.module.ts +12 -0
- package/src/resources/properties.yaml.ts +11 -0
- package/src/resources/uat.properties.yaml +15 -0
- package/src/utils/dto/excel-data.dto.ts +14 -0
- package/src/utils/dto/excelsheet-data.dto.ts +5 -0
- package/src/utils/service/clockIDGenUtil.service.ts +1 -1
- package/src/utils/service/dateUtil.service.ts +1 -1
- package/src/utils/service/encryptUtil.service.ts +97 -97
- package/src/utils/service/excel-helper.service.ts +14 -1
- package/src/utils/service/excelUtil.service.ts +15 -15
- package/src/utils/service/loggingUtil.service.ts +48 -48
- package/src/utils/service/reflection-helper.service.ts +53 -53
- package/src/utils/utils.module.ts +7 -7
- package/.env +0 -6
- package/dist/constant/status.constant.d.ts +0 -4
- package/dist/constant/status.constant.js +0 -9
- package/dist/constant/status.constant.js.map +0 -1
- package/src/constant/status.constant.ts +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-table.entity.js","sourceRoot":"","sources":["../../../../src/module/meta/entity/entity-table.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AACzC,6DAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"entity-table.entity.js","sourceRoot":"","sources":["../../../../src/module/meta/entity/entity-table.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AACzC,6DAAkD;AAClD,uEAA2E;AAGpE,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,+BAAU;IACzC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,wCAAsB,CAAC;IAC5C,CAAC;CA2CF,CAAA;AA/CY,kCAAW;AAOtB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,E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AAE,CAAC;;4CAC5B;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;;iDAC3B;sBA9CV,WAAW;IADvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;;GACvB,WAAW,CA+CvB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseEntity } from './base-entity.entity';
|
|
2
|
+
export declare class MediaData extends BaseEntity {
|
|
3
|
+
constructor();
|
|
4
|
+
file_name: string;
|
|
5
|
+
mapped_attribute_key: string;
|
|
6
|
+
mapped_entity_type: string;
|
|
7
|
+
mapped_entity_id: number;
|
|
8
|
+
media_url: string;
|
|
9
|
+
extension: string;
|
|
10
|
+
content_type: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MediaData = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const base_entity_entity_1 = require("./base-entity.entity");
|
|
15
|
+
const global_constant_1 = require("../../../constant/global.constant");
|
|
16
|
+
let MediaData = class MediaData extends base_entity_entity_1.BaseEntity {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.entity_type = global_constant_1.ENTITYTYPE_MEDIA;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.MediaData = MediaData;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], MediaData.prototype, "file_name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], MediaData.prototype, "mapped_attribute_key", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], MediaData.prototype, "mapped_entity_type", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], MediaData.prototype, "mapped_entity_id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], MediaData.prototype, "media_url", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 30, nullable: true }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], MediaData.prototype, "extension", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], MediaData.prototype, "content_type", void 0);
|
|
51
|
+
exports.MediaData = MediaData = __decorate([
|
|
52
|
+
(0, typeorm_1.Entity)({ name: 'cr_media_data' }),
|
|
53
|
+
__metadata("design:paramtypes", [])
|
|
54
|
+
], MediaData);
|
|
55
|
+
//# sourceMappingURL=media-data.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-data.entity.js","sourceRoot":"","sources":["../../../../src/module/meta/entity/media-data.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AACzC,6DAAkD;AAClD,uEAAqE;AAG9D,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,+BAAU;IACvC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,kCAAgB,CAAC;IACtC,CAAC;CAsBF,CAAA;AA1BY,8BAAS;AAOpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACvC;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDAC5B;AAG7B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDAC7B;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAClB;AAGzB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACvC;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACtC;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACnC;oBAzBV,SAAS;IADrB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;;GACrB,SAAS,CA0BrB"}
|
|
@@ -28,6 +28,9 @@ const entity_table_service_1 = require("./service/entity-table.service");
|
|
|
28
28
|
const entity_table_column_repository_1 = require("./repository/entity-table-column.repository");
|
|
29
29
|
const entity_table_column_service_1 = require("./service/entity-table-column.service");
|
|
30
30
|
const entity_list_service_1 = require("./service/entity-list.service");
|
|
31
|
+
const media_data_entity_1 = require("./entity/media-data.entity");
|
|
32
|
+
const media_data_service_1 = require("./service/media-data.service");
|
|
33
|
+
const media_data_repository_1 = require("./repository/media-data.repository");
|
|
31
34
|
let EntityModule = class EntityModule {
|
|
32
35
|
};
|
|
33
36
|
exports.EntityModule = EntityModule;
|
|
@@ -40,6 +43,7 @@ exports.EntityModule = EntityModule = __decorate([
|
|
|
40
43
|
preference_entity_1.PreferenceMaster,
|
|
41
44
|
entity_table_entity_1.EntityTable,
|
|
42
45
|
entity_table_column_entity_1.EntityTableColumn,
|
|
46
|
+
media_data_entity_1.MediaData
|
|
43
47
|
]),
|
|
44
48
|
utils_module_1.UtilsModule,
|
|
45
49
|
],
|
|
@@ -55,8 +59,18 @@ exports.EntityModule = EntityModule = __decorate([
|
|
|
55
59
|
entity_table_column_repository_1.EntityTableColumnRepository,
|
|
56
60
|
entity_table_column_service_1.EntityTableColumnService,
|
|
57
61
|
entity_list_service_1.EntityListService,
|
|
62
|
+
media_data_repository_1.MediaDataRepository,
|
|
63
|
+
media_data_service_1.MediaDataService,
|
|
64
|
+
],
|
|
65
|
+
exports: [
|
|
66
|
+
entity_master_service_1.EntityMasterService,
|
|
67
|
+
entity_service_impl_service_1.EntityServiceImpl,
|
|
68
|
+
preference_service_1.PreferenceService,
|
|
69
|
+
entity_list_service_1.EntityListService,
|
|
70
|
+
entity_table_service_1.EntityTableService,
|
|
71
|
+
entity_table_column_service_1.EntityTableColumnService,
|
|
72
|
+
media_data_service_1.MediaDataService,
|
|
58
73
|
],
|
|
59
|
-
exports: [entity_master_service_1.EntityMasterService, entity_service_impl_service_1.EntityServiceImpl, preference_service_1.PreferenceService, entity_list_service_1.EntityListService],
|
|
60
74
|
controllers: [entity_controller_1.EntityController, master_controller_1.MasterController],
|
|
61
75
|
})
|
|
62
76
|
], EntityModule);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.module.js","sourceRoot":"","sources":["../../../src/module/meta/entity.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2EAAsE;AACtE,uFAA0E;AAC1E,sEAAkE;AAClE,6CAAgD;AAChD,2DAAuD;AACvD,wEAA6D;AAC7D,8EAAmE;AACnE,0FAAqF;AACrF,qEAAiE;AACjE,8EAA0E;AAC1E,kEAA8D;AAC9D,8EAA0E;AAC1E,qEAAiE;AACjE,sEAA2D;AAC3D,oFAAwE;AACxE,kFAA6E;AAC7E,yEAAoE;AACpE,gGAA0F;AAC1F,uFAAiF;AACjF,uEAAkE;
|
|
1
|
+
{"version":3,"file":"entity.module.js","sourceRoot":"","sources":["../../../src/module/meta/entity.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2EAAsE;AACtE,uFAA0E;AAC1E,sEAAkE;AAClE,6CAAgD;AAChD,2DAAuD;AACvD,wEAA6D;AAC7D,8EAAmE;AACnE,0FAAqF;AACrF,qEAAiE;AACjE,8EAA0E;AAC1E,kEAA8D;AAC9D,8EAA0E;AAC1E,qEAAiE;AACjE,sEAA2D;AAC3D,oFAAwE;AACxE,kFAA6E;AAC7E,yEAAoE;AACpE,gGAA0F;AAC1F,uFAAiF;AACjF,uEAAkE;AAClE,kEAAuD;AACvD,qEAAgE;AAChE,8EAAyE;AAwClE,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IAtCxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC;gBACvB,mCAAY;gBACZ,yCAAe;gBACf,oCAAgB;gBAChB,iCAAW;gBACX,8CAAiB;gBACjB,6BAAS;aACV,CAAC;YACF,0BAAW;SACZ;QACD,SAAS,EAAE;YACT,2CAAmB;YACnB,+CAAiB;YACjB,uDAAyB;YACzB,sCAAiB;YACjB,4CAAoB;YACpB,8BAAa;YACb,+CAAqB;YACrB,yCAAkB;YAClB,4DAA2B;YAC3B,sDAAwB;YACxB,uCAAiB;YACjB,2CAAmB;YACnB,qCAAgB;SACjB;QACD,OAAO,EAAE;YACP,2CAAmB;YACnB,+CAAiB;YACjB,sCAAiB;YACjB,uCAAiB;YACjB,yCAAkB;YAClB,sDAAwB;YACxB,qCAAgB;SACjB;QACD,WAAW,EAAE,CAAC,oCAAgB,EAAE,oCAAgB,CAAC;KAClD,CAAC;GACW,YAAY,CAAG"}
|
|
@@ -4,4 +4,5 @@ export declare class EntityTableRepository {
|
|
|
4
4
|
private entityTableRepository;
|
|
5
5
|
constructor(entityTableRepository: Repository<EntityTable>);
|
|
6
6
|
findByEntityTypeAndListType(entityType: string, listType: string): Promise<EntityTable | null>;
|
|
7
|
+
findByEntityTypeAndListTypeAndDisplayType(entityType: string, listType: string, displayType: string): Promise<EntityTable | null>;
|
|
7
8
|
}
|
|
@@ -26,6 +26,15 @@ let EntityTableRepository = class EntityTableRepository {
|
|
|
26
26
|
where: { mapped_entity_type: entityType, list_type: listType },
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
+
async findByEntityTypeAndListTypeAndDisplayType(entityType, listType, displayType) {
|
|
30
|
+
return await this.entityTableRepository.findOne({
|
|
31
|
+
where: {
|
|
32
|
+
mapped_entity_type: entityType,
|
|
33
|
+
list_type: listType,
|
|
34
|
+
display_type: displayType,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
29
38
|
};
|
|
30
39
|
exports.EntityTableRepository = EntityTableRepository;
|
|
31
40
|
exports.EntityTableRepository = EntityTableRepository = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-table.repository.js","sourceRoot":"","sources":["../../../../src/module/meta/repository/entity-table.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAqC;AACrC,uEAA4D;AAGrD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YAEU,qBAA8C;QAA9C,0BAAqB,GAArB,qBAAqB,CAAyB;IACrD,CAAC;IAEJ,KAAK,CAAC,2BAA2B,CAAC,UAAkB,EAAE,QAAgB;QACpE,OAAO,MAAM,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC;YAC9C,KAAK,EAAE,EAAE,kBAAkB,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE;SAC/D,CAAC,CAAC;IACL,CAAC;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"entity-table.repository.js","sourceRoot":"","sources":["../../../../src/module/meta/repository/entity-table.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAqC;AACrC,uEAA4D;AAGrD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YAEU,qBAA8C;QAA9C,0BAAqB,GAArB,qBAAqB,CAAyB;IACrD,CAAC;IAEJ,KAAK,CAAC,2BAA2B,CAAC,UAAkB,EAAE,QAAgB;QACpE,OAAO,MAAM,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC;YAC9C,KAAK,EAAE,EAAE,kBAAkB,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE;SAC/D,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,yCAAyC,CAC7C,UAAkB,EAClB,QAAgB,EAChB,WAAmB;QAEnB,OAAO,MAAM,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC;YAC9C,KAAK,EAAE;gBACL,kBAAkB,EAAE,UAAU;gBAC9B,SAAS,EAAE,QAAQ;gBACnB,YAAY,EAAE,WAAW;aAC1B;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAzBY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,iCAAW,CAAC,CAAA;qCACC,oBAAU;GAHhC,qBAAqB,CAyBjC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MediaData } from '../entity/media-data.entity';
|
|
2
|
+
import { Repository } from 'typeorm';
|
|
3
|
+
export declare class MediaDataRepository {
|
|
4
|
+
private readonly mediaRepository;
|
|
5
|
+
constructor(mediaRepository: Repository<MediaData>);
|
|
6
|
+
findByAttributeKeyAndMappedEntityIdAndMappedEntityType(attributeKey: string, mappedEntityId: number, mappedEntityType: string): Promise<MediaData | null>;
|
|
7
|
+
findByMappedEntityIdAndMappedEntityType(mappedEntityId: number, mappedEntityType: string): Promise<MediaData[]>;
|
|
8
|
+
deleteByAttributeKeyAndMappedEntityIdAndMappedEntityType(attributeKey: string, mappedEntityId: number, mappedEntityType: string): Promise<import("typeorm").DeleteResult>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.MediaDataRepository = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const media_data_entity_1 = require("../entity/media-data.entity");
|
|
19
|
+
const typeorm_2 = require("typeorm");
|
|
20
|
+
let MediaDataRepository = class MediaDataRepository {
|
|
21
|
+
constructor(mediaRepository) {
|
|
22
|
+
this.mediaRepository = mediaRepository;
|
|
23
|
+
}
|
|
24
|
+
async findByAttributeKeyAndMappedEntityIdAndMappedEntityType(attributeKey, mappedEntityId, mappedEntityType) {
|
|
25
|
+
return await this.mediaRepository.findOne({
|
|
26
|
+
where: {
|
|
27
|
+
mapped_attribute_key: attributeKey,
|
|
28
|
+
mapped_entity_id: mappedEntityId,
|
|
29
|
+
mapped_entity_type: mappedEntityType,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async findByMappedEntityIdAndMappedEntityType(mappedEntityId, mappedEntityType) {
|
|
34
|
+
return await this.mediaRepository.find({
|
|
35
|
+
where: {
|
|
36
|
+
mapped_entity_id: mappedEntityId,
|
|
37
|
+
mapped_entity_type: mappedEntityType,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async deleteByAttributeKeyAndMappedEntityIdAndMappedEntityType(attributeKey, mappedEntityId, mappedEntityType) {
|
|
42
|
+
return await this.mediaRepository.delete({
|
|
43
|
+
mapped_attribute_key: attributeKey,
|
|
44
|
+
mapped_entity_id: mappedEntityId,
|
|
45
|
+
mapped_entity_type: mappedEntityType,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
exports.MediaDataRepository = MediaDataRepository;
|
|
50
|
+
exports.MediaDataRepository = MediaDataRepository = __decorate([
|
|
51
|
+
(0, common_1.Injectable)(),
|
|
52
|
+
__param(0, (0, typeorm_1.InjectRepository)(media_data_entity_1.MediaData)),
|
|
53
|
+
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
54
|
+
], MediaDataRepository);
|
|
55
|
+
//# sourceMappingURL=media-data.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-data.repository.js","sourceRoot":"","sources":["../../../../src/module/meta/repository/media-data.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,mEAAwD;AACxD,qCAAqC;AAG9B,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YAEmB,eAAsC;QAAtC,oBAAe,GAAf,eAAe,CAAuB;IACtD,CAAC;IAEJ,KAAK,CAAC,sDAAsD,CAC1D,YAAoB,EACpB,cAAsB,EACtB,gBAAwB;QAExB,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC;YACxC,KAAK,EAAE;gBACL,oBAAoB,EAAE,YAAY;gBAClC,gBAAgB,EAAE,cAAc;gBAChC,kBAAkB,EAAE,gBAAgB;aACrC;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,uCAAuC,CAC3C,cAAsB,EACtB,gBAAwB;QAExB,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;YACrC,KAAK,EAAE;gBACL,gBAAgB,EAAE,cAAc;gBAChC,kBAAkB,EAAE,gBAAgB;aACrC;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,wDAAwD,CAC5D,YAAoB,EACpB,cAAsB,EACtB,gBAAwB;QAExB,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;YACvC,oBAAoB,EAAE,YAAY;YAClC,gBAAgB,EAAE,cAAc;YAChC,kBAAkB,EAAE,gBAAgB;SACrC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA3CY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,6BAAS,CAAC,CAAA;qCACM,oBAAU;GAHnC,mBAAmB,CA2C/B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EntityTableService } from './entity-table.service';
|
|
2
2
|
import { EntityListData } from '../dto/entity-list-data.dto';
|
|
3
|
+
import { EntityTable } from '../entity/entity-table.entity';
|
|
3
4
|
import { EntityManager } from 'typeorm';
|
|
4
5
|
import { EntityTableColumnService } from './entity-table-column.service';
|
|
5
6
|
export declare class EntityListService {
|
|
@@ -8,8 +9,9 @@ export declare class EntityListService {
|
|
|
8
9
|
private entityManager;
|
|
9
10
|
constructor(entityTableService: EntityTableService, entityTableColumnService: EntityTableColumnService, entityManager: EntityManager);
|
|
10
11
|
getFilterDataWithTabs(entityType: string, listType: string, filters: Record<string, any>, sortColumn: string | undefined, sortOrder: string | undefined, pageNumber: number, pageSize: number): Promise<EntityListData>;
|
|
11
|
-
|
|
12
|
+
getFilteredList(entityTable: EntityTable, filters: Record<string, any>, sortColumn: string | undefined, sortOrder: string | undefined, pageNumber: number | undefined, pageSize: number | undefined): Promise<any>;
|
|
12
13
|
private getTotalCount;
|
|
13
14
|
private getQuery;
|
|
14
15
|
private getWhereClause;
|
|
16
|
+
getMaxSequenceNumber(tableName: string, parentType: string, parentId: number): Promise<any>;
|
|
15
17
|
}
|
|
@@ -18,6 +18,7 @@ const entity_table_service_1 = require("./entity-table.service");
|
|
|
18
18
|
const entity_list_data_dto_1 = require("../dto/entity-list-data.dto");
|
|
19
19
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
20
20
|
const typeorm_2 = require("typeorm");
|
|
21
|
+
const entity_tab_dto_1 = require("../dto/entity-tab.dto");
|
|
21
22
|
const entity_table_column_service_1 = require("./entity-table-column.service");
|
|
22
23
|
let EntityListService = class EntityListService {
|
|
23
24
|
constructor(entityTableService, entityTableColumnService, entityManager) {
|
|
@@ -56,16 +57,26 @@ let EntityListService = class EntityListService {
|
|
|
56
57
|
query += whereClause.query;
|
|
57
58
|
}
|
|
58
59
|
query += ' GROUP BY ' + entityTable.tab_column;
|
|
59
|
-
|
|
60
|
+
let tabs = await this.entityManager.query(query, whereClause.argumentList);
|
|
61
|
+
let all = 0;
|
|
62
|
+
for (const i in tabs) {
|
|
63
|
+
let tab = tabs[i];
|
|
64
|
+
all += parseInt(String(tab.tab_value_count));
|
|
65
|
+
}
|
|
66
|
+
let entityTab = new entity_tab_dto_1.EntityTab();
|
|
67
|
+
entityTab.tab_value = 'ALL';
|
|
68
|
+
entityTab.tab_value_count = all;
|
|
69
|
+
tabs.push(entityTab);
|
|
70
|
+
return tabs;
|
|
60
71
|
}
|
|
61
72
|
getQuery(source, groupByColumn) {
|
|
62
73
|
if (groupByColumn) {
|
|
63
74
|
return `SELECT ${groupByColumn} as tab_value, COUNT(1) AS tab_value_count
|
|
64
|
-
|
|
75
|
+
FROM ${source}`;
|
|
65
76
|
}
|
|
66
77
|
else {
|
|
67
78
|
return `SELECT *
|
|
68
|
-
|
|
79
|
+
FROM ${source}`;
|
|
69
80
|
}
|
|
70
81
|
}
|
|
71
82
|
async getWhereClause(entityTable, filterCriteria) {
|
|
@@ -99,6 +110,18 @@ let EntityListService = class EntityListService {
|
|
|
99
110
|
}
|
|
100
111
|
return { query, argumentList: argsObjectList };
|
|
101
112
|
}
|
|
113
|
+
async getMaxSequenceNumber(tableName, parentType, parentId) {
|
|
114
|
+
let query = `SELECT COUNT(1) seq_no
|
|
115
|
+
FROM ${tableName} `;
|
|
116
|
+
const argsObjectList = [];
|
|
117
|
+
if (parentId) {
|
|
118
|
+
query += `parent_id = ? AND parent_type = ? `;
|
|
119
|
+
argsObjectList.push(parentId);
|
|
120
|
+
argsObjectList.push(parentType);
|
|
121
|
+
}
|
|
122
|
+
let result = await this.entityManager.query(query, argsObjectList);
|
|
123
|
+
return result ? result[0].seq_no : 0;
|
|
124
|
+
}
|
|
102
125
|
};
|
|
103
126
|
exports.EntityListService = EntityListService;
|
|
104
127
|
exports.EntityListService = EntityListService = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-list.service.js","sourceRoot":"","sources":["../../../../src/module/meta/service/entity-list.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iEAA4D;AAC5D,sEAA6D;AAE7D,6CAAsD;AACtD,qCAAwC;
|
|
1
|
+
{"version":3,"file":"entity-list.service.js","sourceRoot":"","sources":["../../../../src/module/meta/service/entity-list.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iEAA4D;AAC5D,sEAA6D;AAE7D,6CAAsD;AACtD,qCAAwC;AACxC,0DAAkD;AAClD,+EAAyE;AAGlE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,YACU,kBAAsC,EACtC,wBAAkD,EAC3B,aAA4B;QAFnD,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,6BAAwB,GAAxB,wBAAwB,CAA0B;QAC3B,kBAAa,GAAb,aAAa,CAAe;IAC1D,CAAC;IAEJ,KAAK,CAAC,qBAAqB,CACzB,UAAkB,EAClB,QAAgB,EAChB,OAA4B,EAC5B,UAA8B,EAC9B,SAA6B,EAC7B,UAAkB,EAClB,QAAgB;QAEhB,IAAI,cAAc,GAAG,IAAI,qCAAc,EAAE,CAAC;QAE1C,IAAI,WAAW,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,2BAA2B,CACzE,UAAU,EACV,QAAQ,CACT,CAAC;QAEF,IAAI,WAAW,EAAE,CAAC;YAChB,IAAI,CAAC,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;gBAC7B,IAAI,UAAU,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,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AAS,GAAG,CAAC;QACjC,MAAM,cAAc,GAAU,EAAE,CAAC;QACjC,IAAI,QAAQ,EAAE,CAAC;YACb,KAAK,IAAI,oCAAoC,CAAC;YAC9C,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC9B,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAClC,CAAC;QAED,IAAI,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;QAEnE,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC;CACF,CAAA;AA5JY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,6BAAmB,GAAE,CAAA;qCAFM,yCAAkB;QACZ,sDAAwB;QACZ,uBAAa;GAJlD,iBAAiB,CA4J7B"}
|
|
@@ -6,16 +6,24 @@ import { BaseEntity } from '../entity/base-entity.entity';
|
|
|
6
6
|
import { LoggingService } from '../../../utils/service/loggingUtil.service';
|
|
7
7
|
import { EntityListData } from '../dto/entity-list-data.dto';
|
|
8
8
|
import { EntityListService } from './entity-list.service';
|
|
9
|
+
import { EntityManager } from 'typeorm';
|
|
10
|
+
import { EntityTableService } from './entity-table.service';
|
|
11
|
+
import { EntityTableColumnService } from './entity-table-column.service';
|
|
9
12
|
export declare class EntityServiceImpl implements EntityService<BaseEntity> {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
protected readonly entityMasterService: EntityMasterService;
|
|
14
|
+
protected readonly entityTableColumnService: EntityTableColumnService;
|
|
15
|
+
protected readonly entityTableService: EntityTableService;
|
|
16
|
+
protected readonly reflectionHelper: ReflectionHelper;
|
|
17
|
+
protected readonly entityListService: EntityListService;
|
|
18
|
+
protected readonly loggingService: LoggingService;
|
|
19
|
+
createEntity(entityData: BaseEntity, loggedInUser: UserData | null, manager?: EntityManager): Promise<BaseEntity>;
|
|
15
20
|
deleteEntity(entityType: string, entityId: number, loggedInUserData: UserData): void;
|
|
16
21
|
findByCode(entityType: string, code: string): Promise<BaseEntity>;
|
|
17
22
|
getEntityData(entityType: string, id: number): Promise<BaseEntity | null>;
|
|
18
23
|
getEntityList(entityType: string): Promise<BaseEntity[]>;
|
|
19
24
|
updateEntity(entityData: BaseEntity, loggedInUserData: UserData | null): Promise<BaseEntity>;
|
|
20
25
|
getFilterDataWithTabs(entityType: string, listType: string, filters: Record<string, any>, sortColumn: string | undefined, sortOrder: string | undefined, pageNumber: number, pageSize: number): Promise<EntityListData>;
|
|
26
|
+
generateExcelReport(entityType: string, filterCriteria: Record<string, any>, listEntityType: string, displayType: string): Promise<string | null>;
|
|
27
|
+
private populateExcelData;
|
|
28
|
+
private getMaxSequenceNumber;
|
|
21
29
|
}
|
|
@@ -15,24 +15,35 @@ const entity_master_service_1 = require("./entity-master.service");
|
|
|
15
15
|
const reflection_helper_service_1 = require("../../../utils/service/reflection-helper.service");
|
|
16
16
|
const loggingUtil_service_1 = require("../../../utils/service/loggingUtil.service");
|
|
17
17
|
const entity_list_service_1 = require("./entity-list.service");
|
|
18
|
+
const excel_data_dto_1 = require("../../../utils/dto/excel-data.dto");
|
|
19
|
+
const fs = require("fs");
|
|
20
|
+
const path = require("path");
|
|
21
|
+
const excel_helper_service_1 = require("../../../utils/service/excel-helper.service");
|
|
22
|
+
const entity_table_service_1 = require("./entity-table.service");
|
|
23
|
+
const entity_table_column_service_1 = require("./entity-table-column.service");
|
|
24
|
+
const global_constant_1 = require("../../../constant/global.constant");
|
|
18
25
|
let EntityServiceImpl = class EntityServiceImpl {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
async createEntity(entityData, loggedInUser) {
|
|
26
|
+
async createEntity(entityData, loggedInUser, manager) {
|
|
27
|
+
if (!entityData.entity_type) {
|
|
28
|
+
throw new common_1.BadRequestException(`EntityType is missing`);
|
|
29
|
+
}
|
|
25
30
|
const entityMaster = await this.entityMasterService.getEntityData(entityData.entity_type);
|
|
26
|
-
const
|
|
27
|
-
|
|
31
|
+
const repo = manager
|
|
32
|
+
? manager.getRepository(entityMaster.entityDataClass)
|
|
33
|
+
: this.reflectionHelper.getRepoService(entityMaster.entityDataClass);
|
|
34
|
+
if (!repo) {
|
|
28
35
|
throw new Error(`Repository service not found for entityType: ${entityData.entity_type}`);
|
|
29
36
|
}
|
|
30
|
-
entityData.
|
|
37
|
+
if (!entityData.code) {
|
|
38
|
+
let maxSeqNo = await this.getMaxSequenceNumber(entityData.entity_type, entityData.parent_id, entityData.parent_type);
|
|
39
|
+
maxSeqNo = Number(maxSeqNo) + 1;
|
|
40
|
+
entityData.code = entityData.entity_type + maxSeqNo;
|
|
41
|
+
}
|
|
31
42
|
entityData.created_date = new Date();
|
|
32
43
|
if (loggedInUser) {
|
|
33
44
|
entityData.created_by = loggedInUser.id;
|
|
34
45
|
}
|
|
35
|
-
const savedEntity =
|
|
46
|
+
const savedEntity = repo.save(entityData);
|
|
36
47
|
return savedEntity;
|
|
37
48
|
}
|
|
38
49
|
deleteEntity(entityType, entityId, loggedInUserData) { }
|
|
@@ -81,13 +92,79 @@ let EntityServiceImpl = class EntityServiceImpl {
|
|
|
81
92
|
async getFilterDataWithTabs(entityType, listType, filters, sortColumn, sortOrder, pageNumber, pageSize) {
|
|
82
93
|
return await this.entityListService.getFilterDataWithTabs(entityType, listType, filters, sortColumn, sortOrder, pageNumber, pageSize);
|
|
83
94
|
}
|
|
95
|
+
async generateExcelReport(entityType, filterCriteria, listEntityType, displayType) {
|
|
96
|
+
let fileName;
|
|
97
|
+
try {
|
|
98
|
+
const excelData = new excel_data_dto_1.ExcelData();
|
|
99
|
+
await this.populateExcelData(excelData, entityType, filterCriteria, listEntityType, displayType);
|
|
100
|
+
const modifiedDate = new Date().toISOString().replace(/[-T:.Z]/g, '');
|
|
101
|
+
const tempDir = path.join(__dirname, '../../temp');
|
|
102
|
+
if (!fs.existsSync(tempDir)) {
|
|
103
|
+
fs.mkdirSync(tempDir, { recursive: true });
|
|
104
|
+
}
|
|
105
|
+
fileName = path.join(tempDir, `export_${modifiedDate}.xlsx`);
|
|
106
|
+
excelData.filePath = fileName;
|
|
107
|
+
excel_helper_service_1.ExcelHelper.writeExcel(excelData);
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
throw error;
|
|
111
|
+
}
|
|
112
|
+
return fileName;
|
|
113
|
+
}
|
|
114
|
+
async populateExcelData(excelData, entityType, filterCriteria, listEntityType, displayType) {
|
|
115
|
+
const sheet = {
|
|
116
|
+
sheetName: entityType,
|
|
117
|
+
headers: [],
|
|
118
|
+
rowList: [],
|
|
119
|
+
};
|
|
120
|
+
const entityTable = await this.entityTableService.findByEntityTypeAndListTypeAndDisplayType(entityType, listEntityType, displayType);
|
|
121
|
+
if (entityTable) {
|
|
122
|
+
const entityTableColumnList = await this.entityTableColumnService.findByParentIdAndParentType(entityTable.id, entityTable.entity_type);
|
|
123
|
+
sheet.headers = entityTableColumnList.map((col) => col.name);
|
|
124
|
+
const attributeList = entityTableColumnList.map((col) => col.attribute_key);
|
|
125
|
+
const filteredList = await this.entityListService.getFilteredList(entityTable, filterCriteria, undefined, undefined, undefined, undefined);
|
|
126
|
+
sheet.rowList = filteredList.map((item) => attributeList.map((attr) => item[attr] !== undefined ? item[attr] : null));
|
|
127
|
+
excelData.addSheet(sheet);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
async getMaxSequenceNumber(entityType, parentId, parentType) {
|
|
131
|
+
let tableName;
|
|
132
|
+
if (global_constant_1.ENTITYTYPE_ENTITYMASTER === entityType) {
|
|
133
|
+
tableName = 'cr_entity_master';
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
let entityMaster = await this.entityMasterService.getEntityData(entityType);
|
|
137
|
+
tableName = entityMaster.dbTableName;
|
|
138
|
+
}
|
|
139
|
+
return await this.entityListService.getMaxSequenceNumber(tableName, parentType, parentId);
|
|
140
|
+
}
|
|
84
141
|
};
|
|
85
142
|
exports.EntityServiceImpl = EntityServiceImpl;
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, common_1.Inject)(),
|
|
145
|
+
__metadata("design:type", entity_master_service_1.EntityMasterService)
|
|
146
|
+
], EntityServiceImpl.prototype, "entityMasterService", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, common_1.Inject)(),
|
|
149
|
+
__metadata("design:type", entity_table_column_service_1.EntityTableColumnService)
|
|
150
|
+
], EntityServiceImpl.prototype, "entityTableColumnService", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, common_1.Inject)(),
|
|
153
|
+
__metadata("design:type", entity_table_service_1.EntityTableService)
|
|
154
|
+
], EntityServiceImpl.prototype, "entityTableService", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
(0, common_1.Inject)(),
|
|
157
|
+
__metadata("design:type", reflection_helper_service_1.ReflectionHelper)
|
|
158
|
+
], EntityServiceImpl.prototype, "reflectionHelper", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
(0, common_1.Inject)(),
|
|
161
|
+
__metadata("design:type", entity_list_service_1.EntityListService)
|
|
162
|
+
], EntityServiceImpl.prototype, "entityListService", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, common_1.Inject)(),
|
|
165
|
+
__metadata("design:type", loggingUtil_service_1.LoggingService)
|
|
166
|
+
], EntityServiceImpl.prototype, "loggingService", void 0);
|
|
86
167
|
exports.EntityServiceImpl = EntityServiceImpl = __decorate([
|
|
87
|
-
(0, common_1.Injectable)()
|
|
88
|
-
__metadata("design:paramtypes", [entity_master_service_1.EntityMasterService,
|
|
89
|
-
reflection_helper_service_1.ReflectionHelper,
|
|
90
|
-
entity_list_service_1.EntityListService,
|
|
91
|
-
loggingUtil_service_1.LoggingService])
|
|
168
|
+
(0, common_1.Injectable)()
|
|
92
169
|
], EntityServiceImpl);
|
|
93
170
|
//# sourceMappingURL=entity-service-impl.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-service-impl.service.js","sourceRoot":"","sources":["../../../../src/module/meta/service/entity-service-impl.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"entity-service-impl.service.js","sourceRoot":"","sources":["../../../../src/module/meta/service/entity-service-impl.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2CAAyE;AAEzE,mEAA8D;AAC9D,gGAAoF;AAEpF,oFAA4E;AAE5E,+DAA0D;AAE1D,sEAA8D;AAC9D,yBAAyB;AACzB,6BAA6B;AAC7B,sFAA0E;AAE1E,iEAA4D;AAC5D,+EAAyE;AACzE,uEAA4E;AAGrE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAS5B,KAAK,CAAC,YAAY,CAChB,UAAsB,EACtB,YAA6B,EAC7B,OAAuB;QAEvB,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;YAC5B,MAAM,IAAI,4BAAmB,CAAC,uBAAuB,CAAC,CAAC;QACzD,CAAC;QACD,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAC/D,UAAU,CAAC,WAAW,CACvB,CAAC;QAEF,MAAM,IAAI,GAAG,OAAO;YAClB,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,eAAe,CAAC;YACrD,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;QAEvE,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CACb,gDAAgD,UAAU,CAAC,WAAW,EAAE,CACzE,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACrB,IAAI,QAAQ,GAAG,MAAM,IAAI,CAAC,o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EAAE,EAAE,CACzB,IAAI,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAC7C,CACF,CAAC;YACF,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,oBAAoB,CAChC,UAAkB,EAClB,QAAgB,EAChB,UAAkB;QAElB,IAAI,SAAiB,CAAC;QACtB,IAAI,yCAAuB,KAAK,UAAU,EAAE,CAAC;YAC3C,SAAS,GAAG,kBAAkB,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,IAAI,YAAY,GACd,MAAM,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAC3D,SAAS,GAAG,YAAY,CAAC,WAAW,CAAC;QACvC,CAAC;QACD,OAAO,MAAM,IAAI,CAAC,iBAAiB,CAAC,oBAAoB,CACtD,SAAS,EACT,UAAU,EACV,QAAQ,CACT,CAAC;IACJ,CAAC;CACF,CAAA;AA3PY,8CAAiB;AACC;IAA5B,IAAA,eAAM,GAAE;8BAAyC,2CAAmB;8DAAC;AAEnD;IADlB,IAAA,eAAM,GAAE;8BACoC,sDAAwB;mEAAC;AACzC;IAA5B,IAAA,eAAM,GAAE;8BAAwC,yCAAkB;6DAAC;AACvC;IAA5B,IAAA,eAAM,GAAE;8BAAsC,4CAAgB;2DAAC;AACnC;IAA5B,IAAA,eAAM,GAAE;8BAAuC,uCAAiB;4DAAC;AACrC;IAA5B,IAAA,eAAM,GAAE;8BAAoC,oCAAc;yDAAC;4BAPjD,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CA2P7B"}
|
|
@@ -3,4 +3,5 @@ export declare class EntityTableColumnService {
|
|
|
3
3
|
private entityTableColumnRepository;
|
|
4
4
|
constructor(entityTableColumnRepository: EntityTableColumnRepository);
|
|
5
5
|
getAttributeJson(parentId: number, parentType: string): Promise<{}>;
|
|
6
|
+
findByParentIdAndParentType(parentId: number, parentType: string): Promise<import("../entity/entity-table-column.entity").EntityTableColumn[]>;
|
|
6
7
|
}
|
|
@@ -24,6 +24,10 @@ let EntityTableColumnService = class EntityTableColumnService {
|
|
|
24
24
|
});
|
|
25
25
|
return attributeJson;
|
|
26
26
|
}
|
|
27
|
+
async findByParentIdAndParentType(parentId, parentType) {
|
|
28
|
+
let entityTableColumns = await this.entityTableColumnRepository.findByParentIdAndParentType(parentId, parentType);
|
|
29
|
+
return entityTableColumns;
|
|
30
|
+
}
|
|
27
31
|
};
|
|
28
32
|
exports.EntityTableColumnService = EntityTableColumnService;
|
|
29
33
|
exports.EntityTableColumnService = EntityTableColumnService = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-table-column.service.js","sourceRoot":"","sources":["../../../../src/module/meta/service/entity-table-column.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iGAA2F;AAGpF,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACnC,YACU,2BAAwD;QAAxD,gCAA2B,GAA3B,2BAA2B,CAA6B;IAC/D,CAAC;IAEJ,KAAK,CAAC,gBAAgB,CAAC,QAAgB,EAAE,UAAkB;QACzD,IAAI,kBAAkB,
|
|
1
|
+
{"version":3,"file":"entity-table-column.service.js","sourceRoot":"","sources":["../../../../src/module/meta/service/entity-table-column.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iGAA2F;AAGpF,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACnC,YACU,2BAAwD;QAAxD,gCAA2B,GAA3B,2BAA2B,CAA6B;IAC/D,CAAC;IAEJ,KAAK,CAAC,gBAAgB,CAAC,QAAgB,EAAE,UAAkB;QACzD,IAAI,kBAAkB,GACpB,MAAM,IAAI,CAAC,2BAA2B,CAAC,2BAA2B,CAChE,QAAQ,EACR,UAAU,CACX,CAAC;QACJ,IAAI,aAAa,GAAG,EAAE,CAAC;QACvB,kBAAkB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACnC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;QACvD,CAAC,CAAC,CAAC;QACH,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,2BAA2B,CAAC,QAAgB,EAAE,UAAkB;QACpE,IAAI,kBAAkB,GACpB,MAAM,IAAI,CAAC,2BAA2B,CAAC,2BAA2B,CAChE,QAAQ,EACR,UAAU,CACX,CAAC;QACJ,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF,CAAA;AA1BY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAG4B,4DAA2B;GAFvD,wBAAwB,CA0BpC"}
|
|
@@ -3,4 +3,5 @@ export declare class EntityTableService {
|
|
|
3
3
|
private entityTableRepository;
|
|
4
4
|
constructor(entityTableRepository: EntityTableRepository);
|
|
5
5
|
findByEntityTypeAndListType(entityType: string, listType: string): Promise<import("../entity/entity-table.entity").EntityTable | null>;
|
|
6
|
+
findByEntityTypeAndListTypeAndDisplayType(entityType: string, listType: string, displayType: string): Promise<import("../entity/entity-table.entity").EntityTable | null>;
|
|
6
7
|
}
|
|
@@ -19,6 +19,9 @@ let EntityTableService = class EntityTableService {
|
|
|
19
19
|
async findByEntityTypeAndListType(entityType, listType) {
|
|
20
20
|
return await this.entityTableRepository.findByEntityTypeAndListType(entityType, listType);
|
|
21
21
|
}
|
|
22
|
+
async findByEntityTypeAndListTypeAndDisplayType(entityType, listType, displayType) {
|
|
23
|
+
return await this.entityTableRepository.findByEntityTypeAndListTypeAndDisplayType(entityType, listType, displayType);
|
|
24
|
+
}
|
|
22
25
|
};
|
|
23
26
|
exports.EntityTableService = EntityTableService;
|
|
24
27
|
exports.EntityTableService = EntityTableService = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-table.service.js","sourceRoot":"","sources":["../../../../src/module/meta/service/entity-table.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mFAA8E;AAGvE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAAoB,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;IAAG,CAAC;IAEpE,KAAK,CAAC,2BAA2B,CAAC,UAAkB,EAAE,QAAgB;QACpE,OAAO,MAAM,IAAI,CAAC,qBAAqB,CAAC,2BAA2B,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"entity-table.service.js","sourceRoot":"","sources":["../../../../src/module/meta/service/entity-table.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mFAA8E;AAGvE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAAoB,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;IAAG,CAAC;IAEpE,KAAK,CAAC,2BAA2B,CAAC,UAAkB,EAAE,QAAgB;QACpE,OAAO,MAAM,IAAI,CAAC,qBAAqB,CAAC,2BAA2B,CACjE,UAAU,EACV,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,yCAAyC,CAAC,UAAkB,EAAE,QAAgB,EAAE,WAAmB;QACvG,OAAO,MAAM,IAAI,CAAC,qBAAqB,CAAC,yCAAyC,CAAC,UAAU,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IACvH,CAAC;CACF,CAAA;AAbY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;qCAEgC,+CAAqB;GADrD,kBAAkB,CAa9B"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { UserData } from '../../user/entity/user.entity';
|
|
2
2
|
import { BaseEntity } from '../entity/base-entity.entity';
|
|
3
3
|
import { EntityListData } from '../dto/entity-list-data.dto';
|
|
4
|
+
import { EntityManager } from 'typeorm';
|
|
4
5
|
export interface EntityService<T extends BaseEntity> {
|
|
5
|
-
createEntity(entityData: T, loggedInUser: UserData): Promise<BaseEntity>;
|
|
6
|
+
createEntity(entityData: T, loggedInUser: UserData, manager?: EntityManager): Promise<BaseEntity>;
|
|
6
7
|
getEntityData(entityType: string, entityId: number): Promise<BaseEntity | null>;
|
|
7
8
|
getEntityList(entityType: string): Promise<BaseEntity[]>;
|
|
8
9
|
updateEntity(entityData: T, loggedInUserData: UserData): Promise<BaseEntity>;
|
|
9
10
|
deleteEntity(entityType: string, entityId: number, loggedInUserData: UserData): void;
|
|
10
11
|
findByCode(entityType: string, code: string): Promise<BaseEntity>;
|
|
11
12
|
getFilterDataWithTabs(entityType: string, listType: string, filters: Record<string, any>, sortColumn: string | undefined, sortOrder: string | undefined, pageNumber: number, pageSize: number): Promise<EntityListData>;
|
|
13
|
+
generateExcelReport(entityType: string, filterCriteria: Record<string, any>, listEntityType: string, displayType: string): Promise<string | null>;
|
|
12
14
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EntityServiceImpl } from './entity-service-impl.service';
|
|
2
|
+
import { MediaDataRepository } from '../repository/media-data.repository';
|
|
3
|
+
export declare class MediaDataService extends EntityServiceImpl {
|
|
4
|
+
private readonly mediaRepository;
|
|
5
|
+
constructor(mediaRepository: MediaDataRepository);
|
|
6
|
+
findByAttributeKeyAndMappedEntityIdAndMappedEntityType(attributeKey: string, mappedEntityId: number, mappedEntityType: string): Promise<import("../entity/media-data.entity").MediaData | null>;
|
|
7
|
+
findByMappedEntityIdAndMappedEntityType(mappedEntityId: number, mappedEntityType: string): Promise<import("../entity/media-data.entity").MediaData[]>;
|
|
8
|
+
deleteByAttributeKeyAndMappedEntityIdAndMappedEntityType(attributeKey: string, mappedEntityId: number, mappedEntityType: string): Promise<import("typeorm").DeleteResult>;
|
|
9
|
+
}
|