rez_core 6.5.66 → 6.5.68

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.
Files changed (238) hide show
  1. package/.claude/settings.local.json +26 -0
  2. package/.idea/250218_nodejs_core.iml +9 -0
  3. package/.idea/codeStyles/Project.xml +59 -0
  4. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  5. package/.idea/copilot.data.migration.agent.xml +6 -0
  6. package/.idea/copilot.data.migration.ask.xml +6 -0
  7. package/.idea/copilot.data.migration.ask2agent.xml +6 -0
  8. package/.idea/copilot.data.migration.edit.xml +6 -0
  9. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  10. package/.idea/misc.xml +6 -0
  11. package/.idea/modules.xml +8 -0
  12. package/.idea/prettier.xml +6 -0
  13. package/.idea/vcs.xml +6 -0
  14. package/dist/module/dashboard/controller/dashboard.controller.d.ts +5 -6
  15. package/dist/module/dashboard/entity/dashboard_page_data.entity.d.ts +0 -1
  16. package/dist/module/dashboard/entity/dashboard_page_data.entity.js +1 -6
  17. package/dist/module/dashboard/entity/dashboard_page_data.entity.js.map +1 -1
  18. package/dist/module/dashboard/entity/widget_master.entity.d.ts +0 -1
  19. package/dist/module/dashboard/entity/widget_master.entity.js +1 -6
  20. package/dist/module/dashboard/entity/widget_master.entity.js.map +1 -1
  21. package/dist/module/dashboard/service/dashboard.service.d.ts +5 -6
  22. package/dist/module/entity_json/service/entity_json.service.js +1 -11
  23. package/dist/module/entity_json/service/entity_json.service.js.map +1 -1
  24. package/dist/module/filter/entity/saved-filter-detail.entity.d.ts +0 -1
  25. package/dist/module/filter/entity/saved-filter-detail.entity.js +1 -7
  26. package/dist/module/filter/entity/saved-filter-detail.entity.js.map +1 -1
  27. package/dist/module/filter/entity/saved-filter-master.entity.d.ts +0 -1
  28. package/dist/module/filter/entity/saved-filter-master.entity.js +1 -7
  29. package/dist/module/filter/entity/saved-filter-master.entity.js.map +1 -1
  30. package/dist/module/filter/repository/saved-filter.repository.js +2 -2
  31. package/dist/module/filter/repository/saved-filter.repository.js.map +1 -1
  32. package/dist/module/filter/service/filter.service.js +1 -1
  33. package/dist/module/filter/service/filter.service.js.map +1 -1
  34. package/dist/module/filter/service/saved-filter.service.js +0 -1
  35. package/dist/module/filter/service/saved-filter.service.js.map +1 -1
  36. package/dist/module/integration/service/integration.service.js +2 -4
  37. package/dist/module/integration/service/integration.service.js.map +1 -1
  38. package/dist/module/listmaster/entity/list-master-items.entity.d.ts +0 -2
  39. package/dist/module/listmaster/entity/list-master-items.entity.js +2 -12
  40. package/dist/module/listmaster/entity/list-master-items.entity.js.map +1 -1
  41. package/dist/module/listmaster/entity/list-master.entity.d.ts +0 -1
  42. package/dist/module/listmaster/entity/list-master.entity.js +1 -7
  43. package/dist/module/listmaster/entity/list-master.entity.js.map +1 -1
  44. package/dist/module/listmaster/service/list-master.service.js.map +1 -1
  45. package/dist/module/mapper/entity/field-lovs.entity.d.ts +0 -1
  46. package/dist/module/mapper/entity/field-lovs.entity.js +1 -6
  47. package/dist/module/mapper/entity/field-lovs.entity.js.map +1 -1
  48. package/dist/module/mapper/entity/field-mapper.entity.d.ts +0 -1
  49. package/dist/module/mapper/entity/field-mapper.entity.js +1 -6
  50. package/dist/module/mapper/entity/field-mapper.entity.js.map +1 -1
  51. package/dist/module/mapper/entity/mapper.entity.d.ts +0 -1
  52. package/dist/module/mapper/entity/mapper.entity.js +1 -6
  53. package/dist/module/mapper/entity/mapper.entity.js.map +1 -1
  54. package/dist/module/mapper/service/field-mapper.service.js +0 -1
  55. package/dist/module/mapper/service/field-mapper.service.js.map +1 -1
  56. package/dist/module/master/controller/master.controller.d.ts +1 -3
  57. package/dist/module/master/controller/master.controller.js +4 -6
  58. package/dist/module/master/controller/master.controller.js.map +1 -1
  59. package/dist/module/master/service/master.service.d.ts +1 -1
  60. package/dist/module/master/service/master.service.js +25 -44
  61. package/dist/module/master/service/master.service.js.map +1 -1
  62. package/dist/module/meta/entity/attribute-master.entity.d.ts +4 -14
  63. package/dist/module/meta/entity/attribute-master.entity.js +17 -82
  64. package/dist/module/meta/entity/attribute-master.entity.js.map +1 -1
  65. package/dist/module/meta/entity/base-entity.entity.d.ts +5 -7
  66. package/dist/module/meta/entity/base-entity.entity.js +21 -48
  67. package/dist/module/meta/entity/base-entity.entity.js.map +1 -1
  68. package/dist/module/meta/entity/entity-master.entity.d.ts +0 -1
  69. package/dist/module/meta/entity/entity-master.entity.js +1 -7
  70. package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
  71. package/dist/module/meta/entity/entity-relation-data.entity.d.ts +0 -1
  72. package/dist/module/meta/entity/entity-relation-data.entity.js +1 -7
  73. package/dist/module/meta/entity/entity-relation-data.entity.js.map +1 -1
  74. package/dist/module/meta/entity/entity-relation.entity.d.ts +0 -1
  75. package/dist/module/meta/entity/entity-relation.entity.js +1 -7
  76. package/dist/module/meta/entity/entity-relation.entity.js.map +1 -1
  77. package/dist/module/meta/entity/entity-table-column.entity.d.ts +0 -1
  78. package/dist/module/meta/entity/entity-table-column.entity.js +1 -7
  79. package/dist/module/meta/entity/entity-table-column.entity.js.map +1 -1
  80. package/dist/module/meta/entity/entity-table.entity.d.ts +0 -1
  81. package/dist/module/meta/entity/entity-table.entity.js +1 -7
  82. package/dist/module/meta/entity/entity-table.entity.js.map +1 -1
  83. package/dist/module/meta/entity/media-data.entity.d.ts +0 -1
  84. package/dist/module/meta/entity/media-data.entity.js +1 -7
  85. package/dist/module/meta/entity/media-data.entity.js.map +1 -1
  86. package/dist/module/meta/entity/preference.entity.d.ts +0 -1
  87. package/dist/module/meta/entity/preference.entity.js +1 -7
  88. package/dist/module/meta/entity/preference.entity.js.map +1 -1
  89. package/dist/module/meta/entity/view-master.entity.d.ts +0 -1
  90. package/dist/module/meta/entity/view-master.entity.js +1 -7
  91. package/dist/module/meta/entity/view-master.entity.js.map +1 -1
  92. package/dist/module/meta/repository/attribute-master.repository.d.ts +1 -1
  93. package/dist/module/meta/repository/attribute-master.repository.js +4 -5
  94. package/dist/module/meta/repository/attribute-master.repository.js.map +1 -1
  95. package/dist/module/meta/repository/entity-master.repository.js +1 -1
  96. package/dist/module/meta/repository/entity-master.repository.js.map +1 -1
  97. package/dist/module/meta/service/attribute-master.service.js +2 -2
  98. package/dist/module/meta/service/attribute-master.service.js.map +1 -1
  99. package/dist/module/meta/service/entity-dynamic.service.js +1 -1
  100. package/dist/module/meta/service/entity-dynamic.service.js.map +1 -1
  101. package/dist/module/meta/service/entity-service-impl.service.js +2 -2
  102. package/dist/module/meta/service/entity-service-impl.service.js.map +1 -1
  103. package/dist/module/meta/service/entity-validation.service.js +0 -30
  104. package/dist/module/meta/service/entity-validation.service.js.map +1 -1
  105. package/dist/module/meta/service/resolver.service.js +21 -21
  106. package/dist/module/meta/service/resolver.service.js.map +1 -1
  107. package/dist/module/workflow/controller/activity-log.controller.d.ts +4 -6
  108. package/dist/module/workflow/entity/action-category.entity.d.ts +0 -1
  109. package/dist/module/workflow/entity/action-category.entity.js +1 -7
  110. package/dist/module/workflow/entity/action-category.entity.js.map +1 -1
  111. package/dist/module/workflow/entity/action-data.entity.d.ts +0 -1
  112. package/dist/module/workflow/entity/action-data.entity.js +1 -6
  113. package/dist/module/workflow/entity/action-data.entity.js.map +1 -1
  114. package/dist/module/workflow/entity/action-resources-mapping.entity.d.ts +0 -1
  115. package/dist/module/workflow/entity/action-resources-mapping.entity.js +1 -7
  116. package/dist/module/workflow/entity/action-resources-mapping.entity.js.map +1 -1
  117. package/dist/module/workflow/entity/action-template-mapping.entity.d.ts +0 -1
  118. package/dist/module/workflow/entity/action-template-mapping.entity.js +1 -7
  119. package/dist/module/workflow/entity/action-template-mapping.entity.js.map +1 -1
  120. package/dist/module/workflow/entity/action.entity.d.ts +0 -1
  121. package/dist/module/workflow/entity/action.entity.js +1 -7
  122. package/dist/module/workflow/entity/action.entity.js.map +1 -1
  123. package/dist/module/workflow/entity/activity-log.entity.d.ts +0 -1
  124. package/dist/module/workflow/entity/activity-log.entity.js +1 -6
  125. package/dist/module/workflow/entity/activity-log.entity.js.map +1 -1
  126. package/dist/module/workflow/entity/comm-template.entity.d.ts +0 -1
  127. package/dist/module/workflow/entity/comm-template.entity.js +1 -7
  128. package/dist/module/workflow/entity/comm-template.entity.js.map +1 -1
  129. package/dist/module/workflow/entity/entity-modification.entity.d.ts +0 -1
  130. package/dist/module/workflow/entity/entity-modification.entity.js +1 -7
  131. package/dist/module/workflow/entity/entity-modification.entity.js.map +1 -1
  132. package/dist/module/workflow/entity/form.entity.d.ts +0 -1
  133. package/dist/module/workflow/entity/form.entity.js +1 -6
  134. package/dist/module/workflow/entity/form.entity.js.map +1 -1
  135. package/dist/module/workflow/entity/stage-action-mapping.entity.d.ts +0 -1
  136. package/dist/module/workflow/entity/stage-action-mapping.entity.js +1 -7
  137. package/dist/module/workflow/entity/stage-action-mapping.entity.js.map +1 -1
  138. package/dist/module/workflow/entity/stage-group.entity.d.ts +0 -1
  139. package/dist/module/workflow/entity/stage-group.entity.js +1 -7
  140. package/dist/module/workflow/entity/stage-group.entity.js.map +1 -1
  141. package/dist/module/workflow/entity/stage-movement-data.entity.d.ts +0 -1
  142. package/dist/module/workflow/entity/stage-movement-data.entity.js +1 -7
  143. package/dist/module/workflow/entity/stage-movement-data.entity.js.map +1 -1
  144. package/dist/module/workflow/entity/stage.entity.d.ts +0 -1
  145. package/dist/module/workflow/entity/stage.entity.js +1 -7
  146. package/dist/module/workflow/entity/stage.entity.js.map +1 -1
  147. package/dist/module/workflow/entity/task-data.entity.d.ts +0 -1
  148. package/dist/module/workflow/entity/task-data.entity.js +1 -6
  149. package/dist/module/workflow/entity/task-data.entity.js.map +1 -1
  150. package/dist/module/workflow/entity/workflow-data.entity.d.ts +0 -1
  151. package/dist/module/workflow/entity/workflow-data.entity.js +1 -10
  152. package/dist/module/workflow/entity/workflow-data.entity.js.map +1 -1
  153. package/dist/module/workflow/entity/workflow.entity.d.ts +0 -1
  154. package/dist/module/workflow/entity/workflow.entity.js +1 -7
  155. package/dist/module/workflow/entity/workflow.entity.js.map +1 -1
  156. package/dist/module/workflow/repository/activity-log.repository.d.ts +4 -6
  157. package/dist/module/workflow/repository/comm-template.repository.js +2 -2
  158. package/dist/module/workflow/repository/comm-template.repository.js.map +1 -1
  159. package/dist/module/workflow/repository/stage-group.repository.d.ts +5 -6
  160. package/dist/module/workflow/repository/stage.repository.d.ts +4 -6
  161. package/dist/module/workflow/repository/task.repository.js +0 -1
  162. package/dist/module/workflow/repository/task.repository.js.map +1 -1
  163. package/dist/module/workflow/repository/workflow.repository.js +1 -1
  164. package/dist/module/workflow/repository/workflow.repository.js.map +1 -1
  165. package/dist/module/workflow/service/action.service.js +8 -10
  166. package/dist/module/workflow/service/action.service.js.map +1 -1
  167. package/dist/module/workflow/service/activity-log.service.d.ts +4 -6
  168. package/dist/module/workflow-automation/service/schedule-handler.service.js +2 -3
  169. package/dist/module/workflow-automation/service/schedule-handler.service.js.map +1 -1
  170. package/dist/module/workflow-automation/service/workflow-automation.service.d.ts +4 -6
  171. package/dist/module/workflow-schedule/interfaces/schedule-job-data.interface.d.ts +1 -2
  172. package/dist/module/workflow-schedule/processors/schedule.processor.js +5 -9
  173. package/dist/module/workflow-schedule/processors/schedule.processor.js.map +1 -1
  174. package/dist/module/workflow-schedule/service/workflow-schedule.service.js +4 -11
  175. package/dist/module/workflow-schedule/service/workflow-schedule.service.js.map +1 -1
  176. package/dist/table.config.d.ts +1 -8
  177. package/dist/tsconfig.build.tsbuildinfo +1 -1
  178. package/package.json +1 -1
  179. package/server.log +850 -0
  180. package/src/module/dashboard/entity/dashboard_page_data.entity.ts +1 -5
  181. package/src/module/dashboard/entity/widget_master.entity.ts +2 -5
  182. package/src/module/entity_json/service/entity_json.service.ts +13 -9
  183. package/src/module/filter/entity/saved-filter-detail.entity.ts +0 -4
  184. package/src/module/filter/entity/saved-filter-master.entity.ts +0 -5
  185. package/src/module/filter/repository/saved-filter.repository.ts +2 -2
  186. package/src/module/filter/service/filter.service.ts +1 -1
  187. package/src/module/filter/service/saved-filter.service.ts +0 -1
  188. package/src/module/integration/service/integration.service.ts +2 -4
  189. package/src/module/listmaster/entity/list-master-items.entity.ts +2 -9
  190. package/src/module/listmaster/entity/list-master.entity.ts +1 -5
  191. package/src/module/listmaster/service/list-master.service.ts +1 -1
  192. package/src/module/mapper/entity/field-lovs.entity.ts +0 -4
  193. package/src/module/mapper/entity/field-mapper.entity.ts +0 -4
  194. package/src/module/mapper/entity/mapper.entity.ts +0 -4
  195. package/src/module/mapper/service/field-mapper.service.ts +0 -1
  196. package/src/module/master/controller/master.controller.ts +4 -7
  197. package/src/module/master/service/master.service.ts +23 -49
  198. package/src/module/meta/entity/attribute-master.entity.ts +17 -70
  199. package/src/module/meta/entity/base-entity.entity.ts +20 -46
  200. package/src/module/meta/entity/entity-master.entity.ts +1 -6
  201. package/src/module/meta/entity/entity-relation-data.entity.ts +0 -5
  202. package/src/module/meta/entity/entity-relation.entity.ts +0 -5
  203. package/src/module/meta/entity/entity-table-column.entity.ts +0 -5
  204. package/src/module/meta/entity/entity-table.entity.ts +0 -5
  205. package/src/module/meta/entity/media-data.entity.ts +0 -5
  206. package/src/module/meta/entity/preference.entity.ts +0 -5
  207. package/src/module/meta/entity/view-master.entity.ts +1 -6
  208. package/src/module/meta/repository/attribute-master.repository.ts +4 -5
  209. package/src/module/meta/repository/entity-master.repository.ts +1 -1
  210. package/src/module/meta/service/attribute-master.service.ts +2 -2
  211. package/src/module/meta/service/entity-dynamic.service.ts +1 -1
  212. package/src/module/meta/service/entity-service-impl.service.ts +2 -2
  213. package/src/module/meta/service/entity-validation.service.ts +41 -41
  214. package/src/module/meta/service/resolver.service.ts +21 -21
  215. package/src/module/workflow/entity/action-category.entity.ts +0 -5
  216. package/src/module/workflow/entity/action-data.entity.ts +1 -5
  217. package/src/module/workflow/entity/action-resources-mapping.entity.ts +0 -8
  218. package/src/module/workflow/entity/action-template-mapping.entity.ts +0 -5
  219. package/src/module/workflow/entity/action.entity.ts +0 -5
  220. package/src/module/workflow/entity/activity-log.entity.ts +0 -4
  221. package/src/module/workflow/entity/comm-template.entity.ts +0 -5
  222. package/src/module/workflow/entity/entity-modification.entity.ts +0 -5
  223. package/src/module/workflow/entity/form.entity.ts +0 -4
  224. package/src/module/workflow/entity/stage-action-mapping.entity.ts +0 -5
  225. package/src/module/workflow/entity/stage-group.entity.ts +0 -5
  226. package/src/module/workflow/entity/stage-movement-data.entity.ts +0 -5
  227. package/src/module/workflow/entity/stage.entity.ts +0 -5
  228. package/src/module/workflow/entity/task-data.entity.ts +0 -4
  229. package/src/module/workflow/entity/workflow-data.entity.ts +0 -5
  230. package/src/module/workflow/entity/workflow.entity.ts +0 -5
  231. package/src/module/workflow/repository/comm-template.repository.ts +2 -2
  232. package/src/module/workflow/repository/task.repository.ts +0 -1
  233. package/src/module/workflow/repository/workflow.repository.ts +1 -1
  234. package/src/module/workflow/service/action.service.ts +8 -10
  235. package/src/module/workflow-automation/service/schedule-handler.service.ts +2 -3
  236. package/src/module/workflow-schedule/interfaces/schedule-job-data.interface.ts +1 -2
  237. package/src/module/workflow-schedule/processors/schedule.processor.ts +5 -9
  238. package/src/module/workflow-schedule/service/workflow-schedule.service.ts +4 -11
