fam-archetype-app 0.0.1

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 (147) hide show
  1. package/README.md +38 -0
  2. package/package.json +25 -0
  3. package/src/collection.json +10 -0
  4. package/src/fam-archetype-app/files/.editorconfig +16 -0
  5. package/src/fam-archetype-app/files/.prettierignore +15 -0
  6. package/src/fam-archetype-app/files/.prettierrc.json +29 -0
  7. package/src/fam-archetype-app/files/LICENSE.md +21 -0
  8. package/src/fam-archetype-app/files/README.md +59 -0
  9. package/src/fam-archetype-app/files/angular.json.template +178 -0
  10. package/src/fam-archetype-app/files/cli +361 -0
  11. package/src/fam-archetype-app/files/eslint.config.js +89 -0
  12. package/src/fam-archetype-app/files/package-lock.json.template +18812 -0
  13. package/src/fam-archetype-app/files/package.json.template +62 -0
  14. package/src/fam-archetype-app/files/src/assets/fonts/DiBaScreen-Regular.woff2 +0 -0
  15. package/src/fam-archetype-app/files/src/assets/translations/translations-ca.json +284 -0
  16. package/src/fam-archetype-app/files/src/assets/translations/translations-en.json +28 -0
  17. package/src/fam-archetype-app/files/src/assets/translations/translations-es.json +28 -0
  18. package/src/fam-archetype-app/files/src/core/layout/component/footer/footer.component.html.template +3 -0
  19. package/src/fam-archetype-app/files/src/core/layout/component/footer/footer.component.scss +8 -0
  20. package/src/fam-archetype-app/files/src/core/layout/component/layout/layout.component.html +19 -0
  21. package/src/fam-archetype-app/files/src/core/layout/component/layout/layout.component.scss +28 -0
  22. package/src/fam-archetype-app/files/src/core/layout/component/main-info-popup/main-info-popup.component.html +33 -0
  23. package/src/fam-archetype-app/files/src/core/layout/component/main-info-popup/main-info-popup.component.scss +3 -0
  24. package/src/fam-archetype-app/files/src/core/layout/component/menu/menu.component.html +3 -0
  25. package/src/fam-archetype-app/files/src/core/layout/component/menu/menu.component.scss +163 -0
  26. package/src/fam-archetype-app/files/src/core/layout/component/menuitem/menuitem.component.html +39 -0
  27. package/src/fam-archetype-app/files/src/core/layout/component/menuitem/menuitem.component.scss +44 -0
  28. package/src/fam-archetype-app/files/src/core/layout/component/not-found/not-found.component.html +12 -0
  29. package/src/fam-archetype-app/files/src/core/layout/component/not-found/not-found.component.scss +17 -0
  30. package/src/fam-archetype-app/files/src/core/layout/component/sidebar/sidebar.component.html +13 -0
  31. package/src/fam-archetype-app/files/src/core/layout/component/sidebar/sidebar.component.scss +33 -0
  32. package/src/fam-archetype-app/files/src/core/layout/component/top-menu/top-menu.component.html +12 -0
  33. package/src/fam-archetype-app/files/src/core/layout/component/top-menu/top-menu.component.scss +9 -0
  34. package/src/fam-archetype-app/files/src/core/layout/component/topbar/_mixins.scss +8 -0
  35. package/src/fam-archetype-app/files/src/core/layout/component/topbar/topbar.component.html.template +45 -0
  36. package/src/fam-archetype-app/files/src/core/layout/component/topbar/topbar.component.scss +77 -0
  37. package/src/fam-archetype-app/files/src/environments/environment.dev.ts.template +12 -0
  38. package/src/fam-archetype-app/files/src/environments/environment.int.ts.template +12 -0
  39. package/src/fam-archetype-app/files/src/environments/environment.pre.ts.template +12 -0
  40. package/src/fam-archetype-app/files/src/environments/environment.ts.template +12 -0
  41. package/src/fam-archetype-app/files/src/index.html.template +18 -0
  42. package/src/fam-archetype-app/files/src/shared/filters/diba-filters/diba-filters.component.html +69 -0
  43. package/src/fam-archetype-app/files/src/shared/filters/diba-filters/diba-filters.component.scss +0 -0
  44. package/src/fam-archetype-app/files/src/shared/styles/_movements.scss +19 -0
  45. package/src/fam-archetype-app/files/src/shared/styles/global/_core.scss +20 -0
  46. package/src/fam-archetype-app/files/src/shared/styles/global/_icons.scss +37 -0
  47. package/src/fam-archetype-app/files/src/shared/styles/global/_tooltips.scss +14 -0
  48. package/src/fam-archetype-app/files/src/shared/styles/global/_typography.scss +68 -0
  49. package/src/fam-archetype-app/files/src/shared/styles/global/_utils.scss +24 -0
  50. package/src/fam-archetype-app/files/src/shared/styles/global/layout.scss +5 -0
  51. package/src/fam-archetype-app/files/src/shared/table/column-visibility-selector/column-visibility-selector.component.html +10 -0
  52. package/src/fam-archetype-app/files/src/shared/table/column-visibility-selector/column-visibility-selector.component.scss +0 -0
  53. package/src/fam-archetype-app/files/src/shared/table/diba-table/diba-table.component.html +136 -0
  54. package/src/fam-archetype-app/files/src/shared/table/diba-table/diba-table.component.scss +0 -0
  55. package/src/fam-archetype-app/files/src/styles.scss +109 -0
  56. package/src/fam-archetype-app/files/src/tailwind.css +3 -0
  57. package/src/fam-archetype-app/files/tailwind.config.js +36 -0
  58. package/src/fam-archetype-app/files/tools/cli/TelosysTools/commands/commands.txt +1 -0
  59. package/src/fam-archetype-app/files/tools/cli/TelosysTools/commands/db_to_entities.txt +1 -0
  60. package/src/fam-archetype-app/files/tools/cli/TelosysTools/commands/test_db_connection.txt +1 -0
  61. package/src/fam-archetype-app/files/tools/cli/TelosysTools/databases.yaml +188 -0
  62. package/src/fam-archetype-app/files/tools/cli/TelosysTools/downloads/.keep +0 -0
  63. package/src/fam-archetype-app/files/tools/cli/TelosysTools/lib/.keep +0 -0
  64. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamActivitat.entity +26 -0
  65. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamActivitatsUbicacio.entity +40 -0
  66. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamAlumne.entity +76 -0
  67. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamArea.entity +33 -0
  68. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamComanda.entity +37 -0
  69. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamCurs.entity +50 -0
  70. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamDocument.entity +53 -0
  71. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamDocumentTipus.entity +26 -0
  72. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamEntitatBase.entity +84 -0
  73. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamExpedient.entity +71 -0
  74. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamExpedientDocument.entity +51 -0
  75. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamExpedientEstat.entity +26 -0
  76. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamExpedientTipus.entity +26 -0
  77. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamJerarquia.entity +33 -0
  78. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamLinia.entity +56 -0
  79. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamMatricula.entity +63 -0
  80. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamTipusArticle.entity +26 -0
  81. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamUbicacio.entity +35 -0
  82. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamZona.entity +27 -0
  83. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/Funcionalitat.entity +65 -0
  84. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FuncionalitatGrupFunc.entity +58 -0
  85. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/GrupFuncionalitat.entity +54 -0
  86. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/PerfilGrupFuncionalitat.entity +50 -0
  87. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/VusPerfil.entity +31 -0
  88. package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/model.yaml +4 -0
  89. package/src/fam-archetype-app/files/tools/cli/TelosysTools/telosys-tools.cfg +31 -0
  90. package/src/fam-archetype-app/files/tools/cli/TelosysTools/telosys.env +5 -0
  91. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/README.md +12 -0
  92. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/database.properties +23 -0
  93. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/include/init_var_entity.vm +169 -0
  94. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/include/macros.vm +218 -0
  95. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/app_config_ts.vm +56 -0
  96. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/app_routes_ts.vm +21 -0
  97. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/core/layout/component/menu/menu_component_ts.vm +30 -0
  98. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/core/layout/component/top-menu/top-menu_component_ts.vm +36 -0
  99. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/core/layout/service/menu_model_service_ts.vm +49 -0
  100. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/create-Xxx_use-case_ts.vm +18 -0
  101. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/create-file-Xxx_use-case_ts.vm +17 -0
  102. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/delete-Xxx_use-case_ts.vm +17 -0
  103. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/download-Xxx-file_use-case_ts.vm +24 -0
  104. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/find-Xxx_use-case_ts.vm +18 -0
  105. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/search-Xxx_use-case_ts.vm +25 -0
  106. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/update-Xxx_use-case_ts.vm +18 -0
  107. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/domain/Xxx_entity_ts.vm +36 -0
  108. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/domain/Xxx_repository_interface_ts.vm +27 -0
  109. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/mappers/Xxx_jsona_mapper_ts.vm +52 -0
  110. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/mappers/Xxx_mapper_ts.vm +36 -0
  111. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/Xxx_routes_ts.vm +15 -0
  112. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_html.vm +178 -0
  113. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_scss.vm +0 -0
  114. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_spec_ts.vm +29 -0
  115. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_ts.vm +382 -0
  116. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_html.vm +37 -0
  117. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_scss.vm +10 -0
  118. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_spec_ts.vm +29 -0
  119. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_ts.vm +430 -0
  120. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/resources/Xxx_resource_ts.vm +43 -0
  121. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/outbound/Xxx_repository_impl_ts.vm +162 -0
  122. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/test_code.vm +3 -0
  123. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/templates.cfg +52 -0
  124. package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/tools-test/test-api_Xxx_rest.vm +181 -0
  125. package/src/fam-archetype-app/files/tools/cli/telosys +5 -0
  126. package/src/fam-archetype-app/files/tools/cli/telosys-cli-4.2.0-001.jar +0 -0
  127. package/src/fam-archetype-app/files/tools/cli/telosys-cli.cfg +55 -0
  128. package/src/fam-archetype-app/files/tools/cli/telosys-term.sh +30 -0
  129. package/src/fam-archetype-app/files/tools/cli/telosys.bat +4 -0
  130. package/src/fam-archetype-app/files/tools/cli/telosys.ico +0 -0
  131. package/src/fam-archetype-app/files/tools/db/develop/data/.keep +0 -0
  132. package/src/fam-archetype-app/files/tools/db/production/data/.keep +0 -0
  133. package/src/fam-archetype-app/files/tools/db/production/migrations/.keep +0 -0
  134. package/src/fam-archetype-app/files/tools/docs/.keep +0 -0
  135. package/src/fam-archetype-app/files/tools/test/test-api.rest +80 -0
  136. package/src/fam-archetype-app/files/tsconfig.app.json +15 -0
  137. package/src/fam-archetype-app/files/tsconfig.json +42 -0
  138. package/src/fam-archetype-app/files/tsconfig.spec.json +15 -0
  139. package/src/fam-archetype-app/files/vercel.json +9 -0
  140. package/src/fam-archetype-app/index.d.ts +2 -0
  141. package/src/fam-archetype-app/index.js +18 -0
  142. package/src/fam-archetype-app/index.js.map +1 -0
  143. package/src/fam-archetype-app/index_spec.d.ts +1 -0
  144. package/src/fam-archetype-app/index_spec.js +23 -0
  145. package/src/fam-archetype-app/index_spec.js.map +1 -0
  146. package/src/fam-archetype-app/schema.json +21 -0
  147. package/tsconfig.json +24 -0
