@things-factory/accounting 6.0.46

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 (227) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +31 -0
  3. package/assets/images/book-activity.jpg +0 -0
  4. package/assets/images/expense-activity.jpg +0 -0
  5. package/assets/images/hatiolab-logo.png +0 -0
  6. package/client/activities/activity-book-edit.ts +88 -0
  7. package/client/activities/activity-book-view.ts +88 -0
  8. package/client/activities/activity-expense-edit.ts +88 -0
  9. package/client/activities/activity-expense-view.ts +88 -0
  10. package/client/bootstrap.ts +1 -0
  11. package/client/index.ts +0 -0
  12. package/client/pages/account/account-importer.ts +97 -0
  13. package/client/pages/account/account-list-page.ts +348 -0
  14. package/client/pages/accounting-category/accounting-category-importer.ts +97 -0
  15. package/client/pages/accounting-category/accounting-category-list-page.ts +348 -0
  16. package/client/pages/financial-statement/financial-statement-importer.ts +97 -0
  17. package/client/pages/financial-statement/financial-statement-list-page.ts +348 -0
  18. package/client/pages/income-statement/income-statement-importer.ts +97 -0
  19. package/client/pages/income-statement/income-statement-list-page.ts +348 -0
  20. package/client/pages/ledger/ledger-importer.ts +97 -0
  21. package/client/pages/ledger/ledger-list-page.ts +332 -0
  22. package/client/pages/main.ts +24 -0
  23. package/client/pages/transaction/transaction-importer.ts +97 -0
  24. package/client/pages/transaction/transaction-list-page.ts +348 -0
  25. package/client/route.ts +27 -0
  26. package/client/tsconfig.json +11 -0
  27. package/dist-client/activities/activity-book-edit.d.ts +14 -0
  28. package/dist-client/activities/activity-book-edit.js +85 -0
  29. package/dist-client/activities/activity-book-edit.js.map +1 -0
  30. package/dist-client/activities/activity-book-view.d.ts +14 -0
  31. package/dist-client/activities/activity-book-view.js +85 -0
  32. package/dist-client/activities/activity-book-view.js.map +1 -0
  33. package/dist-client/activities/activity-expense-edit.d.ts +14 -0
  34. package/dist-client/activities/activity-expense-edit.js +85 -0
  35. package/dist-client/activities/activity-expense-edit.js.map +1 -0
  36. package/dist-client/activities/activity-expense-view.d.ts +14 -0
  37. package/dist-client/activities/activity-expense-view.js +85 -0
  38. package/dist-client/activities/activity-expense-view.js.map +1 -0
  39. package/dist-client/bootstrap.d.ts +1 -0
  40. package/dist-client/bootstrap.js +2 -0
  41. package/dist-client/bootstrap.js.map +1 -0
  42. package/dist-client/index.d.ts +0 -0
  43. package/dist-client/index.js +2 -0
  44. package/dist-client/index.js.map +1 -0
  45. package/dist-client/pages/account/account-importer.d.ts +22 -0
  46. package/dist-client/pages/account/account-importer.js +100 -0
  47. package/dist-client/pages/account/account-importer.js.map +1 -0
  48. package/dist-client/pages/account/account-list-page.d.ts +62 -0
  49. package/dist-client/pages/account/account-list-page.js +326 -0
  50. package/dist-client/pages/account/account-list-page.js.map +1 -0
  51. package/dist-client/pages/accounting-category/accounting-category-importer.d.ts +22 -0
  52. package/dist-client/pages/accounting-category/accounting-category-importer.js +100 -0
  53. package/dist-client/pages/accounting-category/accounting-category-importer.js.map +1 -0
  54. package/dist-client/pages/accounting-category/accounting-category-list-page.d.ts +62 -0
  55. package/dist-client/pages/accounting-category/accounting-category-list-page.js +326 -0
  56. package/dist-client/pages/accounting-category/accounting-category-list-page.js.map +1 -0
  57. package/dist-client/pages/financial-statement/financial-statement-importer.d.ts +22 -0
  58. package/dist-client/pages/financial-statement/financial-statement-importer.js +100 -0
  59. package/dist-client/pages/financial-statement/financial-statement-importer.js.map +1 -0
  60. package/dist-client/pages/financial-statement/financial-statement-list-page.d.ts +62 -0
  61. package/dist-client/pages/financial-statement/financial-statement-list-page.js +326 -0
  62. package/dist-client/pages/financial-statement/financial-statement-list-page.js.map +1 -0
  63. package/dist-client/pages/income-statement/income-statement-importer.d.ts +22 -0
  64. package/dist-client/pages/income-statement/income-statement-importer.js +100 -0
  65. package/dist-client/pages/income-statement/income-statement-importer.js.map +1 -0
  66. package/dist-client/pages/income-statement/income-statement-list-page.d.ts +62 -0
  67. package/dist-client/pages/income-statement/income-statement-list-page.js +326 -0
  68. package/dist-client/pages/income-statement/income-statement-list-page.js.map +1 -0
  69. package/dist-client/pages/ledger/ledger-importer.d.ts +22 -0
  70. package/dist-client/pages/ledger/ledger-importer.js +100 -0
  71. package/dist-client/pages/ledger/ledger-importer.js.map +1 -0
  72. package/dist-client/pages/ledger/ledger-list-page.d.ts +62 -0
  73. package/dist-client/pages/ledger/ledger-list-page.js +317 -0
  74. package/dist-client/pages/ledger/ledger-list-page.js.map +1 -0
  75. package/dist-client/pages/main.d.ts +1 -0
  76. package/dist-client/pages/main.js +27 -0
  77. package/dist-client/pages/main.js.map +1 -0
  78. package/dist-client/pages/transaction/transaction-importer.d.ts +22 -0
  79. package/dist-client/pages/transaction/transaction-importer.js +100 -0
  80. package/dist-client/pages/transaction/transaction-importer.js.map +1 -0
  81. package/dist-client/pages/transaction/transaction-list-page.d.ts +62 -0
  82. package/dist-client/pages/transaction/transaction-list-page.js +326 -0
  83. package/dist-client/pages/transaction/transaction-list-page.js.map +1 -0
  84. package/dist-client/route.d.ts +1 -0
  85. package/dist-client/route.js +23 -0
  86. package/dist-client/route.js.map +1 -0
  87. package/dist-client/tsconfig.tsbuildinfo +1 -0
  88. package/dist-server/activities/activity-book.js +150 -0
  89. package/dist-server/activities/activity-book.js.map +1 -0
  90. package/dist-server/activities/activity-expense.js +150 -0
  91. package/dist-server/activities/activity-expense.js.map +1 -0
  92. package/dist-server/activities/index.js +19 -0
  93. package/dist-server/activities/index.js.map +1 -0
  94. package/dist-server/controllers/index.js +1 -0
  95. package/dist-server/controllers/index.js.map +1 -0
  96. package/dist-server/index.js +7 -0
  97. package/dist-server/index.js.map +1 -0
  98. package/dist-server/middlewares/index.js +8 -0
  99. package/dist-server/middlewares/index.js.map +1 -0
  100. package/dist-server/migrations/index.js +12 -0
  101. package/dist-server/migrations/index.js.map +1 -0
  102. package/dist-server/routes.js +25 -0
  103. package/dist-server/routes.js.map +1 -0
  104. package/dist-server/service/account/account-history.js +113 -0
  105. package/dist-server/service/account/account-history.js.map +1 -0
  106. package/dist-server/service/account/account-mutation.js +130 -0
  107. package/dist-server/service/account/account-mutation.js.map +1 -0
  108. package/dist-server/service/account/account-query.js +79 -0
  109. package/dist-server/service/account/account-query.js.map +1 -0
  110. package/dist-server/service/account/account-type.js +65 -0
  111. package/dist-server/service/account/account-type.js.map +1 -0
  112. package/dist-server/service/account/account.js +102 -0
  113. package/dist-server/service/account/account.js.map +1 -0
  114. package/dist-server/service/account/event-subscriber.js +21 -0
  115. package/dist-server/service/account/event-subscriber.js.map +1 -0
  116. package/dist-server/service/account/index.js +12 -0
  117. package/dist-server/service/account/index.js.map +1 -0
  118. package/dist-server/service/accounting-category/accounting-category-mutation.js +132 -0
  119. package/dist-server/service/accounting-category/accounting-category-mutation.js.map +1 -0
  120. package/dist-server/service/accounting-category/accounting-category-query.js +79 -0
  121. package/dist-server/service/accounting-category/accounting-category-query.js.map +1 -0
  122. package/dist-server/service/accounting-category/accounting-category-type.js +65 -0
  123. package/dist-server/service/accounting-category/accounting-category-type.js.map +1 -0
  124. package/dist-server/service/accounting-category/accounting-category.js +89 -0
  125. package/dist-server/service/accounting-category/accounting-category.js.map +1 -0
  126. package/dist-server/service/accounting-category/index.js +10 -0
  127. package/dist-server/service/accounting-category/index.js.map +1 -0
  128. package/dist-server/service/financial-statement/event-subscriber.js +21 -0
  129. package/dist-server/service/financial-statement/event-subscriber.js.map +1 -0
  130. package/dist-server/service/financial-statement/financial-statement-history.js +126 -0
  131. package/dist-server/service/financial-statement/financial-statement-history.js.map +1 -0
  132. package/dist-server/service/financial-statement/financial-statement-mutation.js +132 -0
  133. package/dist-server/service/financial-statement/financial-statement-mutation.js.map +1 -0
  134. package/dist-server/service/financial-statement/financial-statement-query.js +79 -0
  135. package/dist-server/service/financial-statement/financial-statement-query.js.map +1 -0
  136. package/dist-server/service/financial-statement/financial-statement-type.js +77 -0
  137. package/dist-server/service/financial-statement/financial-statement-type.js.map +1 -0
  138. package/dist-server/service/financial-statement/financial-statement.js +111 -0
  139. package/dist-server/service/financial-statement/financial-statement.js.map +1 -0
  140. package/dist-server/service/financial-statement/index.js +12 -0
  141. package/dist-server/service/financial-statement/index.js.map +1 -0
  142. package/dist-server/service/income-statement/event-subscriber.js +21 -0
  143. package/dist-server/service/income-statement/event-subscriber.js.map +1 -0
  144. package/dist-server/service/income-statement/income-statement-history.js +126 -0
  145. package/dist-server/service/income-statement/income-statement-history.js.map +1 -0
  146. package/dist-server/service/income-statement/income-statement-mutation.js +132 -0
  147. package/dist-server/service/income-statement/income-statement-mutation.js.map +1 -0
  148. package/dist-server/service/income-statement/income-statement-query.js +79 -0
  149. package/dist-server/service/income-statement/income-statement-query.js.map +1 -0
  150. package/dist-server/service/income-statement/income-statement-type.js +77 -0
  151. package/dist-server/service/income-statement/income-statement-type.js.map +1 -0
  152. package/dist-server/service/income-statement/income-statement.js +117 -0
  153. package/dist-server/service/income-statement/income-statement.js.map +1 -0
  154. package/dist-server/service/income-statement/index.js +12 -0
  155. package/dist-server/service/income-statement/index.js.map +1 -0
  156. package/dist-server/service/index.js +43 -0
  157. package/dist-server/service/index.js.map +1 -0
  158. package/dist-server/service/transaction/event-subscriber.js +21 -0
  159. package/dist-server/service/transaction/event-subscriber.js.map +1 -0
  160. package/dist-server/service/transaction/index.js +12 -0
  161. package/dist-server/service/transaction/index.js.map +1 -0
  162. package/dist-server/service/transaction/transaction-history.js +123 -0
  163. package/dist-server/service/transaction/transaction-history.js.map +1 -0
  164. package/dist-server/service/transaction/transaction-mutation.js +130 -0
  165. package/dist-server/service/transaction/transaction-mutation.js.map +1 -0
  166. package/dist-server/service/transaction/transaction-query.js +79 -0
  167. package/dist-server/service/transaction/transaction-query.js.map +1 -0
  168. package/dist-server/service/transaction/transaction-type.js +73 -0
  169. package/dist-server/service/transaction/transaction-type.js.map +1 -0
  170. package/dist-server/service/transaction/transaction.js +130 -0
  171. package/dist-server/service/transaction/transaction.js.map +1 -0
  172. package/dist-server/tsconfig.tsbuildinfo +1 -0
  173. package/helps/accounting/account.md +160 -0
  174. package/helps/accounting/accounting-category.md +160 -0
  175. package/helps/accounting/financial-accounting.md +53 -0
  176. package/helps/accounting/financial-statement.md +160 -0
  177. package/helps/accounting/income-statement.md +160 -0
  178. package/helps/accounting/transaction.md +160 -0
  179. package/package.json +36 -0
  180. package/server/activities/activity-book.ts +149 -0
  181. package/server/activities/activity-expense.ts +149 -0
  182. package/server/activities/index.ts +19 -0
  183. package/server/controllers/index.ts +0 -0
  184. package/server/index.ts +4 -0
  185. package/server/middlewares/index.ts +3 -0
  186. package/server/migrations/index.ts +9 -0
  187. package/server/routes.ts +28 -0
  188. package/server/service/account/account-history.ts +103 -0
  189. package/server/service/account/account-mutation.ts +137 -0
  190. package/server/service/account/account-query.ts +49 -0
  191. package/server/service/account/account-type.ts +44 -0
  192. package/server/service/account/account.ts +86 -0
  193. package/server/service/account/event-subscriber.ts +17 -0
  194. package/server/service/account/index.ts +9 -0
  195. package/server/service/accounting-category/accounting-category-mutation.ts +145 -0
  196. package/server/service/accounting-category/accounting-category-query.ts +51 -0
  197. package/server/service/accounting-category/accounting-category-type.ts +42 -0
  198. package/server/service/accounting-category/accounting-category.ts +80 -0
  199. package/server/service/accounting-category/index.ts +7 -0
  200. package/server/service/financial-statement/event-subscriber.ts +17 -0
  201. package/server/service/financial-statement/financial-statement-history.ts +114 -0
  202. package/server/service/financial-statement/financial-statement-mutation.ts +145 -0
  203. package/server/service/financial-statement/financial-statement-query.ts +51 -0
  204. package/server/service/financial-statement/financial-statement-type.ts +51 -0
  205. package/server/service/financial-statement/financial-statement.ts +100 -0
  206. package/server/service/financial-statement/index.ts +9 -0
  207. package/server/service/income-statement/event-subscriber.ts +17 -0
  208. package/server/service/income-statement/income-statement-history.ts +114 -0
  209. package/server/service/income-statement/income-statement-mutation.ts +145 -0
  210. package/server/service/income-statement/income-statement-query.ts +48 -0
  211. package/server/service/income-statement/income-statement-type.ts +51 -0
  212. package/server/service/income-statement/income-statement.ts +105 -0
  213. package/server/service/income-statement/index.ts +9 -0
  214. package/server/service/index.ts +62 -0
  215. package/server/service/transaction/event-subscriber.ts +17 -0
  216. package/server/service/transaction/index.ts +9 -0
  217. package/server/service/transaction/transaction-history.ts +111 -0
  218. package/server/service/transaction/transaction-mutation.ts +143 -0
  219. package/server/service/transaction/transaction-query.ts +48 -0
  220. package/server/service/transaction/transaction-type.ts +48 -0
  221. package/server/service/transaction/transaction.ts +115 -0
  222. package/server/tsconfig.json +10 -0
  223. package/things-factory.config.js +16 -0
  224. package/translations/en.json +1 -0
  225. package/translations/ko.json +1 -0
  226. package/translations/ms.json +1 -0
  227. package/translations/zh.json +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-subscriber.js","sourceRoot":"","sources":["../../../server/service/income-statement/event-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAAyC;AAEzC,8DAAkE;AAElE,yDAAoD;AACpD,yEAAmE;AAG5D,IAAM,sCAAsC,GAA5C,MAAM,sCAAuC,SAAQ,yCAAgE;IAC1H,IAAW,MAAM;QACf,OAAO,kCAAe,CAAA;IACxB,CAAC;IAED,IAAW,aAAa;QACtB,OAAO,iDAAsB,CAAA;IAC/B,CAAC;CACF,CAAA;AARY,sCAAsC;IADlD,IAAA,yBAAe,GAAE;GACL,sCAAsC,CAQlD;AARY,wFAAsC","sourcesContent":["import { EventSubscriber } from 'typeorm'\n\nimport { HistoryEntitySubscriber } from '@operato/typeorm-history'\n\nimport { IncomeStatement } from './income-statement'\nimport { IncomeStatementHistory } from './income-statement-history'\n\n@EventSubscriber()\nexport class IncomeStatementHistoryEntitySubscriber extends HistoryEntitySubscriber<IncomeStatement, IncomeStatementHistory> {\n public get entity() {\n return IncomeStatement\n }\n\n public get historyEntity() {\n return IncomeStatementHistory\n }\n}\n"]}
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IncomeStatementHistory = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const typeorm_1 = require("typeorm");
7
+ const typeorm_history_1 = require("@operato/typeorm-history");
8
+ const auth_base_1 = require("@things-factory/auth-base");
9
+ const env_1 = require("@things-factory/env");
10
+ const shell_1 = require("@things-factory/shell");
11
+ const income_statement_1 = require("./income-statement");
12
+ const ORMCONFIG = env_1.config.get('ormconfig', {});
13
+ const DATABASE_TYPE = ORMCONFIG.type;
14
+ let IncomeStatementHistory = class IncomeStatementHistory {
15
+ constructor() {
16
+ this.version = 1;
17
+ }
18
+ };
19
+ tslib_1.__decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
21
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
22
+ tslib_1.__metadata("design:type", String)
23
+ ], IncomeStatementHistory.prototype, "id", void 0);
24
+ tslib_1.__decorate([
25
+ (0, typeorm_1.Column)({ nullable: true, default: 1 }),
26
+ (0, type_graphql_1.Field)({ nullable: true }),
27
+ tslib_1.__metadata("design:type", Number)
28
+ ], IncomeStatementHistory.prototype, "version", void 0);
29
+ tslib_1.__decorate([
30
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
31
+ (0, type_graphql_1.Field)({ nullable: true }),
32
+ tslib_1.__metadata("design:type", shell_1.Domain)
33
+ ], IncomeStatementHistory.prototype, "domain", void 0);
34
+ tslib_1.__decorate([
35
+ (0, typeorm_1.RelationId)((incomeStatement) => incomeStatement.domain),
36
+ tslib_1.__metadata("design:type", String)
37
+ ], IncomeStatementHistory.prototype, "domainId", void 0);
38
+ tslib_1.__decorate([
39
+ (0, typeorm_1.Column)(),
40
+ (0, type_graphql_1.Field)(),
41
+ tslib_1.__metadata("design:type", String)
42
+ ], IncomeStatementHistory.prototype, "name", void 0);
43
+ tslib_1.__decorate([
44
+ (0, typeorm_1.Column)({ nullable: true }),
45
+ (0, type_graphql_1.Field)({ nullable: true }),
46
+ tslib_1.__metadata("design:type", String)
47
+ ], IncomeStatementHistory.prototype, "description", void 0);
48
+ tslib_1.__decorate([
49
+ (0, typeorm_1.Column)({ nullable: true }),
50
+ (0, type_graphql_1.Field)({ nullable: true }),
51
+ tslib_1.__metadata("design:type", Boolean)
52
+ ], IncomeStatementHistory.prototype, "active", void 0);
53
+ tslib_1.__decorate([
54
+ (0, typeorm_1.Column)({ nullable: true }),
55
+ (0, type_graphql_1.Field)({ nullable: true }),
56
+ tslib_1.__metadata("design:type", String)
57
+ ], IncomeStatementHistory.prototype, "state", void 0);
58
+ tslib_1.__decorate([
59
+ (0, typeorm_1.Column)({ nullable: true }),
60
+ (0, type_graphql_1.Field)({ nullable: true }),
61
+ tslib_1.__metadata("design:type", String)
62
+ ], IncomeStatementHistory.prototype, "params", void 0);
63
+ tslib_1.__decorate([
64
+ (0, typeorm_1.Column)({ nullable: true }),
65
+ (0, type_graphql_1.Field)({ nullable: true }),
66
+ tslib_1.__metadata("design:type", Date)
67
+ ], IncomeStatementHistory.prototype, "createdAt", void 0);
68
+ tslib_1.__decorate([
69
+ (0, typeorm_1.Column)({ nullable: true }),
70
+ (0, type_graphql_1.Field)({ nullable: true }),
71
+ tslib_1.__metadata("design:type", Date)
72
+ ], IncomeStatementHistory.prototype, "updatedAt", void 0);
73
+ tslib_1.__decorate([
74
+ (0, typeorm_1.Column)({ nullable: true }),
75
+ (0, type_graphql_1.Field)({ nullable: true }),
76
+ tslib_1.__metadata("design:type", Date)
77
+ ], IncomeStatementHistory.prototype, "deletedAt", void 0);
78
+ tslib_1.__decorate([
79
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
80
+ (0, type_graphql_1.Field)({ nullable: true }),
81
+ tslib_1.__metadata("design:type", auth_base_1.User)
82
+ ], IncomeStatementHistory.prototype, "creator", void 0);
83
+ tslib_1.__decorate([
84
+ (0, typeorm_1.RelationId)((incomeStatement) => incomeStatement.creator),
85
+ tslib_1.__metadata("design:type", String)
86
+ ], IncomeStatementHistory.prototype, "creatorId", void 0);
87
+ tslib_1.__decorate([
88
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
89
+ (0, type_graphql_1.Field)({ nullable: true }),
90
+ tslib_1.__metadata("design:type", auth_base_1.User)
91
+ ], IncomeStatementHistory.prototype, "updater", void 0);
92
+ tslib_1.__decorate([
93
+ (0, typeorm_1.RelationId)((incomeStatement) => incomeStatement.updater),
94
+ tslib_1.__metadata("design:type", String)
95
+ ], IncomeStatementHistory.prototype, "updaterId", void 0);
96
+ tslib_1.__decorate([
97
+ (0, typeorm_history_1.HistoryOriginalIdColumn)(),
98
+ tslib_1.__metadata("design:type", String)
99
+ ], IncomeStatementHistory.prototype, "originalId", void 0);
100
+ tslib_1.__decorate([
101
+ (0, typeorm_history_1.HistoryActionColumn)({
102
+ nullable: false,
103
+ type: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
104
+ ? 'enum'
105
+ : DATABASE_TYPE == 'oracle'
106
+ ? 'varchar2'
107
+ : 'smallint',
108
+ enum: typeorm_history_1.HistoryActionType
109
+ }),
110
+ tslib_1.__metadata("design:type", String)
111
+ ], IncomeStatementHistory.prototype, "action", void 0);
112
+ IncomeStatementHistory = tslib_1.__decorate([
113
+ (0, typeorm_1.Entity)(),
114
+ (0, typeorm_1.Index)('ix_income-statement_history_0', (incomeStatementHistory) => [
115
+ incomeStatementHistory.originalId,
116
+ incomeStatementHistory.version
117
+ ], { unique: true }),
118
+ (0, typeorm_1.Index)('ix_income-statement_history_1', (incomeStatementHistory) => [
119
+ incomeStatementHistory.domain,
120
+ incomeStatementHistory.originalId,
121
+ incomeStatementHistory.version
122
+ ], { unique: true }),
123
+ (0, type_graphql_1.ObjectType)({ description: 'History Entity of IncomeStatement' })
124
+ ], IncomeStatementHistory);
125
+ exports.IncomeStatementHistory = IncomeStatementHistory;
126
+ //# sourceMappingURL=income-statement-history.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"income-statement-history.js","sourceRoot":"","sources":["../../../server/service/income-statement/income-statement-history.ts"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AA,oBAAU,EAAC,CAAC,eAAgC,EAAE,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC;;yDACxD;AAElB;IAAC,IAAA,yCAAuB,GAAE;;0DACA;AAE1B;IAAC,IAAA,qCAAmB,EAAC;QACnB,QAAQ,EAAE,KAAK;QACf,IAAI,EACF,aAAa,IAAI,UAAU,IAAI,aAAa,IAAI,OAAO,IAAI,aAAa,IAAI,SAAS;YACnF,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,aAAa,IAAI,QAAQ;gBAC3B,CAAC,CAAC,UAAU;gBACZ,CAAC,CAAC,UAAU;QAChB,IAAI,EAAE,mCAAiB;KACxB,CAAC;;sDAC+B;AA3EtB,sBAAsB;IAnBlC,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,+BAA+B,EAC/B,CAAC,sBAA8C,EAAE,EAAE,CAAC;QAClD,sBAAsB,CAAC,UAAU;QACjC,sBAAsB,CAAC,OAAO;KAC/B,EACD,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,eAAK,EACJ,+BAA+B,EAC/B,CAAC,sBAA8C,EAAE,EAAE,CAAC;QAClD,sBAAsB,CAAC,MAAM;QAC7B,sBAAsB,CAAC,UAAU;QACjC,sBAAsB,CAAC,OAAO;KAC/B,EACD,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;GACpD,sBAAsB,CA4ElC;AA5EY,wDAAsB","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport { Column, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId } from 'typeorm'\n\nimport {\n HistoryActionColumn,\n HistoryActionType,\n HistoryEntityInterface,\n HistoryOriginalIdColumn\n} from '@operato/typeorm-history'\nimport { Role, User } from '@things-factory/auth-base'\nimport { config } from '@things-factory/env'\nimport { Domain } from '@things-factory/shell'\n\nimport { IncomeStatement, IncomeStatementStatus } from './income-statement'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index(\n 'ix_income-statement_history_0',\n (incomeStatementHistory: IncomeStatementHistory) => [\n incomeStatementHistory.originalId,\n incomeStatementHistory.version\n ],\n { unique: true }\n)\n@Index(\n 'ix_income-statement_history_1',\n (incomeStatementHistory: IncomeStatementHistory) => [\n incomeStatementHistory.domain,\n incomeStatementHistory.originalId,\n incomeStatementHistory.version\n ],\n { unique: true }\n)\n@ObjectType({ description: 'History Entity of IncomeStatement' })\nexport class IncomeStatementHistory implements HistoryEntityInterface<IncomeStatement> {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: true, default: 1 })\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((incomeStatement: IncomeStatement) => incomeStatement.domain)\n domainId?: string\n\n @Column()\n @Field()\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n state?: IncomeStatementStatus\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n params?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n createdAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n updatedAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((incomeStatement: IncomeStatement) => incomeStatement.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((incomeStatement: IncomeStatement) => incomeStatement.updater)\n updaterId?: string\n\n @HistoryOriginalIdColumn()\n public originalId!: string\n\n @HistoryActionColumn({\n nullable: false,\n type:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'enum'\n : DATABASE_TYPE == 'oracle'\n ? 'varchar2'\n : 'smallint',\n enum: HistoryActionType\n })\n public action!: HistoryActionType\n}\n"]}
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IncomeStatementMutation = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const typeorm_1 = require("typeorm");
7
+ const attachment_base_1 = require("@things-factory/attachment-base");
8
+ const income_statement_1 = require("./income-statement");
9
+ const income_statement_type_1 = require("./income-statement-type");
10
+ let IncomeStatementMutation = class IncomeStatementMutation {
11
+ async createIncomeStatement(incomeStatement, context) {
12
+ const { domain, user, tx } = context.state;
13
+ const result = await tx.getRepository(income_statement_1.IncomeStatement).save(Object.assign(Object.assign({}, incomeStatement), { domain, creator: user, updater: user }));
14
+ return result;
15
+ }
16
+ async updateIncomeStatement(id, patch, context) {
17
+ const { domain, user, tx } = context.state;
18
+ const repository = tx.getRepository(income_statement_1.IncomeStatement);
19
+ const incomeStatement = await repository.findOne({
20
+ where: { domain: { id: domain.id }, id }
21
+ });
22
+ const result = await repository.save(Object.assign(Object.assign(Object.assign({}, incomeStatement), patch), { updater: user }));
23
+ return result;
24
+ }
25
+ async updateMultipleIncomeStatement(patches, context) {
26
+ const { domain, user, tx } = context.state;
27
+ let results = [];
28
+ const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
29
+ const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
30
+ const incomeStatementRepo = tx.getRepository(income_statement_1.IncomeStatement);
31
+ if (_createRecords.length > 0) {
32
+ for (let i = 0; i < _createRecords.length; i++) {
33
+ const newRecord = _createRecords[i];
34
+ const result = await incomeStatementRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
35
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
36
+ }
37
+ }
38
+ if (_updateRecords.length > 0) {
39
+ for (let i = 0; i < _updateRecords.length; i++) {
40
+ const updateRecord = _updateRecords[i];
41
+ const incomeStatement = await incomeStatementRepo.findOneBy({ id: updateRecord.id });
42
+ const result = await incomeStatementRepo.save(Object.assign(Object.assign(Object.assign({}, incomeStatement), updateRecord), { updater: user }));
43
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
44
+ }
45
+ }
46
+ return results;
47
+ }
48
+ async deleteIncomeStatement(id, context) {
49
+ const { domain, tx } = context.state;
50
+ await tx.getRepository(income_statement_1.IncomeStatement).delete({ domain: { id: domain.id }, id });
51
+ await (0, attachment_base_1.deleteAttachmentsByRef)(null, { refBys: [id] }, context);
52
+ return true;
53
+ }
54
+ async deleteIncomeStatements(ids, context) {
55
+ const { domain, tx } = context.state;
56
+ await tx.getRepository(income_statement_1.IncomeStatement).delete({
57
+ domain: { id: domain.id },
58
+ id: (0, typeorm_1.In)(ids)
59
+ });
60
+ await (0, attachment_base_1.deleteAttachmentsByRef)(null, { refBys: ids }, context);
61
+ return true;
62
+ }
63
+ async importIncomeStatements(incomeStatements, context) {
64
+ const { domain, tx } = context.state;
65
+ await Promise.all(incomeStatements.map(async (incomeStatement) => {
66
+ const createdIncomeStatement = await tx
67
+ .getRepository(income_statement_1.IncomeStatement)
68
+ .save(Object.assign({ domain }, incomeStatement));
69
+ }));
70
+ return true;
71
+ }
72
+ };
73
+ tslib_1.__decorate([
74
+ (0, type_graphql_1.Directive)('@transaction'),
75
+ (0, type_graphql_1.Mutation)(returns => income_statement_1.IncomeStatement, { description: 'To create new IncomeStatement' }),
76
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('incomeStatement')),
77
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
78
+ tslib_1.__metadata("design:type", Function),
79
+ tslib_1.__metadata("design:paramtypes", [income_statement_type_1.NewIncomeStatement, Object]),
80
+ tslib_1.__metadata("design:returntype", Promise)
81
+ ], IncomeStatementMutation.prototype, "createIncomeStatement", null);
82
+ tslib_1.__decorate([
83
+ (0, type_graphql_1.Directive)('@transaction'),
84
+ (0, type_graphql_1.Mutation)(returns => income_statement_1.IncomeStatement, { description: 'To modify IncomeStatement information' }),
85
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
86
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
87
+ tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
88
+ tslib_1.__metadata("design:type", Function),
89
+ tslib_1.__metadata("design:paramtypes", [String, income_statement_type_1.IncomeStatementPatch, Object]),
90
+ tslib_1.__metadata("design:returntype", Promise)
91
+ ], IncomeStatementMutation.prototype, "updateIncomeStatement", null);
92
+ tslib_1.__decorate([
93
+ (0, type_graphql_1.Directive)('@transaction'),
94
+ (0, type_graphql_1.Mutation)(returns => [income_statement_1.IncomeStatement], { description: "To modify multiple IncomeStatements' information" }),
95
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [income_statement_type_1.IncomeStatementPatch])),
96
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
97
+ tslib_1.__metadata("design:type", Function),
98
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
99
+ tslib_1.__metadata("design:returntype", Promise)
100
+ ], IncomeStatementMutation.prototype, "updateMultipleIncomeStatement", null);
101
+ tslib_1.__decorate([
102
+ (0, type_graphql_1.Directive)('@transaction'),
103
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete IncomeStatement' }),
104
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
105
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
106
+ tslib_1.__metadata("design:type", Function),
107
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
108
+ tslib_1.__metadata("design:returntype", Promise)
109
+ ], IncomeStatementMutation.prototype, "deleteIncomeStatement", null);
110
+ tslib_1.__decorate([
111
+ (0, type_graphql_1.Directive)('@transaction'),
112
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple IncomeStatements' }),
113
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
114
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
115
+ tslib_1.__metadata("design:type", Function),
116
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
117
+ tslib_1.__metadata("design:returntype", Promise)
118
+ ], IncomeStatementMutation.prototype, "deleteIncomeStatements", null);
119
+ tslib_1.__decorate([
120
+ (0, type_graphql_1.Directive)('@transaction'),
121
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To import multiple IncomeStatements' }),
122
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('incomeStatements', type => [income_statement_type_1.IncomeStatementPatch])),
123
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
124
+ tslib_1.__metadata("design:type", Function),
125
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
126
+ tslib_1.__metadata("design:returntype", Promise)
127
+ ], IncomeStatementMutation.prototype, "importIncomeStatements", null);
128
+ IncomeStatementMutation = tslib_1.__decorate([
129
+ (0, type_graphql_1.Resolver)(income_statement_1.IncomeStatement)
130
+ ], IncomeStatementMutation);
131
+ exports.IncomeStatementMutation = IncomeStatementMutation;
132
+ //# sourceMappingURL=income-statement-mutation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"income-statement-mutation.js","sourceRoot":"","sources":["../../../server/service/income-statement/income-statement-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,qEAA0F;AAE1F,yDAAoD;AACpD,mEAAkF;AAG3E,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAG5B,AAAN,KAAK,CAAC,qBAAqB,CACD,eAAmC,EACpD,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,aAAa,CA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IK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,qCAAqC,EAAE,CAAC;IAElF,mBAAA,IAAA,kBAAG,EAAC,kBAAkB,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,4CAAoB,CAAC,CAAC,CAAA;IACvD,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;qEAaP;AAtIU,uBAAuB;IADnC,IAAA,uBAAQ,EAAC,kCAAe,CAAC;GACb,uBAAuB,CAuInC;AAvIY,0DAAuB","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { createAttachment, deleteAttachmentsByRef } from '@things-factory/attachment-base'\n\nimport { IncomeStatement } from './income-statement'\nimport { NewIncomeStatement, IncomeStatementPatch } from './income-statement-type'\n\n@Resolver(IncomeStatement)\nexport class IncomeStatementMutation {\n @Directive('@transaction')\n @Mutation(returns => IncomeStatement, { description: 'To create new IncomeStatement' })\n async createIncomeStatement(\n @Arg('incomeStatement') incomeStatement: NewIncomeStatement,\n @Ctx() context: ResolverContext\n ): Promise<IncomeStatement> {\n const { domain, user, tx } = context.state\n\n const result = await tx.getRepository(IncomeStatement).save({\n ...incomeStatement,\n domain,\n creator: user,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => IncomeStatement, { description: 'To modify IncomeStatement information' })\n async updateIncomeStatement(\n @Arg('id') id: string,\n @Arg('patch') patch: IncomeStatementPatch,\n @Ctx() context: ResolverContext\n ): Promise<IncomeStatement> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(IncomeStatement)\n const incomeStatement = await repository.findOne({\n where: { domain: { id: domain.id }, id }\n })\n\n const result = await repository.save({\n ...incomeStatement,\n ...patch,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => [IncomeStatement], { description: \"To modify multiple IncomeStatements' information\" })\n async updateMultipleIncomeStatement(\n @Arg('patches', type => [IncomeStatementPatch]) patches: IncomeStatementPatch[],\n @Ctx() context: ResolverContext\n ): Promise<IncomeStatement[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const incomeStatementRepo = tx.getRepository(IncomeStatement)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await incomeStatementRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const incomeStatement = await incomeStatementRepo.findOneBy({ id: updateRecord.id })\n\n const result = await incomeStatementRepo.save({\n ...incomeStatement,\n ...updateRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete IncomeStatement' })\n async deleteIncomeStatement(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(IncomeStatement).delete({ domain: { id: domain.id }, id })\n await deleteAttachmentsByRef(null, { refBys: [id] }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple IncomeStatements' })\n async deleteIncomeStatements(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(IncomeStatement).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n await deleteAttachmentsByRef(null, { refBys: ids }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To import multiple IncomeStatements' })\n async importIncomeStatements(\n @Arg('incomeStatements', type => [IncomeStatementPatch]) incomeStatements: IncomeStatementPatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await Promise.all(\n incomeStatements.map(async (incomeStatement: IncomeStatementPatch) => {\n const createdIncomeStatement: IncomeStatement = await tx\n .getRepository(IncomeStatement)\n .save({ domain, ...incomeStatement })\n })\n )\n\n return true\n }\n}\n"]}
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IncomeStatementQuery = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const shell_1 = require("@things-factory/shell");
7
+ const auth_base_1 = require("@things-factory/auth-base");
8
+ const income_statement_1 = require("./income-statement");
9
+ const income_statement_type_1 = require("./income-statement-type");
10
+ let IncomeStatementQuery = class IncomeStatementQuery {
11
+ async incomeStatement(id, context) {
12
+ const { domain } = context.state;
13
+ return await (0, shell_1.getRepository)(income_statement_1.IncomeStatement).findOne({
14
+ where: { domain: { id: domain.id }, id }
15
+ });
16
+ }
17
+ async incomeStatements(params, context) {
18
+ const { domain } = context.state;
19
+ const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
20
+ domain,
21
+ params,
22
+ repository: await (0, shell_1.getRepository)(income_statement_1.IncomeStatement),
23
+ searchables: ['name', 'description']
24
+ });
25
+ const [items, total] = await queryBuilder.getManyAndCount();
26
+ return { items, total };
27
+ }
28
+ async domain(incomeStatement) {
29
+ return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: incomeStatement.domainId });
30
+ }
31
+ async updater(incomeStatement) {
32
+ return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: incomeStatement.updaterId });
33
+ }
34
+ async creator(incomeStatement) {
35
+ return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: incomeStatement.creatorId });
36
+ }
37
+ };
38
+ tslib_1.__decorate([
39
+ (0, type_graphql_1.Query)(returns => income_statement_1.IncomeStatement, { nullable: true, description: 'To fetch a IncomeStatement' }),
40
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
41
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
42
+ tslib_1.__metadata("design:type", Function),
43
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
44
+ tslib_1.__metadata("design:returntype", Promise)
45
+ ], IncomeStatementQuery.prototype, "incomeStatement", null);
46
+ tslib_1.__decorate([
47
+ (0, type_graphql_1.Query)(returns => income_statement_type_1.IncomeStatementList, { description: 'To fetch multiple IncomeStatements' }),
48
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
49
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
50
+ tslib_1.__metadata("design:type", Function),
51
+ tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
52
+ tslib_1.__metadata("design:returntype", Promise)
53
+ ], IncomeStatementQuery.prototype, "incomeStatements", null);
54
+ tslib_1.__decorate([
55
+ (0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
56
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
57
+ tslib_1.__metadata("design:type", Function),
58
+ tslib_1.__metadata("design:paramtypes", [income_statement_1.IncomeStatement]),
59
+ tslib_1.__metadata("design:returntype", Promise)
60
+ ], IncomeStatementQuery.prototype, "domain", null);
61
+ tslib_1.__decorate([
62
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
63
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
64
+ tslib_1.__metadata("design:type", Function),
65
+ tslib_1.__metadata("design:paramtypes", [income_statement_1.IncomeStatement]),
66
+ tslib_1.__metadata("design:returntype", Promise)
67
+ ], IncomeStatementQuery.prototype, "updater", null);
68
+ tslib_1.__decorate([
69
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
70
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
71
+ tslib_1.__metadata("design:type", Function),
72
+ tslib_1.__metadata("design:paramtypes", [income_statement_1.IncomeStatement]),
73
+ tslib_1.__metadata("design:returntype", Promise)
74
+ ], IncomeStatementQuery.prototype, "creator", null);
75
+ IncomeStatementQuery = tslib_1.__decorate([
76
+ (0, type_graphql_1.Resolver)(income_statement_1.IncomeStatement)
77
+ ], IncomeStatementQuery);
78
+ exports.IncomeStatementQuery = IncomeStatementQuery;
79
+ //# sourceMappingURL=income-statement-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"income-statement-query.js","sourceRoot":"","sources":["../../../server/service/income-statement/income-statement-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAgD;AAChD,yDAAoD;AACpD,mEAA6D;AAGtD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAEzB,AAAN,KAAK,CAAC,eAAe,CAAY,EAAU,EAAS,OAAwB;QAC1E,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,kCAAe,CAAC,CAAC,OAAO,CAAC;YAClD,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,gBAAgB,CAAS,MAAiB,EAAS,OAAwB;QAC/E,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,kCAAe,CAAC;YAChD,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE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BAAI,GAAE,CAAA;;6CAAkB,kCAAe;;mDAErD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAkB,kCAAe;;mDAErD;AAvCU,oBAAoB;IADhC,IAAA,uBAAQ,EAAC,kCAAe,CAAC;GACb,oBAAoB,CAwChC;AAxCY,oDAAoB","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { IncomeStatement } from './income-statement'\nimport { IncomeStatementList } from './income-statement-type'\n\n@Resolver(IncomeStatement)\nexport class IncomeStatementQuery {\n @Query(returns => IncomeStatement!, { nullable: true, description: 'To fetch a IncomeStatement' })\n async incomeStatement(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<IncomeStatement> {\n const { domain } = context.state\n\n return await getRepository(IncomeStatement).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => IncomeStatementList, { description: 'To fetch multiple IncomeStatements' })\n async incomeStatements(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<IncomeStatementList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(IncomeStatement),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() incomeStatement: IncomeStatement): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: incomeStatement.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() incomeStatement: IncomeStatement): Promise<User> {\n return await getRepository(User).findOneBy({ id: incomeStatement.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() incomeStatement: IncomeStatement): Promise<User> {\n return await getRepository(User).findOneBy({ id: incomeStatement.creatorId })\n }\n}\n"]}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IncomeStatementList = exports.IncomeStatementPatch = exports.NewIncomeStatement = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const income_statement_1 = require("./income-statement");
7
+ let NewIncomeStatement = class NewIncomeStatement {
8
+ };
9
+ tslib_1.__decorate([
10
+ (0, type_graphql_1.Field)(),
11
+ tslib_1.__metadata("design:type", String)
12
+ ], NewIncomeStatement.prototype, "name", void 0);
13
+ tslib_1.__decorate([
14
+ (0, type_graphql_1.Field)({ nullable: true }),
15
+ tslib_1.__metadata("design:type", String)
16
+ ], NewIncomeStatement.prototype, "description", void 0);
17
+ tslib_1.__decorate([
18
+ (0, type_graphql_1.Field)(type => income_statement_1.IncomeStatementStatus, { nullable: true }),
19
+ tslib_1.__metadata("design:type", String)
20
+ ], NewIncomeStatement.prototype, "state", void 0);
21
+ tslib_1.__decorate([
22
+ (0, type_graphql_1.Field)({ nullable: true }),
23
+ tslib_1.__metadata("design:type", Boolean)
24
+ ], NewIncomeStatement.prototype, "active", void 0);
25
+ tslib_1.__decorate([
26
+ (0, type_graphql_1.Field)({ nullable: true }),
27
+ tslib_1.__metadata("design:type", String)
28
+ ], NewIncomeStatement.prototype, "params", void 0);
29
+ NewIncomeStatement = tslib_1.__decorate([
30
+ (0, type_graphql_1.InputType)()
31
+ ], NewIncomeStatement);
32
+ exports.NewIncomeStatement = NewIncomeStatement;
33
+ let IncomeStatementPatch = class IncomeStatementPatch {
34
+ };
35
+ tslib_1.__decorate([
36
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
37
+ tslib_1.__metadata("design:type", String)
38
+ ], IncomeStatementPatch.prototype, "id", void 0);
39
+ tslib_1.__decorate([
40
+ (0, type_graphql_1.Field)({ nullable: true }),
41
+ tslib_1.__metadata("design:type", String)
42
+ ], IncomeStatementPatch.prototype, "name", void 0);
43
+ tslib_1.__decorate([
44
+ (0, type_graphql_1.Field)({ nullable: true }),
45
+ tslib_1.__metadata("design:type", String)
46
+ ], IncomeStatementPatch.prototype, "description", void 0);
47
+ tslib_1.__decorate([
48
+ (0, type_graphql_1.Field)(type => income_statement_1.IncomeStatementStatus, { nullable: true }),
49
+ tslib_1.__metadata("design:type", String)
50
+ ], IncomeStatementPatch.prototype, "state", void 0);
51
+ tslib_1.__decorate([
52
+ (0, type_graphql_1.Field)({ nullable: true }),
53
+ tslib_1.__metadata("design:type", Boolean)
54
+ ], IncomeStatementPatch.prototype, "active", void 0);
55
+ tslib_1.__decorate([
56
+ (0, type_graphql_1.Field)({ nullable: true }),
57
+ tslib_1.__metadata("design:type", String)
58
+ ], IncomeStatementPatch.prototype, "cuFlag", void 0);
59
+ IncomeStatementPatch = tslib_1.__decorate([
60
+ (0, type_graphql_1.InputType)()
61
+ ], IncomeStatementPatch);
62
+ exports.IncomeStatementPatch = IncomeStatementPatch;
63
+ let IncomeStatementList = class IncomeStatementList {
64
+ };
65
+ tslib_1.__decorate([
66
+ (0, type_graphql_1.Field)(type => [income_statement_1.IncomeStatement]),
67
+ tslib_1.__metadata("design:type", Array)
68
+ ], IncomeStatementList.prototype, "items", void 0);
69
+ tslib_1.__decorate([
70
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
71
+ tslib_1.__metadata("design:type", Number)
72
+ ], IncomeStatementList.prototype, "total", void 0);
73
+ IncomeStatementList = tslib_1.__decorate([
74
+ (0, type_graphql_1.ObjectType)()
75
+ ], IncomeStatementList);
76
+ exports.IncomeStatementList = IncomeStatementList;
77
+ //# sourceMappingURL=income-statement-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"income-statement-type.js","sourceRoot":"","sources":["../../../server/service/income-statement/income-statement-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,yDAA2E;AAGpE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAe9B,CAAA;AAd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,CAAC,EAAE,CAAC,CAAC,kCAAe,CAAC,CAAC;;kDACT;AAExB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;kDACN;AALF,mBAAmB;IAD/B,IAAA,yBAAU,GAAE;GACA,mBAAmB,CAM/B;AANY,kDAAmB","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { IncomeStatement, IncomeStatementStatus } from './income-statement'\n\n@InputType()\nexport class NewIncomeStatement {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => IncomeStatementStatus, { nullable: true })\n state?: IncomeStatementStatus\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n params?: string\n}\n\n@InputType()\nexport class IncomeStatementPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => IncomeStatementStatus, { nullable: true })\n state?: IncomeStatementStatus\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class IncomeStatementList {\n @Field(type => [IncomeStatement])\n items: IncomeStatement[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IncomeStatement = exports.IncomeStatementStatus = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const type_graphql_1 = require("type-graphql");
7
+ const shell_1 = require("@things-factory/shell");
8
+ const auth_base_1 = require("@things-factory/auth-base");
9
+ var IncomeStatementStatus;
10
+ (function (IncomeStatementStatus) {
11
+ IncomeStatementStatus["STATUS_A"] = "STATUS_A";
12
+ IncomeStatementStatus["STATUS_B"] = "STATUS_B";
13
+ })(IncomeStatementStatus = exports.IncomeStatementStatus || (exports.IncomeStatementStatus = {}));
14
+ (0, type_graphql_1.registerEnumType)(IncomeStatementStatus, {
15
+ name: 'IncomeStatementStatus',
16
+ description: 'state enumeration of a incomeStatement'
17
+ });
18
+ // 손익계산서
19
+ let IncomeStatement = class IncomeStatement {
20
+ constructor() {
21
+ this.version = 1;
22
+ }
23
+ };
24
+ tslib_1.__decorate([
25
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
26
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
27
+ tslib_1.__metadata("design:type", String)
28
+ ], IncomeStatement.prototype, "id", void 0);
29
+ tslib_1.__decorate([
30
+ (0, typeorm_1.VersionColumn)(),
31
+ (0, type_graphql_1.Field)({ nullable: true }),
32
+ tslib_1.__metadata("design:type", Number)
33
+ ], IncomeStatement.prototype, "version", void 0);
34
+ tslib_1.__decorate([
35
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
36
+ (0, type_graphql_1.Field)({ nullable: true }),
37
+ tslib_1.__metadata("design:type", shell_1.Domain)
38
+ ], IncomeStatement.prototype, "domain", void 0);
39
+ tslib_1.__decorate([
40
+ (0, typeorm_1.RelationId)((incomeStatement) => incomeStatement.domain),
41
+ tslib_1.__metadata("design:type", String)
42
+ ], IncomeStatement.prototype, "domainId", void 0);
43
+ tslib_1.__decorate([
44
+ (0, typeorm_1.Column)({ nullable: true }),
45
+ (0, type_graphql_1.Field)({ nullable: true, description: 'fiscal year' }),
46
+ tslib_1.__metadata("design:type", Number)
47
+ ], IncomeStatement.prototype, "year", void 0);
48
+ tslib_1.__decorate([
49
+ (0, typeorm_1.Column)({ nullable: true }),
50
+ (0, type_graphql_1.Field)({ nullable: true, description: 'fiscal quarter' }),
51
+ tslib_1.__metadata("design:type", Number)
52
+ ], IncomeStatement.prototype, "quarter", void 0);
53
+ tslib_1.__decorate([
54
+ (0, typeorm_1.Column)({ nullable: true }),
55
+ (0, type_graphql_1.Field)({ nullable: true }),
56
+ tslib_1.__metadata("design:type", Number)
57
+ ], IncomeStatement.prototype, "month", void 0);
58
+ tslib_1.__decorate([
59
+ (0, typeorm_1.Column)({ nullable: true }),
60
+ (0, type_graphql_1.Field)({ nullable: true }),
61
+ tslib_1.__metadata("design:type", Number)
62
+ ], IncomeStatement.prototype, "revenue", void 0);
63
+ tslib_1.__decorate([
64
+ (0, typeorm_1.Column)({ nullable: true }),
65
+ (0, type_graphql_1.Field)({ nullable: true }),
66
+ tslib_1.__metadata("design:type", Number)
67
+ ], IncomeStatement.prototype, "expense", void 0);
68
+ tslib_1.__decorate([
69
+ (0, typeorm_1.Column)({ nullable: true }),
70
+ (0, type_graphql_1.Field)({ nullable: true }),
71
+ tslib_1.__metadata("design:type", Number)
72
+ ], IncomeStatement.prototype, "netIncome", void 0);
73
+ tslib_1.__decorate([
74
+ (0, typeorm_1.Column)({ nullable: true }),
75
+ (0, type_graphql_1.Field)({ nullable: true }),
76
+ tslib_1.__metadata("design:type", Boolean)
77
+ ], IncomeStatement.prototype, "active", void 0);
78
+ tslib_1.__decorate([
79
+ (0, typeorm_1.CreateDateColumn)(),
80
+ (0, type_graphql_1.Field)({ nullable: true }),
81
+ tslib_1.__metadata("design:type", Date)
82
+ ], IncomeStatement.prototype, "createdAt", void 0);
83
+ tslib_1.__decorate([
84
+ (0, typeorm_1.UpdateDateColumn)(),
85
+ (0, type_graphql_1.Field)({ nullable: true }),
86
+ tslib_1.__metadata("design:type", Date)
87
+ ], IncomeStatement.prototype, "updatedAt", void 0);
88
+ tslib_1.__decorate([
89
+ (0, typeorm_1.DeleteDateColumn)(),
90
+ (0, type_graphql_1.Field)({ nullable: true }),
91
+ tslib_1.__metadata("design:type", Date)
92
+ ], IncomeStatement.prototype, "deletedAt", void 0);
93
+ tslib_1.__decorate([
94
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
95
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
96
+ tslib_1.__metadata("design:type", auth_base_1.User)
97
+ ], IncomeStatement.prototype, "creator", void 0);
98
+ tslib_1.__decorate([
99
+ (0, typeorm_1.RelationId)((incomeStatement) => incomeStatement.creator),
100
+ tslib_1.__metadata("design:type", String)
101
+ ], IncomeStatement.prototype, "creatorId", void 0);
102
+ tslib_1.__decorate([
103
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
104
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
105
+ tslib_1.__metadata("design:type", auth_base_1.User)
106
+ ], IncomeStatement.prototype, "updater", void 0);
107
+ tslib_1.__decorate([
108
+ (0, typeorm_1.RelationId)((incomeStatement) => incomeStatement.updater),
109
+ tslib_1.__metadata("design:type", String)
110
+ ], IncomeStatement.prototype, "updaterId", void 0);
111
+ IncomeStatement = tslib_1.__decorate([
112
+ (0, typeorm_1.Entity)(),
113
+ (0, typeorm_1.Index)('ix_income_statement_0', (incomeStatement) => [incomeStatement.domain, incomeStatement.deletedAt], { unique: true }),
114
+ (0, type_graphql_1.ObjectType)({ description: 'Entity for IncomeStatement' })
115
+ ], IncomeStatement);
116
+ exports.IncomeStatement = IncomeStatement;
117
+ //# sourceMappingURL=income-statement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"income-statement.js","sourceRoot":"","sources":["../../../server/service/income-statement/income-statement.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAEhD,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;AACvB,CAAC,EAHW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAGhC;AAED,IAAA,+BAAgB,EAAC,qBAAqB,EAAE;IACtC,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,wCAAwC;CACtD,CAAC,CAAA;AAEF,QAAQ;AAQD,IAAM,eAAe,GAArB,MAAM,eAAe;IAArB;QAOL,YAAO,GAAY,CAAC,CAAA;IA8DtB,CAAC;CAAA,CAAA;AApEC;IAAC,IAAA,gCAAsB,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DACxD;AApEP,eAAe;IAP3B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,uBAAuB,EACvB,CAAC,eAAgC,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,eAAe,CAAC,SAAS,CAAC,EACzF,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;GAC7C,eAAe,CAqE3B;AArEY,0CAAe","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn,\n VersionColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nexport enum IncomeStatementStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(IncomeStatementStatus, {\n name: 'IncomeStatementStatus',\n description: 'state enumeration of a incomeStatement'\n})\n\n// 손익계산서\n@Entity()\n@Index(\n 'ix_income_statement_0',\n (incomeStatement: IncomeStatement) => [incomeStatement.domain, incomeStatement.deletedAt],\n { unique: true }\n)\n@ObjectType({ description: 'Entity for IncomeStatement' })\nexport class IncomeStatement {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @VersionColumn()\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((incomeStatement: IncomeStatement) => incomeStatement.domain)\n domainId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'fiscal year' })\n year?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'fiscal quarter' })\n quarter?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n month?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n revenue?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n expense?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n netIncome?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active?: boolean\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((incomeStatement: IncomeStatement) => incomeStatement.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((incomeStatement: IncomeStatement) => incomeStatement.updater)\n updaterId?: string\n}\n"]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.subscribers = exports.resolvers = exports.entities = void 0;
4
+ const income_statement_1 = require("./income-statement");
5
+ const income_statement_history_1 = require("./income-statement-history");
6
+ const income_statement_query_1 = require("./income-statement-query");
7
+ const income_statement_mutation_1 = require("./income-statement-mutation");
8
+ const event_subscriber_1 = require("./event-subscriber");
9
+ exports.entities = [income_statement_1.IncomeStatement, income_statement_history_1.IncomeStatementHistory];
10
+ exports.resolvers = [income_statement_query_1.IncomeStatementQuery, income_statement_mutation_1.IncomeStatementMutation];
11
+ exports.subscribers = [event_subscriber_1.IncomeStatementHistoryEntitySubscriber];
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/income-statement/index.ts"],"names":[],"mappings":";;;AAAA,yDAAoD;AACpD,yEAAmE;AACnE,qEAA+D;AAC/D,2EAAqE;AACrE,yDAA2E;AAE9D,QAAA,QAAQ,GAAG,CAAC,kCAAe,EAAE,iDAAsB,CAAC,CAAA;AACpD,QAAA,SAAS,GAAG,CAAC,6CAAoB,EAAE,mDAAuB,CAAC,CAAA;AAC3D,QAAA,WAAW,GAAG,CAAC,yDAAsC,CAAC,CAAA","sourcesContent":["import { IncomeStatement } from './income-statement'\nimport { IncomeStatementHistory } from './income-statement-history'\nimport { IncomeStatementQuery } from './income-statement-query'\nimport { IncomeStatementMutation } from './income-statement-mutation'\nimport { IncomeStatementHistoryEntitySubscriber } from './event-subscriber'\n\nexport const entities = [IncomeStatement, IncomeStatementHistory]\nexport const resolvers = [IncomeStatementQuery, IncomeStatementMutation]\nexport const subscribers = [IncomeStatementHistoryEntitySubscriber]\n"]}