@@ -1,75 +1,49 @@
1
- import { Column, PrimaryGeneratedColumn } from 'typeorm';
2
- import { Expose } from 'class-transformer';
1
+ import { Column, CreateDateColumn, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
3
2
 
4
3
  export class BaseEntity {
5
- constructor() {
6
- this.created_date = new Date();
7
- }
8
4
 
9
5
  @PrimaryGeneratedColumn({ type: 'bigint' })
10
- @Expose()
11
6
  id: number;
12
7
 
13
- @Column({ name: 'entity_type', type: 'varchar', length: 100, nullable: true })
14
- @Expose()
8
+ @Column({name: 'entity_type', type: 'varchar', length: 50, nullable: true})
15
9
  entity_type: string;
16
10
 
17
- @Column({ name: 'name', type: 'varchar', length: 100, nullable: true })
18
- @Expose()
19
- name: string;
20
-
21
- @Column({ name: 'status', type: 'varchar', nullable: true, length: 100 })
22
- @Expose()
23
- status: string;
11
+ @Column({ name: 'code', type: 'varchar', length: 100, nullable: true })
12
+ code: string;
24
13
 
25
- @Column({ name: 'parent_type', type: 'varchar', length: 100, nullable: true })
26
- @Expose()
27
- parent_type: string;
14
+ @Column({ name: 'name', type: 'varchar', length: 255, nullable: true })
15
+ name: string;
28
16
 
29
- @Column({ name: 'parent_id', type: 'bigint', nullable: true })
30
- @Expose()
31
- parent_id: number;
17
+ @Column({ length: 1000, type: 'varchar', nullable: true })
18
+ description: string;
32
19
 
33
- @Column({ name: 'code', type: 'varchar', length: 100, nullable: true })
34
- @Expose()
35
- code: string;
20
+ @Column({ name: 'status', type: 'varchar', nullable: true, length: 50 })
21
+ status: string;
36
22
 
37
23
  @Column({ name: 'created_by', type: 'bigint', nullable: true })
38
- @Expose()
39
24
  created_by: number;
40
25
 
41
- @Column({
42
- name: 'created_date',
43
- nullable: true,
44
- })
45
- @Expose()
26
+ @CreateDateColumn({nullable: true})
46
27
  created_date: Date;
47
28
 
48
29
  @Column({ name: 'modified_by', type: 'bigint', nullable: true })
49
- @Expose()
50
30
  modified_by: number;
51
31
 
52
- @Column({ name: 'modified_date', nullable: true })
53
- @Expose()
32
+ @UpdateDateColumn({nullable: true})
54
33
  modified_date: Date;
55
34
 
56
35
  @Column({ name: 'enterprise_id', type: 'int', nullable: true })
57
- @Expose()
58
36
  enterprise_id: number;
59
37
 
60
- @Column({ name: 'organization_id', type: 'int', nullable: true })
61
- @Expose()
62
- organization_id: number;
38
+ @Column({ name: 'level_type', type: 'varchar', length: 25, nullable: true })
39
+ level_type: string;
63
40
 
64
- @Column({ name: 'appcode', type: 'varchar', length: 100, nullable: true })
65
- @Expose()
66
- appcode: string;
41
+ @Column({ name: 'level_id', type: 'int', nullable: true })
42
+ level_id: number;
67
43
 
68
- @Column({ name: 'level_id', type: 'varchar', length: 100, nullable: true })
69
- @Expose()
70
- level_id: string;
44
+ @Column({ name: 'parent_type', type: 'varchar', length: 100, nullable: true })
45
+ parent_type: string;
71
46
 
72
- @Column({ name: 'level_type', type: 'varchar', length: 100, nullable: true })
73
- @Expose()
74
- level_type: string;
47
+ @Column({ name: 'parent_id', type: 'bigint', nullable: true })
48
+ parent_id: number;
75
49
  }
@@ -1,14 +1,9 @@
1
1
  import { BaseEntity } from './base-entity.entity';
2
- import { ENTITYTYPE_ENTITYMASTER } from '../../../constant/global.constant';
3
2
  import { Column, Entity, Index } from 'typeorm';
4
3
 
5
4
  @Entity({ name: 'frm_entity_master' })
6
- @Index('idx_entity_master_mapped_type_org', ['mapped_entity_type', 'organization_id'])
5
+ @Index('idx_entity_master_mapped_type_org', ['mapped_entity_type', 'enterprise_id'])
7
6
  export class EntityMaster extends BaseEntity {
8
- constructor() {
9
- super();
10
- this.entity_type = ENTITYTYPE_ENTITYMASTER;
11
- }
12
7
 
13
8
  @Column({
14
9
  name: 'mapped_entity_type',
@@ -1,13 +1,8 @@
1
- import { ENTITYTYPE_ENTITY_RELATION_DATA } from 'src/constant/global.constant';
2
1
  import { Column, Entity } from 'typeorm';
3
2
  import { BaseEntity } from './base-entity.entity';
4
3
 
5
4
  @Entity({ name: 'frm_entity_relation_data' })
6
5
  export class EntityRelationData extends BaseEntity {
7
- constructor() {
8
- super();
9
- this.entity_type = ENTITYTYPE_ENTITY_RELATION_DATA;
10
- }
11
6
 
12
7
  @Column({ nullable: true })
13
8
  source_entity_type: string;
@@ -1,13 +1,8 @@
1
- import { ENTITYTYPE_ENTITY_RELATION } from 'src/constant/global.constant';
2
1
  import { Column, Entity } from 'typeorm';
3
2
  import { BaseEntity } from './base-entity.entity';
4
3
 
5
4
  @Entity({ name: 'frm_entity_relation' })
6
5
  export class EntityRelation extends BaseEntity {
7
- constructor() {
8
- super();
9
- this.entity_type = ENTITYTYPE_ENTITY_RELATION;
10
- }
11
6
 
12
7
  @Column({ nullable: true })
13
8
  source_entity_type: string;
@@ -1,13 +1,8 @@
1
- import { ENTITYTYPE_ENTITYTABLECOLUMN } from '../../../constant/global.constant';
2
1
  import { Column, Entity } from 'typeorm';
3
2
  import { BaseEntity } from './base-entity.entity';
4
3
 
5
4
  @Entity({ name: 'frm_entity_table_column' })
6
5
  export class EntityTableColumn extends BaseEntity {
7
- constructor() {
8
- super();
9
- this.entity_type = ENTITYTYPE_ENTITYTABLECOLUMN;
10
- }
11
6
 
12
7
  @Column({ name: 'mapped_entity_type', nullable: true })
13
8
  mapped_entity_type: string;
@@ -1,13 +1,8 @@
1
1
  import { Column, Entity } from 'typeorm';
2
2
  import { BaseEntity } from './base-entity.entity';
3
- import { ENTITYTYPE_ENTITYTABLE } from '../../../constant/global.constant';
4
3
 
5
4
  @Entity({ name: 'frm_entity_table' })
6
5
  export class EntityTable extends BaseEntity {
7
- constructor() {
8
- super();
9
- this.entity_type = ENTITYTYPE_ENTITYTABLE;
10
- }
11
6
 
12
7
  @Column({ name: 'mapped_entity_type', nullable: true })
13
8
  mapped_entity_type: string;
@@ -1,13 +1,8 @@
1
1
  import { Column, Entity } from 'typeorm';
2
2
  import { BaseEntity } from './base-entity.entity';
3
- import { ENTITYTYPE_MEDIA } from '../../../constant/global.constant';
4
3
 
5
4
  @Entity({ name: 'frm_media_data' })
6
5
  export class MediaData extends BaseEntity {
7
- constructor() {
8
- super();
9
- this.entity_type = ENTITYTYPE_MEDIA;
10
- }
11
6
 
12
7
  @Column({ type: 'varchar', length: 100, nullable: true })
13
8
  file_name: string;
@@ -1,13 +1,8 @@
1
1
  import { BaseEntity } from './base-entity.entity';
2
2
  import { Column, Entity } from 'typeorm';
3
- import { ENTITYTYPE_PREFERENCEMASTER } from '../../../constant/global.constant';
4
3
 
5
4
  @Entity({ name: 'frm_preference_master' })
6
5
  export class PreferenceMaster extends BaseEntity {
7
- constructor() {
8
- super();
9
- this.entity_type = ENTITYTYPE_PREFERENCEMASTER;
10
- }
11
6
 
12
7
  @Column({
13
8
  name: 'display_name',
@@ -1,13 +1,8 @@
1
1
  import { BaseEntity } from './base-entity.entity';
2
2
  import { Column, Entity } from 'typeorm';
3
- import { ENTITYTYPE_VIEWMASTER } from '../../../constant/global.constant';
4
3
 
5
4
  @Entity({ name: 'frm_entity_view' })
6
5
  export class ViewMaster extends BaseEntity {
7
- constructor() {
8
- super();
9
- this.entity_type = ENTITYTYPE_VIEWMASTER;
10
- }
11
6
 
12
7
  @Column({ length: 50, nullable: true })
13
8
  mapped_entity_type: string;
@@ -36,6 +31,6 @@ export class ViewMaster extends BaseEntity {
36
31
  @Column({ nullable: true })
37
32
  type: string;
38
33
 
39
- @Column({ type: 'int' , nullable: true})
34
+ @Column({ type: 'int', nullable: true })
40
35
  is_default: number;
41
36
  }
@@ -24,14 +24,13 @@ export class AttributeMasterRepository {
24
24
  mappedEntityId: number,
25
25
  mappedEntityType: string,
26
26
  attributeKey: string,
27
- organizationId: number,
27
+ enterpriseId: number,
28
28
  ): Promise<AttributeMaster | null> {
29
29
  return await this.attributeMasterRepository.findOne({
30
30
  where: {
31
- mapped_entity_id: mappedEntityId,
32
31
  mapped_entity_type: mappedEntityType,
33
32
  attribute_key: attributeKey,
34
- organization_id: organizationId,
33
+ enterprise_id: enterpriseId,
35
34
  },
36
35
  });
37
36
  }
@@ -78,8 +77,8 @@ export class AttributeMasterRepository {
78
77
  return {
79
78
  'label': attribute.name,
80
79
  'value': attribute.attribute_key,
81
- 'data_type': attribute.data_type,
82
- 'data_source_list': attribute.datasource_list,
80
+ 'element_type': attribute.element_type,
81
+ 'ds_category': attribute.ds_category,
83
82
  };
84
83
  });
85
84
 
@@ -93,7 +93,7 @@ export class EntityMasterRepository {
93
93
  const attributes = await this.attributeMasterRepository.find({
94
94
  where: {
95
95
  mapped_entity_type: entity_type,
96
- data_type: 'DATE',
96
+ element_type: 'date',
97
97
  enterprise_id,
98
98
  },
99
99
  });
@@ -26,7 +26,7 @@ export class AttributeMasterService {
26
26
  ): Promise<AttributeMaster> {
27
27
  attributeData.enterprise_id = loggedInUser.enterprise_id;
28
28
  attributeData.level_type = loggedInUser.level_type;
29
- attributeData.level_id = loggedInUser.level_id;
29
+ attributeData.level_id = Number(loggedInUser.level_id);
30
30
 
31
31
  // 1️⃣ Save attribute in master table
32
32
  const createdAttr =
@@ -87,7 +87,7 @@ export class AttributeMasterService {
87
87
  ): Promise<AttributeMaster | null> {
88
88
  attributeData.enterprise_id = loggedInUser.enterprise_id;
89
89
  attributeData.level_type = loggedInUser.level_type;
90
- attributeData.level_id = loggedInUser.level_id;
90
+ attributeData.level_id = Number(loggedInUser.level_id);
91
91
 
92
92
  return this.attributeMasterRepository.updateAttribute(attributeData, id);
93
93
  }
@@ -547,7 +547,7 @@ export class EntityDynamicService extends EntityServiceImpl{
547
547
  .map((attr) => `${attr.attribute_key}`)
548
548
  .join(', ');
549
549
  const selectQuery = `SELECT ${columns}
550
- FROM ${dataSource}
550
+ FROM ${this.schema}.${dataSource}
551
551
  WHERE id = $1`;
552
552
 
553
553
  const result = await this.entityManager.query(selectQuery, [id]);
@@ -103,7 +103,7 @@ export class EntityServiceImpl implements EntityService<BaseEntity> {
103
103
  entityData.enterprise_id = loggedInUser.enterprise_id;
104
104
  if (!entityData.level_type)
105
105
  entityData.level_type = loggedInUser.level_type;
106
- if (!entityData.level_id) entityData.level_id = loggedInUser.level_id;
106
+ if (!entityData.level_id) entityData.level_id = Number(loggedInUser.level_id);
107
107
  if (!entityData.status) entityData.status = statusList.id;
108
108
  }
109
109
 
@@ -291,7 +291,7 @@ export class EntityServiceImpl implements EntityService<BaseEntity> {
291
291
  );
292
292
  if (!repoService) {
293
293
  throw new Error(
294
- `Repository service not found for entityType: ${entityData.entity_type}`,
294
+ `Repository service not found`,
295
295
  );
296
296
  }
297
297
 
@@ -57,47 +57,47 @@ export class EntityValidationService {
57
57
  const errors: ValidationError[] = [];
58
58
  const currentId = entityData.id; // assuming 'id' is the primary key
59
59
 
60
- for (const attr of attributeData.filter((a) => a.is_unique)) {
61
- const value = entityData[attr.attribute_key];
62
-
63
- if (this.hasValidValue(value)) {
64
- let qb = this.entityManager
65
- .createQueryBuilder()
66
- .select('*')
67
- .from(`${this.schema}.${db_table_name}`, db_table_name)
68
- .where(`${db_table_name}.${attr.attribute_key} = :value`, { value });
69
-
70
- // Add AND condition for organization_id/level_type/level_id if present
71
- if (entityType !== 'ORG' && entityType !== 'ORGP') {
72
- const level_type = loggedInUser.level_type;
73
- const level_id = loggedInUser.level_id;
74
-
75
- if (level_type !== undefined && level_type !== null) {
76
- qb = qb.andWhere(
77
- `${db_table_name}.level_type = :level_type AND ${db_table_name}.level_id = :level_id`,
78
- {
79
- level_type,
80
- level_id,
81
- },
82
- );
83
- }
84
- }
85
-
86
- // Skip the current record when checking for uniqueness during update
87
- if (currentId) {
88
- qb = qb.andWhere(`${db_table_name}.id != :id`, { id: currentId });
89
- }
90
-
91
- const existing = await qb.limit(1).getRawOne();
92
-
93
- if (existing) {
94
- errors.push({
95
- field: attr.name,
96
- message: `Field ${attr.name} must be unique. Value ${value} already exists.`,
97
- });
98
- }
99
- }
100
- }
60
+ // for (const attr of attributeData.filter((a) => a.is_unique)) {
61
+ // const value = entityData[attr.attribute_key];
62
+ //
63
+ // if (this.hasValidValue(value)) {
64
+ // let qb = this.entityManager
65
+ // .createQueryBuilder()
66
+ // .select('*')
67
+ // .from(`${this.schema}.${db_table_name}`, db_table_name)
68
+ // .where(`${db_table_name}.${attr.attribute_key} = :value`, { value });
69
+ //
70
+ // // Add AND condition for organization_id/level_type/level_id if present
71
+ // if (entityType !== 'ORG' && entityType !== 'ORGP') {
72
+ // const level_type = loggedInUser.level_type;
73
+ // const level_id = loggedInUser.level_id;
74
+ //
75
+ // if (level_type !== undefined && level_type !== null) {
76
+ // qb = qb.andWhere(
77
+ // `${db_table_name}.level_type = :level_type AND ${db_table_name}.level_id = :level_id`,
78
+ // {
79
+ // level_type,
80
+ // level_id,
81
+ // },
82
+ // );
83
+ // }
84
+ // }
85
+ //
86
+ // // Skip the current record when checking for uniqueness during update
87
+ // if (currentId) {
88
+ // qb = qb.andWhere(`${db_table_name}.id != :id`, { id: currentId });
89
+ // }
90
+ //
91
+ // const existing = await qb.limit(1).getRawOne();
92
+ //
93
+ // if (existing) {
94
+ // errors.push({
95
+ // field: attr.name,
96
+ // message: `Field ${attr.name} must be unique. Value ${value} already exists.`,
97
+ // });
98
+ // }
99
+ // }
100
+ // }
101
101
 
102
102
  return errors;
103
103
  }
@@ -54,13 +54,13 @@ export class ResolverService {
54
54
 
55
55
  // -------- ENTITY or MASTER via getDropdownOptions --------
56
56
  if (
57
- attr.data_source_type === 'entity' ||
58
- (attr.data_source_type === 'master' && attr.category != 'Internal')
57
+ attr.ds_category === 'ENTITY' ||
58
+ (attr.ds_category === 'LIST_MASTER')
59
59
  ) {
60
60
  const type =
61
- attr.data_source_type === 'entity'
62
- ? attr.datasource_list
63
- : attr.datasource_list;
61
+ attr.ds_category === 'ENTITY'
62
+ ? attr.ds_entitytype
63
+ : attr.ds_entitytype;
64
64
  const params = {}; // you can pass any additional filters here
65
65
 
66
66
  if (Array.isArray(codeValue)) {
@@ -75,7 +75,7 @@ export class ResolverService {
75
75
  const item = options.find(
76
76
  (opt) => opt.value == code || opt.code == code,
77
77
  );
78
- resolvedValues.push(item?.[attr.data_source_attribute] ?? code);
78
+ resolvedValues.push(item?.[attr.name] ?? code);
79
79
  }
80
80
  resolvedEntityData[field] = resolvedValues;
81
81
  } else {
@@ -89,7 +89,7 @@ export class ResolverService {
89
89
  (opt) => opt.value == codeValue || opt.code == codeValue,
90
90
  );
91
91
  resolvedEntityData[field] = Array.isArray(item)
92
- ? (item?.[attr.data_source_attribute] ?? codeValue)
92
+ ? (item?.[attr.name] ?? codeValue)
93
93
  : (item?.label ?? codeValue);
94
94
  }
95
95
  }
@@ -145,8 +145,8 @@ export class ResolverService {
145
145
  if (!attr) return rawValue;
146
146
 
147
147
  // -------- ENTITY data_source_type --------
148
- if (attr.data_source_type === 'entity') {
149
- const entityDef = await this.entityMasterRepo.getEntityByMappedEntityType(attr.datasource_list, loggedInUser.enterprise_id);
148
+ if (attr.ds_category === 'ENTITY') {
149
+ const entityDef = await this.entityMasterRepo.getEntityByMappedEntityType(attr.ds_entitytype, loggedInUser.enterprise_id);
150
150
 
151
151
  if (!entityDef) return rawValue;
152
152
 
@@ -171,7 +171,7 @@ export class ResolverService {
171
171
  : [value];
172
172
 
173
173
  const [item] = await this.entityManger.query(query, params);
174
- resolvedValues.push(item?.[attr.data_source_attribute] ?? value);
174
+ resolvedValues.push(item?.[attr.name] ?? value);
175
175
  }
176
176
  return resolvedValues;
177
177
  } else {
@@ -183,12 +183,12 @@ export class ResolverService {
183
183
  const params = [rawValue];
184
184
 
185
185
  const [item] = await this.entityManger.query(query, params);
186
- return item?.[attr.data_source_attribute] ?? rawValue;
186
+ return item?.[attr.name] ?? rawValue;
187
187
  }
188
188
  }
189
189
 
190
190
  // -------- MASTER data_source_type --------
191
- else if (attr.data_source_type === 'master') {
191
+ else if (attr.ds_category === 'LIST_MASTER') {
192
192
  const repo = this.reflectionHelper.getRepoService('ListMasterItems');
193
193
  if (Array.isArray(rawValue)) {
194
194
  const resolvedValues: string[] = [];
@@ -198,7 +198,7 @@ export class ResolverService {
198
198
  id: code
199
199
  },
200
200
  });
201
- resolvedValues.push(item?.[attr.data_source_attribute] ?? code);
201
+ resolvedValues.push(item?.[attr.name] ?? code);
202
202
  }
203
203
  return resolvedValues;
204
204
  } else {
@@ -208,7 +208,7 @@ export class ResolverService {
208
208
  id: Number(rawValue)
209
209
  },
210
210
  });
211
- return item?.[attr.data_source_attribute] ?? rawValue;
211
+ return item?.[attr.name] ?? rawValue;
212
212
  }
213
213
  }
214
214
 
@@ -235,8 +235,8 @@ export class ResolverService {
235
235
  if (!attr) return displayValue;
236
236
 
237
237
  // -------- ENTITY data_source_type --------
238
- if (attr.data_source_type === 'entity') {
239
- const entityDef = await this.entityMasterRepo.getEntityByMappedEntityType(attr.datasource_list, loggedInUser.enterprise_id);
238
+ if (attr.ds_category === 'ENTITY') {
239
+ const entityDef = await this.entityMasterRepo.getEntityByMappedEntityType(attr.ds_entitytype, loggedInUser.enterprise_id);
240
240
 
241
241
  if (!entityDef) return displayValue;
242
242
 
@@ -246,10 +246,10 @@ export class ResolverService {
246
246
  tableName === 'sso_organization'
247
247
  ? `SELECT id
248
248
  FROM ${tableName}
249
- WHERE ${attr.data_source_attribute} = $1`
249
+ WHERE ${attr.name} = $1`
250
250
  : `SELECT id
251
251
  FROM ${tableName}
252
- WHERE ${attr.data_source_attribute} = $1
252
+ WHERE ${attr.name} = $1
253
253
  AND enterprise_id = $2`;
254
254
 
255
255
  const params =
@@ -262,14 +262,14 @@ export class ResolverService {
262
262
  }
263
263
 
264
264
  // -------- MASTER data_source_type --------
265
- else if (attr.data_source_type === 'master') {
265
+ else if (attr.ds_category === 'LIST_MASTER') {
266
266
  const listMasterItemsRepo = this.reflectionHelper.getRepoService('ListMasterItems');
267
267
 
268
268
  const item = await listMasterItemsRepo.findOne({
269
269
  where: {
270
- [attr.data_source_attribute]: displayValue,
270
+ [attr.name]: displayValue,
271
271
  enterprise_id: loggedInUser.enterprise_id,
272
- listtype: attr.datasource_list,
272
+ listtype: attr.ds_entitytype,
273
273
  },
274
274
  });
275
275
 
@@ -1,13 +1,8 @@
1
- import { ACTION_CATEGORY } from 'src/constant/global.constant';
2
1
  import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
3
2
  import { Column, Entity } from 'typeorm';
4
3
 
5
4
  @Entity({ name: 'frm_wf_action_category' })
6
5
  export class ActionCategory extends BaseEntity {
7
- constructor() {
8
- super();
9
- this.entity_type = ACTION_CATEGORY;
10
- }
11
6
 
12
7
  @Column({ type: 'varchar', nullable: true })
13
8
  logo: string;
@@ -3,10 +3,6 @@ import { Column, Entity } from 'typeorm';
3
3
 
4
4
  @Entity({ name: 'frm_wf_action_data' })
5
5
  export class ActionDataEntity extends BaseEntity {
6
- constructor() {
7
- super();
8
- this.entity_type = 'ACTION_DATA';
9
- }
10
6
 
11
7
  @Column({ nullable: true })
12
8
  action_id: number;
@@ -35,7 +31,7 @@ export class ActionDataEntity extends BaseEntity {
35
31
  @Column({ nullable: true })
36
32
  sequence: number;
37
33
 
38
- @Column({ default: 0 , nullable: true})
34
+ @Column({ default: 0, nullable: true })
39
35
  is_done: boolean;
40
36
 
41
37
  @Column({ type: 'varchar', nullable: true })
@@ -1,16 +1,8 @@
1
- import {
2
- ACTION_CATEGORY,
3
- ACTION_RESOURCES_MAPPING,
4
- } from 'src/constant/global.constant';
5
1
  import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
6
2
  import { Column, Entity } from 'typeorm';
7
3
 
8
4
  @Entity({ name: 'frm_wf_action_resources_mapping' })
9
5
  export class ActionResourcesMapping extends BaseEntity {
10
- constructor() {
11
- super();
12
- this.entity_type = ACTION_RESOURCES_MAPPING;
13
- }
14
6
 
15
7
  @Column({ type: 'varchar', nullable: true })
16
8
  template_code: string;
@@ -1,13 +1,8 @@
1
- import { ACTION_TEMPLATE_MAPPING } from 'src/constant/global.constant';
2
1
  import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
3
2
  import { Column, Entity } from 'typeorm';
4
3
 
5
4
  @Entity({ name: 'frm_wf_action_template_mapping' })
6
5
  export class ActionTemplateMapping extends BaseEntity {
7
- constructor() {
8
- super();
9
- this.entity_type = ACTION_TEMPLATE_MAPPING;
10
- }
11
6
 
12
7
  @Column({ type: 'int', nullable: true })
13
8
  stg_act_mapping_id: number;
@@ -1,13 +1,8 @@
1
- import { ACTION } from 'src/constant/global.constant';
2
1
  import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
3
2
  import { Column, Entity } from 'typeorm';
4
3
 
5
4
  @Entity({ name: 'frm_wf_action' })
6
5
  export class ActionEntity extends BaseEntity {
7
- constructor() {
8
- super();
9
- this.entity_type = ACTION;
10
- }
11
6
 
12
7
  @Column({ type: 'int', nullable: true })
13
8
  workflow_id: number;
@@ -3,10 +3,6 @@ import { Column, Entity } from 'typeorm';
3
3
 
4
4
  @Entity({ name: 'frm_activity_log' })
5
5
  export class ActivityLog extends BaseEntity {
6
- constructor() {
7
- super();
8
- this.entity_type = 'ACLG';
9
- }
10
6
 
11
7
  @Column({ type: 'varchar', nullable: true })
12
8
  mapped_entity_type: string;
@@ -1,13 +1,8 @@
1
- import { COMM_TEMPLATE } from 'src/constant/global.constant';
2
1
  import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
3
2
  import { Column, Entity } from 'typeorm';
4
3
 
5
4
  @Entity({ name: 'frm_wf_comm_template' })
6
5
  export class CommTemplate extends BaseEntity {
7
- constructor() {
8
- super();
9
- this.entity_type = COMM_TEMPLATE;
10
- }
11
6
 
12
7
  @Column({ nullable: true })
13
8
  mode: string;
@@ -1,13 +1,8 @@
1
- import { ENTITY_MODIFICATION } from 'src/constant/global.constant';
2
1
  import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
3
2
  import { Column, Entity } from 'typeorm';
4
3
 
5
4
  @Entity({ name: 'frm_wf_entity_modification' })
6
5
  export class EntityModification extends BaseEntity {
7
- constructor() {
8
- super();
9
- this.entity_type = ENTITY_MODIFICATION;
10
- }
11
6
 
12
7
  @Column({ type: 'int', nullable: true })
13
8
  mapped_entity_id: number;