@@ -0,0 +1,63 @@
1
+ // ----------------------------------------------------------------------------
2
+ // Outbound infrastructure: Database
3
+ @DbSchema("FAM_API")
4
+ @DbTable("FAM_MATRICULA")
5
+ #DbColumnPrefix("FAM_MATRICULA")
6
+ // ----------------------------------------------------------------------------
7
+ // Inbound infrastructure: API Rest
8
+ #ApiResource("matricules")
9
+ // ----------------------------------------------------------------------------
10
+ // Domain Model
11
+ @AggregateRoot
12
+ #AggregateDeletion("logical")
13
+ // ----------------------------------------------------------------------------
14
+ // Model definition
15
+ FamMatricula {
16
+ famMatriculaId : long {
17
+ @Id @NotNull @MaxLen(10) @DbName("ID") #postable(false) #updatable(false)
18
+ };
19
+ famMatriculaCodi : string {
20
+ @MaxLen(255) @DbName("CODI")
21
+ #mandatoryInList(true)
22
+ };
23
+
24
+ famMatriculaDataMatricula : date {
25
+ @DbName("DATA_MATRICULA")
26
+ #mandatoryInList(true)
27
+ };
28
+ famMatriculaFitxer : binary {
29
+ @DbName("FITXER")
30
+ #mandatoryInList(false)
31
+ };
32
+ famMatriculaFitxerNom : string {
33
+ @MaxLen(255) @DbName("FITXER_NOM")
34
+ #mandatoryInList(true)
35
+ };
36
+ famMatriculaFitxerContentType : string {
37
+ @MaxLen(255) @DbName("FITXER_CONTENT_TYPE")
38
+ #mandatoryInList(false)
39
+ };
40
+ famMatriculaFitxerPes : long {
41
+ @DbName("FITXER_PES") @MaxLen(15)
42
+ #mandatoryInList(false)
43
+ };
44
+ famMatriculaObservacions : string {
45
+ @MaxLen(1024) @DbName("OBSERVACIONS")
46
+ #mandatoryInList(false)
47
+ };
48
+
49
+ famAlumne : FamAlumne {
50
+ #Link("ALUMNE")
51
+ #fieldShowFront("famAlumneNom")
52
+ #mandatoryInList(true)
53
+ #type("alumnes")
54
+ #isParentEntity(true)
55
+ };
56
+ famCurs : FamCurs {
57
+ #Link("CURS")
58
+ #fieldShowFront("famCursNom")
59
+ #mandatoryInList(true)
60
+ #type("cursos")
61
+ #isParentEntity(true)
62
+ };
63
+ }
@@ -0,0 +1,26 @@
1
+ // ----------------------------------------------------------------------------
2
+ // Outbound infrastructure: Database
3
+ @DbSchema("FAM_API")
4
+ @DbTable("FAM_TIPUS_ARTICLE")
5
+ #DbColumnPrefix("FAM_TIP")
6
+ // ----------------------------------------------------------------------------
7
+ // Inbound infrastructure: API Rest
8
+ #ApiResource("tipus_articles")
9
+ // ----------------------------------------------------------------------------
10
+ // Domain Model
11
+ @AggregateRoot
12
+ #AggregateDeletion("logical")
13
+ // ----------------------------------------------------------------------------
14
+ // UI Menu
15
+ #Menu("AUXILIARS")
16
+ // ----------------------------------------------------------------------------
17
+ // Model definition
18
+ FamTipusArticle {
19
+ famTipId : long {
20
+ @Id @NotNull @MaxLen(10) @DbName("ID") #postable(false) #updatable(false)
21
+ };
22
+ famTipDescripcio : string {
23
+ @MaxLen(64) @DbName("DESCRIPCIO")
24
+ #mandatoryInList(true)
25
+ };
26
+ }
@@ -0,0 +1,35 @@
1
+ // ----------------------------------------------------------------------------
2
+ // Outbound infrastructure: Database
3
+ @DbSchema("FAM_API")
4
+ @DbTable("FAM_UBICACIO")
5
+ #DbColumnPrefix("FAM_UBI")
6
+ // ----------------------------------------------------------------------------
7
+ // Inbound infrastructure: API Rest
8
+ #ApiResource("ubicacions")
9
+ // ----------------------------------------------------------------------------
10
+ // Domain Model
11
+ @AggregateRoot
12
+ #AggregateDeletion("logical")
13
+ // ----------------------------------------------------------------------------
14
+ // Tabs in Detail Page
15
+ #DetailTabs("FamActivitatsUbicacio")
16
+ // ----------------------------------------------------------------------------
17
+ // Model definition
18
+ FamUbicacio {
19
+ famUbiId : long {
20
+ @Id @NotNull @MaxLen(10) @DbName("ID") #postable(false) #updatable(false)
21
+ };
22
+ famUbiNom : string {
23
+ @MaxLen(255) @DbName("NOM")
24
+ #mandatoryInList(true)
25
+ };
26
+ famArea : FamArea {
27
+ #Link("AREA")
28
+ #fieldShowFront("famAreNom")
29
+ #mandatoryInList(true)
30
+ #type("areas")
31
+ };
32
+ famActivitatsUbicacions : FamActivitatsUbicacio[] { @MappedBy(famUbicacio) };
33
+ famAlumnes : FamAlumne[] { @MappedBy(famUbicacio) };
34
+ famEntitatBases : FamEntitatBase[] { @MappedBy(famUbicacio) };
35
+ }
@@ -0,0 +1,27 @@
1
+ // ----------------------------------------------------------------------------
2
+ // Outbound infrastructure: Database
3
+ @DbSchema("FAM_API")
4
+ @DbTable("FAM_ZONA")
5
+ #DbColumnPrefix("ZON001")
6
+ // ----------------------------------------------------------------------------
7
+ // Inbound infrastructure: API Rest
8
+ #ApiResource("zones")
9
+ // ----------------------------------------------------------------------------
10
+ // Domain Model
11
+ @AggregateRoot
12
+ #AggregateDeletion("logical")
13
+ // ----------------------------------------------------------------------------
14
+ // Tabs in Detail Page
15
+ #DetailTabs("FamArea")
16
+ // Model definition
17
+ FamZona {
18
+ famZonaId : long {
19
+ @Id @NotNull @MaxLen(10) @DbName("ID") #postable(false) #updatable(false)
20
+ };
21
+ famZonaNom : string {
22
+ @NotBlank @MaxLen(64) @DbName("NOM")
23
+ #mandatoryInList(true)
24
+ #order(1)
25
+ #linkInList(true)
26
+ };
27
+ }
@@ -0,0 +1,65 @@
1
+ // ----------------------------------------------------------------------------
2
+ // Outbound infrastructure: Database
3
+ @DbSchema("AUTHO")
4
+ @DbTable("FUNCIONALITAT")
5
+ #DbColumnPrefix("FUNC")
6
+ // ----------------------------------------------------------------------------
7
+ // Inbound infrastructure: API Rest
8
+ #ApiResource("funcionalitats")
9
+ // ----------------------------------------------------------------------------
10
+ @AggregateRoot
11
+ #AggregateDeletion("logical")
12
+ // ----------------------------------------------------------------------------
13
+ // UI Menu
14
+ #Menu("AUTHORIZATION")
15
+ // ----------------------------------------------------------------------------
16
+ // Tabs in Detail Page
17
+ #DetailTabs("FuncionalitatGrupFunc")
18
+ // ----------------------------------------------------------------------------
19
+ Funcionalitat {
20
+ idFuncionalitat : long {
21
+ @Id @NotNull @MaxLen(19) @DbName("ID_FUNCIONALITAT") #postable(false) #updatable(false)
22
+ };
23
+ codiFuncionalitat : string {
24
+ @NotNull
25
+ @MaxLen(50)
26
+ @DbName("CODI_FUNCIONALITAT")
27
+ #mandatoryInList(true)
28
+ };
29
+ nomFuncionalitat : string {
30
+ @NotNull
31
+ @MaxLen(100)
32
+ @DbName("NOM_FUNCIONALITAT")
33
+ #mandatoryInList(true)
34
+ #linkInList(true)
35
+ };
36
+ descripcioFuncionalitat : string {
37
+ @NotNull
38
+ @MaxLen(500)
39
+ @DbName("DESCRIPCIO_FUNCIONALITAT")
40
+ };
41
+ metodeApi : string {
42
+ @MaxLen(50)
43
+ @DbName("METODE_API")
44
+ };
45
+ usuariAlta : string {
46
+ @NotNull
47
+ @MaxLen(50)
48
+ @DbName("USUARI_ALTA")
49
+ };
50
+ dataAlta : date {
51
+ @NotNull
52
+ @DbName("DATA_ALTA")
53
+ };
54
+ usuariModificacio : string {
55
+ @NotNull
56
+ @MaxLen(50)
57
+ @DbName("USUARI_MODIFICACIO")
58
+ };
59
+ dataModificacio : date {
60
+ @NotNull
61
+ @DbName("DATA_MODIFICACIO")
62
+ };
63
+
64
+ funcionalitatGrups : FuncionalitatGrupFunc[] { @MappedBy(funcionalitat) };
65
+ }
@@ -0,0 +1,58 @@
1
+ // ----------------------------------------------------------------------------
2
+ @DbSchema("FAM_API")
3
+ @DbTable("FUNCIONALITAT_GRUP_FUNC")
4
+ #DbColumnPrefix("FGF")
5
+ // ----------------------------------------------------------------------------
6
+ #ApiResource("funcionalitat_grup_func")
7
+ // ----------------------------------------------------------------------------
8
+ @AggregateRoot
9
+ #AggregateDeletion("logical")
10
+ // ----------------------------------------------------------------------------
11
+ // UI Menu
12
+ #Menu("AUTHORIZATION")
13
+ // ----------------------------------------------------------------------------
14
+ FuncionalitatGrupFunc {
15
+ idFuncionalitatGrupFunc : long {
16
+ @Id @NotNull @MaxLen(19) @DbName("ID_FUNCIONALITAT_GRUP_FUNC") #postable(false) #updatable(false)
17
+ };
18
+
19
+ grupFuncionalitat : GrupFuncionalitat {
20
+ #Link("GRUP_FUNCIONALITAT")
21
+ #fieldShowFront("nomGrupFuncionalitat")
22
+ #type("grups_funcionalitat")
23
+ #isParentEntity(true)
24
+ #order(2)
25
+ #linkInList(true)
26
+ };
27
+
28
+ funcionalitat : Funcionalitat {
29
+ #Link("FUNCIONALITAT")
30
+ #fieldShowFront("nomFuncionalitat")
31
+ #type("funcionalitats")
32
+ #isParentEntity(true)
33
+ #order(1)
34
+ };
35
+
36
+ usuariAlta : string {
37
+ @NotNull
38
+ @MaxLen(50)
39
+ @DbName("USUARI_ALTA")
40
+ #order(3)
41
+ };
42
+ dataAlta : date {
43
+ @NotNull
44
+ @DbName("DATA_ALTA")
45
+ #order(4)
46
+ };
47
+ usuariModificacio : string {
48
+ @NotNull
49
+ @MaxLen(50)
50
+ @DbName("USUARI_MODIFICACIO")
51
+ #order(5)
52
+ };
53
+ dataModificacio : date {
54
+ @NotNull
55
+ @DbName("DATA_MODIFICACIO")
56
+ #order(6)
57
+ };
58
+ }
@@ -0,0 +1,54 @@
1
+ // ----------------------------------------------------------------------------
2
+ @DbSchema("FAM_API")
3
+ @DbTable("GRUP_FUNCIONALITAT")
4
+ #DbColumnPrefix("GFUNC")
5
+ // ----------------------------------------------------------------------------
6
+ #ApiResource("grups_funcionalitat")
7
+ // ----------------------------------------------------------------------------
8
+ @AggregateRoot
9
+ #AggregateDeletion("logical")
10
+ // ----------------------------------------------------------------------------
11
+ // UI Menu
12
+ #Menu("AUTHORIZATION")
13
+ // ----------------------------------------------------------------------------
14
+ // Tabs in Detail Page
15
+ #DetailTabs("FuncionalitatGrupFunc")
16
+ // Model definition
17
+ GrupFuncionalitat {
18
+ idGrupFuncionalitat : long {
19
+ @Id @NotNull @MaxLen(19) @DbName("ID_GRUP_FUNCIONALITAT") #postable(false) #updatable(false)
20
+ };
21
+ nomGrupFuncionalitat : string {
22
+ @NotNull
23
+ @MaxLen(50)
24
+ @DbName("NOM_GRUP_FUNCIONALITAT")
25
+ #mandatoryInList(true)
26
+ #order(1)
27
+ #linkInList(true)
28
+ };
29
+ usuariAlta : string {
30
+ @NotNull
31
+ @MaxLen(50)
32
+ @DbName("USUARI_ALTA")
33
+ #order(2)
34
+ };
35
+ dataAlta : date {
36
+ @NotNull
37
+ @DbName("DATA_ALTA")
38
+ #order(3)
39
+ };
40
+ usuariModificacio : string {
41
+ @NotNull
42
+ @MaxLen(50)
43
+ @DbName("USUARI_MODIFICACIO")
44
+ #order(4)
45
+ };
46
+ dataModificacio : date {
47
+ @NotNull
48
+ @DbName("DATA_MODIFICACIO")
49
+ #order(5)
50
+ };
51
+
52
+ funcionalitatGrups : FuncionalitatGrupFunc[] { @MappedBy(grupFuncionalitat) };
53
+ perfilsGrup : PerfilGrupFuncionalitat[] { @MappedBy(grupFuncionalitat) };
54
+ }
@@ -0,0 +1,50 @@
1
+ // ----------------------------------------------------------------------------
2
+ @DbSchema("FAM_API")
3
+ @DbTable("PERFIL_GRUP_FUNCIONALITAT")
4
+ #DbColumnPrefix("PGF")
5
+ // ----------------------------------------------------------------------------
6
+ #ApiResource("perfils_grup_funcionalitat")
7
+ // ----------------------------------------------------------------------------
8
+ @AggregateRoot
9
+ #AggregateDeletion("logical")
10
+ // ----------------------------------------------------------------------------
11
+ // UI Menu
12
+ #Menu("AUTHORIZATION")
13
+ // ----------------------------------------------------------------------------
14
+ PerfilGrupFuncionalitat {
15
+ idPerfilGrupFuncionalitat : long {
16
+ @Id @NotNull @MaxLen(19) @DbName("ID_PERFIL_GRUP_FUNCIONALITAT") #postable(false) #updatable(false)
17
+ };
18
+
19
+ vusPerfil : VusPerfil {
20
+ #Link("VUS_PERFIL")
21
+ #fieldShowFront("nomPerfil") // ajusta al campo real del perfil
22
+ #type("vus_perfil")
23
+ #isParentEntity(true)
24
+ };
25
+
26
+ grupFuncionalitat : GrupFuncionalitat {
27
+ #Link("GRUP_FUNCIONALITAT")
28
+ #fieldShowFront("nomGrupFuncionalitat")
29
+ #type("grups_funcionalitat")
30
+ };
31
+
32
+ usuariAlta : string {
33
+ @NotNull
34
+ @MaxLen(50)
35
+ @DbName("USUARI_ALTA")
36
+ };
37
+ dataAlta : date {
38
+ @NotNull
39
+ @DbName("DATA_ALTA")
40
+ };
41
+ usuariModificacio : string {
42
+ @NotNull
43
+ @MaxLen(50)
44
+ @DbName("USUARI_MODIFICACIO")
45
+ };
46
+ dataModificacio : date {
47
+ @NotNull
48
+ @DbName("DATA_MODIFICACIO")
49
+ };
50
+ }
@@ -0,0 +1,31 @@
1
+ // ----------------------------------------------------------------------------
2
+ // Outbound infrastructure: Database
3
+ @DbSchema("FAM_API")
4
+ @DbTable("VUS_PERFIL")
5
+ #DbColumnPrefix("VUS")
6
+ // ----------------------------------------------------------------------------
7
+ // Inbound infrastructure: API Rest
8
+ #ApiResource("vus_perfil")
9
+ // ----------------------------------------------------------------------------
10
+ @AggregateRoot
11
+ #AggregateDeletion("logical")
12
+ // ----------------------------------------------------------------------------
13
+ // UI Menu
14
+ #Menu("AUTHORIZATION")
15
+ // ----------------------------------------------------------------------------
16
+ // Tabs in Detail Page
17
+ #DetailTabs("PerfilGrupFuncionalitat")
18
+ // Model definition
19
+ VusPerfil {
20
+ idPerfilVus : long {
21
+ @Id @NotNull @MaxLen(19) @DbName("ID_PERFIL_VUS") #postable(false) #updatable(false)
22
+ };
23
+
24
+ nomPerfil : string {
25
+ @MaxLen(100)
26
+ @DbName("NOM_PERFIL")
27
+ };
28
+
29
+ // Inversa desde TF_PERFIL_GRUP_FUNCIONALITAT
30
+ perfilGrupFuncionalitats : PerfilGrupFuncionalitat[] { @MappedBy(vusPerfil) };
31
+ }
@@ -0,0 +1,4 @@
1
+ # Telosys model info
2
+ title: Project model
3
+ version: 1.0.0
4
+ description:
@@ -0,0 +1,31 @@
1
+ # Telosys-Tools properties
2
+ # -------------------------------------------
3
+ # --- Project folders (standard variables)
4
+ SRC=src
5
+ RES=src/main/resources
6
+ WEB=src/main/webapp
7
+ TEST_SRC=src/test/java
8
+ TEST_RES=src/test/resources
9
+ DOC=tools/docs
10
+ TMP=tmp
11
+ # -------------------------------------------
12
+ # --- Project Packages (standard variables)
13
+ ROOT_PKG=PROJECT_ROOT_PKG
14
+ # -------------------------------------------
15
+ # --- Project Specific Variables
16
+ # ProjectVariable.CUSTOM_VARIABLE=some_value
17
+ ProjectVariable.BASE_PKG=PROJECT_BASE_PKG
18
+ ProjectVariable.TOOLS_DB=tools/db
19
+ ProjectVariable.TOOLS_TEST=tools/test
20
+ ProjectVariable.CONTEXT=PROJECT_CONTEXT
21
+ # -------------------------------------------
22
+ # --- Project Specific Folders (use absolute path)
23
+ #-- Specific location for templates :
24
+ # SpecificTemplatesFolder=C\:\\dir1\\dir2
25
+ # SpecificTemplatesFolder=/dir1/dir2
26
+ # ---
27
+ #-- Specific destination for code generation :
28
+ # SpecificDestinationFolder=C\:\\dir1\\dir2
29
+ # SpecificDestinationFolder=/dir1/dir2
30
+ # Note: valid destination only when execute telosys-cli from cli.sh
31
+ SpecificDestinationFolder=.
@@ -0,0 +1,5 @@
1
+ # Environment variables
2
+ #
3
+ githubstore=telosys-templates
4
+ model=app
5
+ bundle=fam-app-templates
@@ -0,0 +1,12 @@
1
+ # FAM api application
2
+
3
+ This bundle generates a full api application for FAM framework:
4
+
5
+ The generated application is as simple as possible (CRUD operations):
6
+
7
+ - A module for model entity.
8
+ - Domain layer with business logic.
9
+ - Application layer: Use cases.
10
+ - Infrastructure:
11
+ - inbound (Inbound Web Service): REST controllers based on Spring Boot.
12
+ - persistence based on JPA entities with Spring Data JPA repositories.
@@ -0,0 +1,23 @@
1
+ # Conventions section
2
+ conv.tableName = ANACONDA_CASE
3
+ conv.columnName = ANACONDA_CASE
4
+ conv.pkName = ANACONDA_CASE
5
+ conv.fkName = ANACONDA_CASE
6
+ # Type section
7
+ type.string = VARCHAR2(%s)
8
+ type.byte = smallint
9
+ type.short = smallint
10
+ type.int = NUMBER(%p)
11
+ type.int = NUMBER(%P)
12
+ type.long = NUMBER(%p)
13
+ type.long = NUMBER(%P)
14
+ type.decimal = numeric(%p)
15
+ type.decimal = numeric(%P)
16
+ type.float = real
17
+ type.double = NUMBER(%p)
18
+ type.boolean = BOOLEAN
19
+ type.date = DATE
20
+ type.time = TIME
21
+ type.timestamp = TIMESTAMP
22
+
23
+ type.binary = RAW
@@ -0,0 +1,169 @@
1
+ #set($DetailTabs = $entity.tagValue("DetailTabs"))
2
+ #set($existsDetailTabs = false)
3
+ #if($fn.isNotBlank($DetailTabs))
4
+ #set($listDetailTabs = $fn.toList($DetailTabs.split(","))) ## -> List<String>
5
+ $fn.trimAll($listDetailTabs) ## limpia espacios si los hubiera
6
+ #foreach($u in $listDetailTabs)
7
+ #set($existsDetailTabs = true)
8
+ #end
9
+ #end
10
+
11
+ #set($sortedAttributes = [])
12
+
13
+ ## Añadir los que tienen tag "order" definido
14
+ #foreach($i in [1..99])
15
+ #foreach($attr in $entity.nonKeyAttributes)
16
+ #if( $attr.tagValue("order", "9999") == "$i" )
17
+ #set($discard = $sortedAttributes.add($attr))
18
+ #end
19
+ #end
20
+ #end
21
+
22
+ ## Añadir los que no tienen tag "order" definido (valor por defecto "9999")
23
+ #foreach($attr in $entity.nonKeyAttributes)
24
+ #if( $attr.tagValue("order", "9999") == "9999" )
25
+ #set($discard = $sortedAttributes.add($attr))
26
+ #end
27
+ #end
28
+
29
+ ## ############################################################################
30
+ ## Attribute collections
31
+ ## ############################################################################
32
+ #set( $allAttributes = [] )
33
+ #set( $publicAttributes = [] )
34
+ #set( $postableAttributes = [] )
35
+ #set( $updatableAttributes = [] )
36
+ #set( $readableAttributes = [] )
37
+ #set( $mandatoryInList = [] )
38
+ #set( $optionalInList = [] )
39
+ #foreach( $attribute in $sortedAttributes )
40
+ #set( $isNotFK = !$attribute.isFK() )
41
+ #if( $isNotFK )
42
+ #set( $z = $allAttributes.add($attribute) )
43
+ #if( !$attribute.tagValueAsBoolean("private", false) )
44
+ #set( $z = $publicAttributes.add($attribute) )
45
+ #end
46
+ #if( $attribute.tagValueAsBoolean("postable", true) )
47
+ #set( $z = $postableAttributes.add($attribute) )
48
+ #end
49
+ #if ( $attribute.tagValueAsBoolean("updatable", true) )
50
+ #set( $z = $updatableAttributes.add($attribute) )
51
+ #end
52
+ #if( $attribute.tagValueAsBoolean("readable", true) )
53
+ #set( $z = $readableAttributes.add($attribute) )
54
+ #end
55
+ #if( $attribute.tagValueAsBoolean("mandatoryInList", true) )
56
+ #set( $z = $mandatoryInList.add($attribute) )
57
+ #else
58
+ #set( $z = $optionalInList.add($attribute) )
59
+ #end
60
+ #end
61
+ #end
62
+ ## ############################################################################
63
+ ## Link collections
64
+ ## ############################################################################
65
+ ## Collects the 'ManyToOne' and 'OneToOne' links
66
+ #set( $toOneLinks = [] )
67
+ #set( $toManyLinks = [] )
68
+ #set( $postableToOneLinks = [] )
69
+ #set( $updatableToOneLinks = [] )
70
+ #set( $readableToOneLinks = [] )
71
+ #set( $mandatoryToOneLinksInList = [] )
72
+ #set( $optionalToOneLinksInList = [] )
73
+ #foreach( $link in $entity.links )
74
+ #set( $isToOne = $link.isCardinalityToOne() )
75
+ #if( $isToOne )
76
+ #set( $z = $toOneLinks.add($link) )
77
+ #if( $link.tagValueAsBoolean("postable", true) )
78
+ #set( $z = $postableToOneLinks.add($link) )
79
+ #end
80
+ #if ( $link.tagValueAsBoolean("updatable", true) )
81
+ #set( $z = $updatableToOneLinks.add($link) )
82
+ #end
83
+ #if( $link.tagValueAsBoolean("readable", true) )
84
+ #set( $z = $readableToOneLinks.add($link) )
85
+ #end
86
+ #if( $link.tagValueAsBoolean("mandatoryInList", true) )
87
+ #set( $z = $mandatoryToOneLinksInList.add($link) )
88
+ #else
89
+ #set( $z = $optionalToOneLinksInList.add($link) )
90
+ #end
91
+ #else
92
+ #set( $z = $toManyLinks.add($link) )
93
+ #end
94
+ #end
95
+ ## ############################################################################
96
+ ## Utilities
97
+ ## ############################################################################
98
+ ## Entity: convert entityName to SnakeCase
99
+ #set($entityName = ${entity.name})
100
+ #set($entityNameUncapitalized = $fn.uncapitalize($entityName))
101
+ #set($entityNameSnakeCase = $entityNameUncapitalized.replaceAll("([A-Z])", "_$1").toLowerCase())
102
+ ## Entity: check entity id generation strategy
103
+ #if( !$entity.isJoinEntity() )
104
+ #set( $generatedValueSequence = $entity.keyAttribute.tagValue("generatedValue", "SEQUENCE") == "SEQUENCE" )
105
+ #set( $generatedValueUUID = $entity.keyAttribute.tagValue("generatedValue", "SEQUENCE") == "UUID" )
106
+ #set( $generatedValueManual = $entity.keyAttribute.tagValue("generatedValue", "SEQUENCE") == "MANUAL" )
107
+ #end
108
+ ## Entity: check entity id type
109
+ #if( !$entity.isJoinEntity() )
110
+ #set( $keyIsStringType = $entity.keyAttribute.isStringType() )
111
+ #end
112
+ ## Entity: check entity has unique attributes
113
+ #set( $hasUniqueAttributes = false)
114
+ #foreach($attribute in $sortedAttributes)
115
+ #if( $attribute.isUnique() )
116
+ #set( $hasUniqueAttributes = true)#break#end
117
+ #end
118
+ ## Entity: check if has logical deletion
119
+ #set( $logicalDeletion = $entity.tagValue("AggregateDeletion", "physical") == "logical" )
120
+ ## Entity: check if has temporal type && check if has boolean type && check if has create validation constraints && check if has update validation constraints
121
+ #set( $hasTemporalType = false )
122
+ #set( $hasBooleanType = false )
123
+ #set( $hasFileType = false )
124
+ #set( $hasFileTypeinNAS = false )
125
+ #set( $hasCreateValidationsConstraints = false )
126
+ #set( $hasUpdateValidationsConstraints = false )
127
+ #foreach( $attribute in $allAttributes )
128
+ #if ( ${attribute.isTemporalType()} )
129
+ #set( $hasTemporalType = true )
130
+ #end
131
+ #if ( ${attribute.isBooleanType()} || $logicalDeletion )
132
+ #set( $hasBooleanType = true )
133
+ #end
134
+ #if ( $attribute.type == "binary[]" || $attribute.type == "byte[]")
135
+ #set( $hasFileType = true )
136
+ #if ( $attribute.tagValueAsBoolean( "fileInNas", false ) )
137
+ #set( $hasFileTypeinNAS = true )
138
+ #end
139
+ #end
140
+ #if ( $attribute.tagValueAsBoolean( "postable", true ) )
141
+ #set( $hasCreateValidationsConstraints = true )
142
+ #end
143
+ #if ( $attribute.tagValueAsBoolean( "updatable", true ) )
144
+ #set( $hasUpdateValidationsConstraints = true )
145
+ #end
146
+ #if( $hasTemporalType && $hasBooleanType && $hasFileType && $hasCreateValidationsConstraints && $hasUpdateValidationsConstraints )#break#end
147
+ #end
148
+ ## Entity: check if has optional to one link
149
+ #set( $entityHasOptionalToOneLink = false )
150
+ #foreach( $link in $toOneLinks )
151
+ #if( $link.isOptionalTrue() )
152
+ #set( $entityHasOptionalToOneLink = true )#break#end
153
+ #end
154
+ ## Entity: check if has Pattern restricction only for public attributes
155
+ #foreach( $attribute in $publicAttributes )
156
+ #set( $publicAttributesHasPatternRestriction = $fn.isDefined( $attribute.pattern ) )
157
+ #if ( $publicAttributesHasPatternRestriction )#break#end
158
+ #end
159
+ ## ############################################################################
160
+ ## Packages names
161
+ ## ############################################################################
162
+ ## Packages
163
+ #set($modulesPackage = "${ROOT_PKG}.modules")
164
+ #set($modulesEntityPackage = "${ROOT_PKG}.modules.${entityNameSnakeCase}")
165
+ #set($modulesSharedPackage = "${ROOT_PKG}.modules.shared")
166
+ #set($modulesSharedEntityPackage = "${ROOT_PKG}.modules.shared.${entityNameSnakeCase}")
167
+ ## Context
168
+ #set($resourceContext = $entity.tagValue("ApiResource"))
169
+