rez_core 0.0.7 → 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/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 +13 -17
- 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 -4
- 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 +16 -27
- 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
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$">
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
+
</content>
|
|
9
|
+
<orderEntry type="inheritedJdk" />
|
|
10
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
+
</component>
|
|
12
|
+
</module>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
+
<code_scheme name="Project" version="173">
|
|
3
|
+
<HTMLCodeStyleSettings>
|
|
4
|
+
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
|
5
|
+
</HTMLCodeStyleSettings>
|
|
6
|
+
<JSCodeStyleSettings version="0">
|
|
7
|
+
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
8
|
+
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
9
|
+
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
10
|
+
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
11
|
+
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
12
|
+
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
13
|
+
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
14
|
+
</JSCodeStyleSettings>
|
|
15
|
+
<TypeScriptCodeStyleSettings version="0">
|
|
16
|
+
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
17
|
+
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
18
|
+
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
19
|
+
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
20
|
+
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
21
|
+
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
22
|
+
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
23
|
+
</TypeScriptCodeStyleSettings>
|
|
24
|
+
<VueCodeStyleSettings>
|
|
25
|
+
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
|
|
26
|
+
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
|
|
27
|
+
</VueCodeStyleSettings>
|
|
28
|
+
<codeStyleSettings language="HTML">
|
|
29
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
30
|
+
<indentOptions>
|
|
31
|
+
<option name="INDENT_SIZE" value="2" />
|
|
32
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
33
|
+
<option name="TAB_SIZE" value="2" />
|
|
34
|
+
</indentOptions>
|
|
35
|
+
</codeStyleSettings>
|
|
36
|
+
<codeStyleSettings language="JavaScript">
|
|
37
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
38
|
+
<indentOptions>
|
|
39
|
+
<option name="INDENT_SIZE" value="2" />
|
|
40
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
41
|
+
<option name="TAB_SIZE" value="2" />
|
|
42
|
+
</indentOptions>
|
|
43
|
+
</codeStyleSettings>
|
|
44
|
+
<codeStyleSettings language="TypeScript">
|
|
45
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
46
|
+
<indentOptions>
|
|
47
|
+
<option name="INDENT_SIZE" value="2" />
|
|
48
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
49
|
+
<option name="TAB_SIZE" value="2" />
|
|
50
|
+
</indentOptions>
|
|
51
|
+
</codeStyleSettings>
|
|
52
|
+
<codeStyleSettings language="Vue">
|
|
53
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
54
|
+
<indentOptions>
|
|
55
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
56
|
+
</indentOptions>
|
|
57
|
+
</codeStyleSettings>
|
|
58
|
+
</code_scheme>
|
|
59
|
+
</component>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
|
4
|
+
<data-source source="LOCAL" name="@localhost" uuid="9a102608-c415-4802-970e-769555981800">
|
|
5
|
+
<driver-ref>mysql.8</driver-ref>
|
|
6
|
+
<synchronize>true</synchronize>
|
|
7
|
+
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
|
|
8
|
+
<jdbc-url>jdbc:mysql://localhost:3306</jdbc-url>
|
|
9
|
+
<working-dir>$ProjectFileDir$</working-dir>
|
|
10
|
+
</data-source>
|
|
11
|
+
</component>
|
|
12
|
+
</project>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/250218_nodejs_core.iml" filepath="$PROJECT_DIR$/.idea/250218_nodejs_core.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
package/.idea/vcs.xml
ADDED
package/data/master.xlsx
CHANGED
|
Binary file
|
package/dist/app.module.d.ts
CHANGED
package/dist/app.module.js
CHANGED
|
@@ -1,32 +1 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.AppModule = void 0;
|
|
10
|
-
const common_1 = require("@nestjs/common");
|
|
11
|
-
const config_module_1 = require("./config/config.module");
|
|
12
|
-
const enterprise_module_1 = require("./module/enterprise/enterprise.module");
|
|
13
|
-
const utils_module_1 = require("./utils/utils.module");
|
|
14
|
-
const user_module_1 = require("./module/user/user.module");
|
|
15
|
-
const entity_module_1 = require("./module/meta/entity.module");
|
|
16
|
-
const module_module_1 = require("./module/module/module.module");
|
|
17
|
-
let AppModule = class AppModule {
|
|
18
|
-
};
|
|
19
|
-
exports.AppModule = AppModule;
|
|
20
|
-
exports.AppModule = AppModule = __decorate([
|
|
21
|
-
(0, common_1.Module)({
|
|
22
|
-
imports: [
|
|
23
|
-
entity_module_1.EntityModule,
|
|
24
|
-
config_module_1.DatabaseModule,
|
|
25
|
-
enterprise_module_1.EnterpriseModule,
|
|
26
|
-
utils_module_1.UtilsModule,
|
|
27
|
-
user_module_1.UserModule,
|
|
28
|
-
module_module_1.ModuleModule,
|
|
29
|
-
],
|
|
30
|
-
})
|
|
31
|
-
], AppModule);
|
|
32
1
|
//# sourceMappingURL=app.module.js.map
|
package/dist/app.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":""}
|
|
@@ -21,7 +21,7 @@ exports.DatabaseModule = DatabaseModule = __decorate([
|
|
|
21
21
|
typeorm_1.TypeOrmModule.forRootAsync({
|
|
22
22
|
useClass: database_config_1.MySqlConfiguration,
|
|
23
23
|
}),
|
|
24
|
-
config_1.ConfigModule.forRoot({ isGlobal: true })
|
|
24
|
+
config_1.ConfigModule.forRoot({ isGlobal: true }),
|
|
25
25
|
],
|
|
26
26
|
exports: [typeorm_1.TypeOrmModule],
|
|
27
27
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.module.js","sourceRoot":"","sources":["../../src/config/config.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAgD;AAChD,6CAAgD;AAEhD,2CAA4C;AAC5C,uDAAuD;AAahD,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAX1B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,YAAY,CAAC;gBACzB,QAAQ,EAAE,oCAAkB;aAC7B,CAAC;YACF,qBAAY,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"config.module.js","sourceRoot":"","sources":["../../src/config/config.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAgD;AAChD,6CAAgD;AAEhD,2CAA4C;AAC5C,uDAAuD;AAahD,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAX1B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,YAAY,CAAC;gBACzB,QAAQ,EAAE,oCAAkB;aAC7B,CAAC;YACF,qBAAY,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SACzC;QAED,OAAO,EAAE,CAAC,uBAAa,CAAC;KACzB,CAAC;GACW,cAAc,CAAG"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
1
2
|
import { TypeOrmModuleOptions, TypeOrmOptionsFactory } from '@nestjs/typeorm';
|
|
2
3
|
export declare class MySqlConfiguration implements TypeOrmOptionsFactory {
|
|
4
|
+
private configService;
|
|
5
|
+
constructor(configService: ConfigService);
|
|
3
6
|
createTypeOrmOptions(): TypeOrmModuleOptions;
|
|
4
7
|
}
|
|
@@ -5,18 +5,25 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
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
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
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
|
+
};
|
|
8
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
12
|
exports.MySqlConfiguration = void 0;
|
|
10
13
|
const common_1 = require("@nestjs/common");
|
|
14
|
+
const config_1 = require("@nestjs/config");
|
|
11
15
|
let MySqlConfiguration = class MySqlConfiguration {
|
|
16
|
+
constructor(configService) {
|
|
17
|
+
this.configService = configService;
|
|
18
|
+
}
|
|
12
19
|
createTypeOrmOptions() {
|
|
13
20
|
return {
|
|
14
21
|
type: 'mysql',
|
|
15
|
-
host:
|
|
16
|
-
port: parseInt(
|
|
17
|
-
username:
|
|
18
|
-
password:
|
|
19
|
-
database:
|
|
22
|
+
host: this.configService.get('DB_HOST') || '13.234.25.234',
|
|
23
|
+
port: parseInt(this.configService.get('DB_PORT') || '3306', 10),
|
|
24
|
+
username: this.configService.get('DB_USER') || 'root',
|
|
25
|
+
password: this.configService.get('DB_PASS') || 'Rezolut@123',
|
|
26
|
+
database: this.configService.get('DB_NAME') || 'core',
|
|
20
27
|
entities: [__dirname + '/../module/**/*.entity.{ts,js}'],
|
|
21
28
|
synchronize: true,
|
|
22
29
|
autoLoadEntities: true,
|
|
@@ -25,6 +32,7 @@ let MySqlConfiguration = class MySqlConfiguration {
|
|
|
25
32
|
};
|
|
26
33
|
exports.MySqlConfiguration = MySqlConfiguration;
|
|
27
34
|
exports.MySqlConfiguration = MySqlConfiguration = __decorate([
|
|
28
|
-
(0, common_1.Injectable)()
|
|
35
|
+
(0, common_1.Injectable)(),
|
|
36
|
+
__metadata("design:paramtypes", [config_1.ConfigService])
|
|
29
37
|
], MySqlConfiguration);
|
|
30
38
|
//# sourceMappingURL=database.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.config.js","sourceRoot":"","sources":["../../src/config/database.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"database.config.js","sourceRoot":"","sources":["../../src/config/database.config.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAA+C;AAIxC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAE7B,YACU,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IACpC,CAAC;IAEH,oBAAoB;QAClB,OAAO;YACL,IAAI,EAAE,OAAO;YACb,IAAI,EAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,IAAG,eAAe;YAC1D,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,MAAM,EAAE,EAAE,CAAC;YAC/D,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,MAAM;YACrD,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,aAAa;YAC5D,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,MAAM;YACrD,QAAQ,EAAE,CAAC,SAAS,GAAG,gCAAgC,CAAC;YACxD,WAAW,EAAE,IAAI;YACjB,gBAAgB,EAAE,IAAI;SACvB,CAAC;IACJ,CAAC;CACF,CAAA;AAnBY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;qCAIc,sBAAa;GAH3B,kBAAkB,CAmB9B"}
|
|
@@ -4,6 +4,10 @@ export declare const ENTITYTYPE_ROLE = "ROL";
|
|
|
4
4
|
export declare const ENTITYTYPE_ENTITYTABLE = "ETB";
|
|
5
5
|
export declare const ENTITYTYPE_ENTITYTABLECOLUMN = "ETC";
|
|
6
6
|
export declare const ENTITYTYPE_PREFERENCEMASTER = "PRM";
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
7
|
+
export declare const ENTITYTYPE_VIEWMASTER = "VMS";
|
|
8
|
+
export declare const ENTITYTYPE_MEDIA = "MDA";
|
|
9
|
+
export declare const STORAGETYPE_SINGLEJSON = "singlejson";
|
|
10
|
+
export declare const STORAGETYPE_COLUMN = "column";
|
|
9
11
|
export declare const secretKey: string;
|
|
12
|
+
export declare const STATUS_ACTIVE = "ACTIVE";
|
|
13
|
+
export declare const STATUS_INACTIVE = "INACTIVE";
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.secretKey = exports.
|
|
3
|
+
exports.STATUS_INACTIVE = exports.STATUS_ACTIVE = exports.secretKey = exports.STORAGETYPE_COLUMN = exports.STORAGETYPE_SINGLEJSON = exports.ENTITYTYPE_MEDIA = exports.ENTITYTYPE_VIEWMASTER = exports.ENTITYTYPE_PREFERENCEMASTER = exports.ENTITYTYPE_ENTITYTABLECOLUMN = exports.ENTITYTYPE_ENTITYTABLE = exports.ENTITYTYPE_ROLE = exports.ENTITYTYPE_ENTITYMASTER = exports.ENTITYTYPE_USER = void 0;
|
|
4
4
|
exports.ENTITYTYPE_USER = 'USR';
|
|
5
5
|
exports.ENTITYTYPE_ENTITYMASTER = 'EMS';
|
|
6
6
|
exports.ENTITYTYPE_ROLE = 'ROL';
|
|
7
7
|
exports.ENTITYTYPE_ENTITYTABLE = 'ETB';
|
|
8
8
|
exports.ENTITYTYPE_ENTITYTABLECOLUMN = 'ETC';
|
|
9
9
|
exports.ENTITYTYPE_PREFERENCEMASTER = 'PRM';
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
10
|
+
exports.ENTITYTYPE_VIEWMASTER = 'VMS';
|
|
11
|
+
exports.ENTITYTYPE_MEDIA = 'MDA';
|
|
12
|
+
exports.STORAGETYPE_SINGLEJSON = 'singlejson';
|
|
13
|
+
exports.STORAGETYPE_COLUMN = 'column';
|
|
12
14
|
exports.secretKey = process.env.secret_key || '';
|
|
15
|
+
exports.STATUS_ACTIVE = 'ACTIVE';
|
|
16
|
+
exports.STATUS_INACTIVE = 'INACTIVE';
|
|
13
17
|
//# sourceMappingURL=global.constant.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.constant.js","sourceRoot":"","sources":["../../src/constant/global.constant.ts"],"names":[],"mappings":";;;AACa,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,uBAAuB,GAAG,KAAK,CAAC;AAChC,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAC/B,QAAA,4BAA4B,GAAG,KAAK,CAAC;AACrC,QAAA,2BAA2B,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"global.constant.js","sourceRoot":"","sources":["../../src/constant/global.constant.ts"],"names":[],"mappings":";;;AACa,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,uBAAuB,GAAG,KAAK,CAAC;AAChC,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAC/B,QAAA,4BAA4B,GAAG,KAAK,CAAC;AACrC,QAAA,2BAA2B,GAAG,KAAK,CAAC;AACpC,QAAA,qBAAqB,GAAG,KAAK,CAAC;AAC9B,QAAA,gBAAgB,GAAG,KAAK,CAAC;AAEzB,QAAA,sBAAsB,GAAG,YAAY,CAAC;AACtC,QAAA,kBAAkB,GAAG,QAAQ,CAAC;AAG9B,QAAA,SAAS,GAAW,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC;AAGjD,QAAA,aAAa,GAAG,QAAQ,CAAC;AACzB,QAAA,eAAe,GAAG,UAAU,CAAC"}
|
package/dist/core.module.js
CHANGED
|
@@ -15,6 +15,8 @@ const utils_module_1 = require("./utils/utils.module");
|
|
|
15
15
|
const user_module_1 = require("./module/user/user.module");
|
|
16
16
|
const entity_module_1 = require("./module/meta/entity.module");
|
|
17
17
|
const module_module_1 = require("./module/module/module.module");
|
|
18
|
+
const notification_module_1 = require("./module/notification/notification.module");
|
|
19
|
+
const layout_module_1 = require("./module/layout/layout.module");
|
|
18
20
|
let CoreModule = CoreModule_1 = class CoreModule {
|
|
19
21
|
static forRootAsync(dbModule) {
|
|
20
22
|
if (!dbModule) {
|
|
@@ -30,6 +32,8 @@ let CoreModule = CoreModule_1 = class CoreModule {
|
|
|
30
32
|
utils_module_1.UtilsModule,
|
|
31
33
|
user_module_1.UserModule,
|
|
32
34
|
module_module_1.ModuleModule,
|
|
35
|
+
notification_module_1.NotificationModule,
|
|
36
|
+
layout_module_1.LayoutModule,
|
|
33
37
|
],
|
|
34
38
|
exports: [
|
|
35
39
|
config_1.ConfigModule,
|
|
@@ -39,6 +43,8 @@ let CoreModule = CoreModule_1 = class CoreModule {
|
|
|
39
43
|
utils_module_1.UtilsModule,
|
|
40
44
|
user_module_1.UserModule,
|
|
41
45
|
module_module_1.ModuleModule,
|
|
46
|
+
notification_module_1.NotificationModule,
|
|
47
|
+
layout_module_1.LayoutModule,
|
|
42
48
|
],
|
|
43
49
|
};
|
|
44
50
|
}
|
package/dist/core.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.module.js","sourceRoot":"","sources":["../src/core.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,2CAA8C;AAC9C,6EAAyE;AACzE,uDAAmD;AACnD,2DAAuD;AACvD,+DAA2D;AAC3D,iEAA6D;AAItD,IAAM,UAAU,kBAAhB,MAAM,UAAU;IACrB,MAAM,CAAC,YAAY,CAAC,QAAuB;QACzC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACvD,CAAC;QAED,OAAO;YACL,MAAM,EAAE,YAAU;YAClB,OAAO,EAAE;gBACP,qBAAY,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;gBACxC,QAAQ;gBACR,4BAAY;gBACZ,oCAAgB;gBAChB,0BAAW;gBACX,wBAAU;gBACV,4BAAY;aACb;YACD,OAAO,EAAE;gBACP,qBAAY;gBACZ,QAAQ;gBACR,4BAAY;gBACZ,oCAAgB;gBAChB,0BAAW;gBACX,wBAAU;gBACV,4BAAY;aACb;SACF,CAAC;IACJ,CAAC;CAEF,CAAA;
|
|
1
|
+
{"version":3,"file":"core.module.js","sourceRoot":"","sources":["../src/core.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,2CAA8C;AAC9C,6EAAyE;AACzE,uDAAmD;AACnD,2DAAuD;AACvD,+DAA2D;AAC3D,iEAA6D;AAC7D,mFAA+E;AAC/E,iEAA6D;AAItD,IAAM,UAAU,kBAAhB,MAAM,UAAU;IACrB,MAAM,CAAC,YAAY,CAAC,QAAuB;QACzC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACvD,CAAC;QAED,OAAO;YACL,MAAM,EAAE,YAAU;YAClB,OAAO,EAAE;gBACP,qBAAY,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;gBACxC,QAAQ;gBACR,4BAAY;gBACZ,oCAAgB;gBAChB,0BAAW;gBACX,wBAAU;gBACV,4BAAY;gBACZ,wCAAkB;gBAClB,4BAAY;aACb;YACD,OAAO,EAAE;gBACP,qBAAY;gBACZ,QAAQ;gBACR,4BAAY;gBACZ,oCAAgB;gBAChB,0BAAW;gBACX,wBAAU;gBACV,4BAAY;gBACZ,wCAAkB;gBAClB,4BAAY;aACb;SACF,CAAC;IACJ,CAAC;CAEF,CAAA;AAjCY,gCAAU;qBAAV,UAAU;IAFtB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,UAAU,CAiCtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.decorator.js","sourceRoot":"","sources":["../../src/decorators/roles.decorator.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"roles.decorator.js","sourceRoot":"","sources":["../../src/decorators/roles.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAA8D;AAEvD,MAAM,KAAK,GAAG,CAAC,UAAkB,EAAE,OAAe,EAAE,EAAE,CAC3D,IAAA,wBAAe,EACb,IAAA,oBAAW,EAAC,YAAY,EAAE,UAAU,CAAC,EACrC,IAAA,oBAAW,EAAC,SAAS,EAAE,OAAO,CAAC,CAChC,CAAC;AAJS,QAAA,KAAK,SAId"}
|
package/dist/main.js
CHANGED
|
@@ -23,6 +23,7 @@ async function bootstrap() {
|
|
|
23
23
|
exceptionFactory: (errors) => {
|
|
24
24
|
const firstError = errors[0];
|
|
25
25
|
return new common_1.BadRequestException({
|
|
26
|
+
success: false,
|
|
26
27
|
field: firstError.property,
|
|
27
28
|
message: firstError.constraints
|
|
28
29
|
? Object.values(firstError.constraints)[0]
|
|
@@ -30,7 +31,7 @@ async function bootstrap() {
|
|
|
30
31
|
});
|
|
31
32
|
},
|
|
32
33
|
}));
|
|
33
|
-
await app.listen(
|
|
34
|
+
await app.listen(3000);
|
|
34
35
|
}
|
|
35
36
|
bootstrap();
|
|
36
37
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,uCAA2C;AAC3C,2CAAqE;AACrE,+CAA2C;AAC3C,6CAAgD;AAChD,mCAAgC;AAGhC,IAAA,eAAM,GAAE,CAAC;AAET,KAAK,UAAU,SAAS;IAEtB,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAClC,wBAAU,CAAC,YAAY,CACrB,uBAAa,CAAC,YAAY,CAAC;QACzB,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;YACjB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,WAAW;YACxC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI;YACzC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,MAAM;YACvC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,MAAM;YACvC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,MAAM;YACvC,gBAAgB,EAAE,IAAI;YACtB,WAAW,EAAE,IAAI;SAClB,CAAC;KACH,CAAC,CACH,CACF,CAAC;IAEF,GAAG,CAAC,cAAc,CAChB,IAAI,uBAAc,CAAC;QACjB,gBAAgB,EAAE,CAAC,MAAM,EAAE,EAAE;YAC3B,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAE7B,OAAO,IAAI,4BAAmB,CAAC;gBAC7B,KAAK,EAAE,UAAU,CAAC,QAAQ;gBAC1B,OAAO,EAAE,UAAU,CAAC,WAAW;oBAC7B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;oBAC1C,CAAC,CAAC,eAAe;aACpB,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CACH,CAAC;IAEF,MAAM,GAAG,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,uCAA2C;AAC3C,2CAAqE;AACrE,+CAA2C;AAC3C,6CAAgD;AAChD,mCAAgC;AAGhC,IAAA,eAAM,GAAE,CAAC;AAET,KAAK,UAAU,SAAS;IAEtB,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAClC,wBAAU,CAAC,YAAY,CACrB,uBAAa,CAAC,YAAY,CAAC;QACzB,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;YACjB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,WAAW;YACxC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI;YACzC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,MAAM;YACvC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,MAAM;YACvC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,MAAM;YACvC,gBAAgB,EAAE,IAAI;YACtB,WAAW,EAAE,IAAI;SAClB,CAAC;KACH,CAAC,CACH,CACF,CAAC;IAEF,GAAG,CAAC,cAAc,CAChB,IAAI,uBAAc,CAAC;QACjB,gBAAgB,EAAE,CAAC,MAAM,EAAE,EAAE;YAC3B,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAE7B,OAAO,IAAI,4BAAmB,CAAC;gBAC7B,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,UAAU,CAAC,QAAQ;gBAC1B,OAAO,EAAE,UAAU,CAAC,WAAW;oBAC7B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;oBAC1C,CAAC,CAAC,eAAe;aACpB,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CACH,CAAC;IAEF,MAAM,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,SAAS,EAAE,CAAC"}
|
|
@@ -30,7 +30,7 @@ exports.AuthModule = AuthModule = __decorate([
|
|
|
30
30
|
imports: [config_1.ConfigModule],
|
|
31
31
|
inject: [config_1.ConfigService],
|
|
32
32
|
useFactory: async (configService) => ({
|
|
33
|
-
secret: configService.get('
|
|
33
|
+
secret: configService.get('SECRET_KEY'),
|
|
34
34
|
signOptions: { expiresIn: '1800s' },
|
|
35
35
|
}),
|
|
36
36
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../src/module/auth/auth.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA6D;AAC7D,qCAAwC;AACxC,6CAAgD;AAChD,4DAAwD;AACxD,wDAAwD;AACxD,kDAAkD;
|
|
1
|
+
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../src/module/auth/auth.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA6D;AAC7D,qCAAwC;AACxC,6CAAgD;AAChD,4DAAwD;AACxD,wDAAwD;AACxD,kDAAkD;AAElD,+CAAkD;AAClD,4EAAiE;AACjE,kEAA8D;AAC9D,oDAAiD;AAyB1C,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IAvBtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,qBAAY;YACZ,yBAAc,CAAC,QAAQ,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;YACnD,eAAS,CAAC,aAAa,CAAC;gBACtB,OAAO,EAAE,CAAC,qBAAY,CAAC;gBACvB,MAAM,EAAE,CAAC,sBAAa,CAAC;gBACvB,UAAU,EAAE,KAAK,EAAE,aAA4B,EAAE,EAAE,CAAC,CAAC;oBACnD,MAAM,EAAG,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,WAAW,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE;iBACpC,CAAC;aACH,CAAC;YACF,uBAAa,CAAC,UAAU,CAAC,CAAC,iCAAW,CAAC,CAAC;SACxC;QACD,SAAS,EAAE;YACT,4BAAc;YACd,0BAAW;YACX,wBAAY;YACZ,gCAAc;YACd,uBAAU;SACX;QACD,OAAO,EAAE,CAAC,4BAAc,EAAE,wBAAY,EAAE,uBAAU,CAAC;KACpD,CAAC;GACW,UAAU,CAAG"}
|
|
@@ -34,9 +34,9 @@ let RolesGuard = class RolesGuard {
|
|
|
34
34
|
}
|
|
35
35
|
const requiredModule = this.reflector.get('moduleCode', context.getHandler());
|
|
36
36
|
const requiredActions = this.reflector.get('actions', context.getHandler());
|
|
37
|
-
const roleAccess = await this.entityManager.query(`SELECT *
|
|
38
|
-
FROM cr_module_access
|
|
39
|
-
WHERE role_id = ${user['role_id']}
|
|
37
|
+
const roleAccess = await this.entityManager.query(`SELECT *
|
|
38
|
+
FROM cr_module_access
|
|
39
|
+
WHERE role_id = ${user['role_id']}
|
|
40
40
|
AND module_code = '${requiredModule}'`);
|
|
41
41
|
if (!roleAccess || roleAccess.length === 0) {
|
|
42
42
|
throw new common_1.ForbiddenException('Access denied: No permissions found for this module');
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
1
2
|
import { VerifyCallback } from 'passport-google-oauth20';
|
|
2
3
|
declare const GoogleStrategy_base: new (...args: any) => any;
|
|
3
4
|
export declare class GoogleStrategy extends GoogleStrategy_base {
|
|
4
|
-
|
|
5
|
+
private configService;
|
|
6
|
+
constructor(configService: ConfigService);
|
|
5
7
|
validate(accessToken: string, refreshToken: string, profile: any, done: VerifyCallback): Promise<any>;
|
|
6
8
|
}
|
|
7
9
|
export {};
|
|
@@ -11,16 +11,18 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.GoogleStrategy = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
|
+
const config_1 = require("@nestjs/config");
|
|
14
15
|
const passport_1 = require("@nestjs/passport");
|
|
15
16
|
const passport_google_oauth20_1 = require("passport-google-oauth20");
|
|
16
17
|
let GoogleStrategy = class GoogleStrategy extends (0, passport_1.PassportStrategy)(passport_google_oauth20_1.Strategy, 'google') {
|
|
17
|
-
constructor() {
|
|
18
|
+
constructor(configService) {
|
|
18
19
|
super({
|
|
19
|
-
clientID:
|
|
20
|
-
clientSecret:
|
|
21
|
-
callbackURL:
|
|
20
|
+
clientID: configService.get('CLIENT_ID'),
|
|
21
|
+
clientSecret: configService.get('CLIENT_SECRET'),
|
|
22
|
+
callbackURL: configService.get('CALLBACK_URL'),
|
|
22
23
|
scope: ['email', 'profile'],
|
|
23
24
|
});
|
|
25
|
+
this.configService = configService;
|
|
24
26
|
}
|
|
25
27
|
async validate(accessToken, refreshToken, profile, done) {
|
|
26
28
|
const { emails, name } = profile;
|
|
@@ -31,6 +33,6 @@ let GoogleStrategy = class GoogleStrategy extends (0, passport_1.PassportStrateg
|
|
|
31
33
|
exports.GoogleStrategy = GoogleStrategy;
|
|
32
34
|
exports.GoogleStrategy = GoogleStrategy = __decorate([
|
|
33
35
|
(0, common_1.Injectable)(),
|
|
34
|
-
__metadata("design:paramtypes", [])
|
|
36
|
+
__metadata("design:paramtypes", [config_1.ConfigService])
|
|
35
37
|
], GoogleStrategy);
|
|
36
38
|
//# sourceMappingURL=google.strategy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google.strategy.js","sourceRoot":"","sources":["../../../../src/module/auth/strategies/google.strategy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAAoD;AACpD,qEAAmE;AAG5D,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,IAAA,2BAAgB,EAAC,kCAAQ,EAAE,QAAQ,CAAC;IACtE;
|
|
1
|
+
{"version":3,"file":"google.strategy.js","sourceRoot":"","sources":["../../../../src/module/auth/strategies/google.strategy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAA+C;AAC/C,+CAAoD;AACpD,qEAAmE;AAG5D,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,IAAA,2BAAgB,EAAC,kCAAQ,EAAE,QAAQ,CAAC;IACtE,YACU,aAA4B;QAEpC,KAAK,CAAC;YACJ,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC;YACxC,YAAY,EAAE,aAAa,CAAC,GAAG,CAAC,eAAe,CAAC;YAChD,WAAW,EAAC,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC;YAC7C,KAAK,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;SAC5B,CAAC,CAAC;QAPK,kBAAa,GAAb,aAAa,CAAe;IAQtC,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,WAAmB,EACnB,YAAoB,EACpB,OAAY,EACZ,IAAoB;QAGpB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;QACjC,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC;QAGjC,OAAO,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACrC,CAAC;CACF,CAAA;AAzBY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAGc,sBAAa;GAF3B,cAAc,CAyB1B"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { UserSession } from '../../../module/user/entity/user-session.entity';
|
|
1
|
+
import { UserSession } from 'src/module/user/entity/user-session.entity';
|
|
3
2
|
import { Repository } from 'typeorm';
|
|
3
|
+
import { ConfigService } from '@nestjs/config';
|
|
4
4
|
declare const JwtStrategy_base: new (...args: any) => any;
|
|
5
5
|
export declare class JwtStrategy extends JwtStrategy_base {
|
|
6
|
-
private readonly configService;
|
|
7
6
|
private userSessionRepository;
|
|
8
|
-
|
|
7
|
+
private configService;
|
|
8
|
+
constructor(userSessionRepository: Repository<UserSession>, configService: ConfigService);
|
|
9
9
|
validate(payload: any): Promise<{
|
|
10
10
|
userId: any;
|
|
11
11
|
sessionToken: any;
|
|
@@ -17,19 +17,18 @@ const passport_jwt_1 = require("passport-jwt");
|
|
|
17
17
|
const passport_1 = require("@nestjs/passport");
|
|
18
18
|
const common_1 = require("@nestjs/common");
|
|
19
19
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
20
|
-
const
|
|
21
|
-
const user_session_entity_1 = require("../../../module/user/entity/user-session.entity");
|
|
20
|
+
const user_session_entity_1 = require("../../user/entity/user-session.entity");
|
|
22
21
|
const typeorm_2 = require("typeorm");
|
|
22
|
+
const config_1 = require("@nestjs/config");
|
|
23
23
|
let JwtStrategy = class JwtStrategy extends (0, passport_1.PassportStrategy)(passport_jwt_1.Strategy) {
|
|
24
|
-
constructor(
|
|
24
|
+
constructor(userSessionRepository, configService) {
|
|
25
25
|
super({
|
|
26
26
|
jwtFromRequest: passport_jwt_1.ExtractJwt.fromAuthHeaderAsBearerToken(),
|
|
27
27
|
ignoreExpiration: false,
|
|
28
|
-
secretOrKey: configService.get('
|
|
28
|
+
secretOrKey: configService.get('SECRET_KEY'),
|
|
29
29
|
});
|
|
30
|
-
this.configService = configService;
|
|
31
30
|
this.userSessionRepository = userSessionRepository;
|
|
32
|
-
|
|
31
|
+
this.configService = configService;
|
|
33
32
|
}
|
|
34
33
|
async validate(payload) {
|
|
35
34
|
const { userId, sessionToken } = payload;
|
|
@@ -47,8 +46,8 @@ let JwtStrategy = class JwtStrategy extends (0, passport_1.PassportStrategy)(pas
|
|
|
47
46
|
exports.JwtStrategy = JwtStrategy;
|
|
48
47
|
exports.JwtStrategy = JwtStrategy = __decorate([
|
|
49
48
|
(0, common_1.Injectable)(),
|
|
50
|
-
__param(
|
|
51
|
-
__metadata("design:paramtypes", [
|
|
52
|
-
|
|
49
|
+
__param(0, (0, typeorm_1.InjectRepository)(user_session_entity_1.UserSession)),
|
|
50
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
51
|
+
config_1.ConfigService])
|
|
53
52
|
], JwtStrategy);
|
|
54
53
|
//# sourceMappingURL=jwt.strategy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt.strategy.js","sourceRoot":"","sources":["../../../../src/module/auth/strategies/jwt.strategy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAoD;AACpD,+CAAoD;AACpD,2CAAmE;
|
|
1
|
+
{"version":3,"file":"jwt.strategy.js","sourceRoot":"","sources":["../../../../src/module/auth/strategies/jwt.strategy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAoD;AACpD,+CAAoD;AACpD,2CAAmE;AAEnE,6CAAmD;AACnD,+EAAyE;AACzE,qCAAqC;AACrC,2CAA+C;AAGxC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,IAAA,2BAAgB,EAAC,uBAAQ,CAAC;IACzD,YAEU,qBAA8C,EAC9C,aAA4B;QAEpC,KAAK,CAAC;YACJ,cAAc,EAAE,yBAAU,CAAC,2BAA2B,EAAE;YACxD,gBAAgB,EAAE,KAAK;YACvB,WAAW,EAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC;SAC5C,CAAC,CAAC;QAPK,0BAAqB,GAArB,qBAAqB,CAAyB;QAC9C,kBAAa,GAAb,aAAa,CAAe;IAOtC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAAO;QACpB,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;QAGzC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC;YAC3D,KAAK,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE;SACrC,CAAC,CAAC;QAEH,IACE,CAAC,WAAW;YACZ,WAAW,CAAC,oBAAoB;YAChC,IAAI,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,IAAI,IAAI,EAAE,EAC9C,CAAC;YACD,MAAM,IAAI,8BAAqB,CAAC,4BAA4B,CAAC,CAAC;QAChE,CAAC;QAED,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;IAClC,CAAC;CACF,CAAA;AA/BY,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,iCAAW,CAAC,CAAA;qCACC,oBAAU;QAClB,sBAAa;GAJ3B,WAAW,CA+BvB"}
|
|
@@ -18,7 +18,7 @@ exports.EnterpriseModule = EnterpriseModule = __decorate([
|
|
|
18
18
|
(0, common_1.Module)({
|
|
19
19
|
imports: [typeorm_1.TypeOrmModule.forFeature([organization_entity_1.OrganizationData])],
|
|
20
20
|
providers: [organization_service_1.OrganizationService],
|
|
21
|
-
exports: [organization_service_1.OrganizationService]
|
|
21
|
+
exports: [organization_service_1.OrganizationService],
|
|
22
22
|
})
|
|
23
23
|
], EnterpriseModule);
|
|
24
24
|
//# sourceMappingURL=enterprise.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enterprise.module.js","sourceRoot":"","sources":["../../../src/module/enterprise/enterprise.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;
|
|
1
|
+
{"version":3,"file":"enterprise.module.js","sourceRoot":"","sources":["../../../src/module/enterprise/enterprise.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,yEAAqE;AACrE,sEAAgE;AAOzD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAL5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,sCAAgB,CAAC,CAAC,CAAC;QACvD,SAAS,EAAE,CAAC,0CAAmB,CAAC;QAChC,OAAO,EAAE,CAAC,0CAAmB,CAAC;KAC/B,CAAC;GACW,gBAAgB,CAAG"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { Repository } from 'typeorm';
|
|
1
|
+
import { EntityManager, Repository } from 'typeorm';
|
|
2
2
|
import { OrganizationData } from '../entity/organization.entity';
|
|
3
|
+
import { ClockIDGenService } from 'src/utils/service/clockIDGenUtil.service';
|
|
3
4
|
export declare class OrganizationService {
|
|
4
5
|
private readonly organizationRepository;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
private readonly idGen;
|
|
7
|
+
constructor(organizationRepository: Repository<OrganizationData>, idGen: ClockIDGenService);
|
|
8
|
+
create(organizationDto: Partial<OrganizationData>, manager?: EntityManager): Promise<OrganizationData>;
|
|
9
|
+
findAll(manager?: EntityManager): Promise<OrganizationData[]>;
|
|
10
|
+
findOne(id: number, manager?: EntityManager): Promise<OrganizationData | null>;
|
|
11
|
+
update(id: number, organizationDto: Partial<OrganizationData>, manager?: EntityManager): Promise<OrganizationData | null>;
|
|
12
|
+
remove(id: number, manager?: EntityManager): Promise<void>;
|
|
11
13
|
}
|
|
@@ -17,32 +17,53 @@ const common_1 = require("@nestjs/common");
|
|
|
17
17
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
18
|
const typeorm_2 = require("typeorm");
|
|
19
19
|
const organization_entity_1 = require("../entity/organization.entity");
|
|
20
|
+
const clockIDGenUtil_service_1 = require("../../../utils/service/clockIDGenUtil.service");
|
|
20
21
|
let OrganizationService = class OrganizationService {
|
|
21
|
-
constructor(organizationRepository) {
|
|
22
|
+
constructor(organizationRepository, idGen) {
|
|
22
23
|
this.organizationRepository = organizationRepository;
|
|
24
|
+
this.idGen = idGen;
|
|
23
25
|
}
|
|
24
|
-
async create(organizationDto) {
|
|
25
|
-
const
|
|
26
|
-
|
|
26
|
+
async create(organizationDto, manager) {
|
|
27
|
+
const repo = manager
|
|
28
|
+
? manager.getRepository(organization_entity_1.OrganizationData)
|
|
29
|
+
: this.organizationRepository;
|
|
30
|
+
organizationDto.code = this.idGen.idGenerator('ORG');
|
|
31
|
+
organizationDto.status = 'ACTIVE';
|
|
32
|
+
organizationDto.created_date = new Date();
|
|
33
|
+
const organization = repo.create(organizationDto);
|
|
34
|
+
return await repo.save(organization);
|
|
27
35
|
}
|
|
28
|
-
async findAll() {
|
|
29
|
-
|
|
36
|
+
async findAll(manager) {
|
|
37
|
+
const repo = manager
|
|
38
|
+
? manager.getRepository(organization_entity_1.OrganizationData)
|
|
39
|
+
: this.organizationRepository;
|
|
40
|
+
return await repo.find();
|
|
30
41
|
}
|
|
31
|
-
async findOne(id) {
|
|
32
|
-
|
|
42
|
+
async findOne(id, manager) {
|
|
43
|
+
const repo = manager
|
|
44
|
+
? manager.getRepository(organization_entity_1.OrganizationData)
|
|
45
|
+
: this.organizationRepository;
|
|
46
|
+
return await repo.findOne({ where: { id } });
|
|
33
47
|
}
|
|
34
|
-
async update(id, organizationDto) {
|
|
35
|
-
|
|
36
|
-
|
|
48
|
+
async update(id, organizationDto, manager) {
|
|
49
|
+
const repo = manager
|
|
50
|
+
? manager.getRepository(organization_entity_1.OrganizationData)
|
|
51
|
+
: this.organizationRepository;
|
|
52
|
+
await repo.update(id, organizationDto);
|
|
53
|
+
return await repo.findOne({ where: { id } });
|
|
37
54
|
}
|
|
38
|
-
async remove(id) {
|
|
39
|
-
|
|
55
|
+
async remove(id, manager) {
|
|
56
|
+
const repo = manager
|
|
57
|
+
? manager.getRepository(organization_entity_1.OrganizationData)
|
|
58
|
+
: this.organizationRepository;
|
|
59
|
+
await repo.delete(id);
|
|
40
60
|
}
|
|
41
61
|
};
|
|
42
62
|
exports.OrganizationService = OrganizationService;
|
|
43
63
|
exports.OrganizationService = OrganizationService = __decorate([
|
|
44
64
|
(0, common_1.Injectable)(),
|
|
45
65
|
__param(0, (0, typeorm_1.InjectRepository)(organization_entity_1.OrganizationData)),
|
|
46
|
-
__metadata("design:paramtypes", [typeorm_2.Repository
|
|
66
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
67
|
+
clockIDGenUtil_service_1.ClockIDGenService])
|
|
47
68
|
], OrganizationService);
|
|
48
69
|
//# sourceMappingURL=organization.service.js.map
|