@things-factory/accounting 10.1.134 → 10.1.135

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 (234) hide show
  1. package/dist-client/route.d.ts +1 -1
  2. package/dist-client/route.js +0 -12
  3. package/dist-client/route.js.map +1 -1
  4. package/dist-client/tsconfig.tsbuildinfo +1 -1
  5. package/dist-server/index.d.ts +0 -1
  6. package/dist-server/index.js +0 -1
  7. package/dist-server/index.js.map +1 -1
  8. package/dist-server/service/account/account-history.d.ts +13 -6
  9. package/dist-server/service/account/account-history.js +44 -17
  10. package/dist-server/service/account/account-history.js.map +1 -1
  11. package/dist-server/service/account/account-mutation.js +2 -2
  12. package/dist-server/service/account/account-mutation.js.map +1 -1
  13. package/dist-server/service/account/account-type.d.ts +16 -0
  14. package/dist-server/service/account/account-type.js +71 -13
  15. package/dist-server/service/account/account-type.js.map +1 -1
  16. package/dist-server/service/account/account.d.ts +9 -3
  17. package/dist-server/service/account/account.js +34 -8
  18. package/dist-server/service/account/account.js.map +1 -1
  19. package/dist-server/service/accounting-category/accounting-category-mutation.js +2 -2
  20. package/dist-server/service/accounting-category/accounting-category-mutation.js.map +1 -1
  21. package/dist-server/service/accounting-document/accounting-document-mutation.js +12 -3
  22. package/dist-server/service/accounting-document/accounting-document-mutation.js.map +1 -1
  23. package/dist-server/service/accounting-document/accounting-document-query.js +2 -0
  24. package/dist-server/service/accounting-document/accounting-document-query.js.map +1 -1
  25. package/dist-server/service/bank-account/bank-account-history.d.ts +11 -14
  26. package/dist-server/service/bank-account/bank-account-history.js +46 -59
  27. package/dist-server/service/bank-account/bank-account-history.js.map +1 -1
  28. package/dist-server/service/bank-account/bank-account-mutation.d.ts +1 -2
  29. package/dist-server/service/bank-account/bank-account-mutation.js +25 -69
  30. package/dist-server/service/bank-account/bank-account-mutation.js.map +1 -1
  31. package/dist-server/service/bank-account/bank-account-query.js +2 -0
  32. package/dist-server/service/bank-account/bank-account-query.js.map +1 -1
  33. package/dist-server/service/bank-account/bank-account-service.d.ts +5 -0
  34. package/dist-server/service/bank-account/bank-account-service.js +21 -0
  35. package/dist-server/service/bank-account/bank-account-service.js.map +1 -0
  36. package/dist-server/service/bank-account/bank-account-type.d.ts +13 -19
  37. package/dist-server/service/bank-account/bank-account-type.js +45 -69
  38. package/dist-server/service/bank-account/bank-account-type.js.map +1 -1
  39. package/dist-server/service/bank-account/bank-account.d.ts +14 -17
  40. package/dist-server/service/bank-account/bank-account.js +45 -57
  41. package/dist-server/service/bank-account/bank-account.js.map +1 -1
  42. package/dist-server/service/bank-statement/bank-statement-query.d.ts +14 -0
  43. package/dist-server/service/bank-statement/bank-statement-query.js +92 -0
  44. package/dist-server/service/bank-statement/bank-statement-query.js.map +1 -0
  45. package/dist-server/service/bank-statement/bank-statement.d.ts +26 -0
  46. package/dist-server/service/bank-statement/bank-statement.js +109 -0
  47. package/dist-server/service/bank-statement/bank-statement.js.map +1 -0
  48. package/dist-server/service/bank-statement/index.d.ts +5 -0
  49. package/dist-server/service/bank-statement/index.js +9 -0
  50. package/dist-server/service/bank-statement/index.js.map +1 -0
  51. package/dist-server/service/cash-flow-type.d.ts +5 -0
  52. package/dist-server/service/cash-flow-type.js +15 -0
  53. package/dist-server/service/cash-flow-type.js.map +1 -0
  54. package/dist-server/service/financial-institution/financial-institution-mutation.js +10 -1
  55. package/dist-server/service/financial-institution/financial-institution-mutation.js.map +1 -1
  56. package/dist-server/service/financial-institution/financial-institution-query.js +14 -6
  57. package/dist-server/service/financial-institution/financial-institution-query.js.map +1 -1
  58. package/dist-server/service/financial-institution/index.d.ts +1 -1
  59. package/dist-server/service/financial-statement/financial-statement-history.d.ts +11 -9
  60. package/dist-server/service/financial-statement/financial-statement-history.js +47 -36
  61. package/dist-server/service/financial-statement/financial-statement-history.js.map +1 -1
  62. package/dist-server/service/financial-statement/financial-statement-line.d.ts +24 -0
  63. package/dist-server/service/financial-statement/financial-statement-line.js +108 -0
  64. package/dist-server/service/financial-statement/financial-statement-line.js.map +1 -0
  65. package/dist-server/service/financial-statement/financial-statement-mutation.d.ts +1 -8
  66. package/dist-server/service/financial-statement/financial-statement-mutation.js +10 -135
  67. package/dist-server/service/financial-statement/financial-statement-mutation.js.map +1 -1
  68. package/dist-server/service/financial-statement/financial-statement-query.d.ts +8 -7
  69. package/dist-server/service/financial-statement/financial-statement-query.js +40 -30
  70. package/dist-server/service/financial-statement/financial-statement-query.js.map +1 -1
  71. package/dist-server/service/financial-statement/financial-statement-service.d.ts +33 -0
  72. package/dist-server/service/financial-statement/financial-statement-service.js +44 -0
  73. package/dist-server/service/financial-statement/financial-statement-service.js.map +1 -0
  74. package/dist-server/service/financial-statement/financial-statement.d.ts +19 -11
  75. package/dist-server/service/financial-statement/financial-statement.js +73 -65
  76. package/dist-server/service/financial-statement/financial-statement.js.map +1 -1
  77. package/dist-server/service/financial-statement/index.d.ts +3 -2
  78. package/dist-server/service/financial-statement/index.js +2 -2
  79. package/dist-server/service/financial-statement/index.js.map +1 -1
  80. package/dist-server/service/index.d.ts +15 -3
  81. package/dist-server/service/index.js +30 -13
  82. package/dist-server/service/index.js.map +1 -1
  83. package/dist-server/service/payment/index.d.ts +1 -0
  84. package/dist-server/service/payment/index.js +1 -0
  85. package/dist-server/service/payment/index.js.map +1 -1
  86. package/dist-server/service/payment/payment-history.d.ts +9 -16
  87. package/dist-server/service/payment/payment-history.js +36 -70
  88. package/dist-server/service/payment/payment-history.js.map +1 -1
  89. package/dist-server/service/payment/payment-mutation.d.ts +0 -1
  90. package/dist-server/service/payment/payment-mutation.js +14 -79
  91. package/dist-server/service/payment/payment-mutation.js.map +1 -1
  92. package/dist-server/service/payment/payment-query.d.ts +3 -0
  93. package/dist-server/service/payment/payment-query.js +30 -1
  94. package/dist-server/service/payment/payment-query.js.map +1 -1
  95. package/dist-server/service/payment/payment-service.d.ts +16 -0
  96. package/dist-server/service/payment/payment-service.js +140 -0
  97. package/dist-server/service/payment/payment-service.js.map +1 -0
  98. package/dist-server/service/payment/payment-targets.d.ts +31 -0
  99. package/dist-server/service/payment/payment-targets.js +19 -0
  100. package/dist-server/service/payment/payment-targets.js.map +1 -0
  101. package/dist-server/service/payment/payment-type.d.ts +13 -17
  102. package/dist-server/service/payment/payment-type.js +35 -51
  103. package/dist-server/service/payment/payment-type.js.map +1 -1
  104. package/dist-server/service/payment/payment.d.ts +23 -22
  105. package/dist-server/service/payment/payment.js +66 -94
  106. package/dist-server/service/payment/payment.js.map +1 -1
  107. package/dist-server/service/payment/transfer-target.d.ts +1 -0
  108. package/dist-server/service/payment/transfer-target.js +43 -0
  109. package/dist-server/service/payment/transfer-target.js.map +1 -0
  110. package/dist-server/service/recurring-cash-item/index.d.ts +6 -0
  111. package/dist-server/service/recurring-cash-item/index.js +10 -0
  112. package/dist-server/service/recurring-cash-item/index.js.map +1 -0
  113. package/dist-server/service/recurring-cash-item/recurring-cash-item-mutation.d.ts +7 -0
  114. package/dist-server/service/recurring-cash-item/recurring-cash-item-mutation.js +63 -0
  115. package/dist-server/service/recurring-cash-item/recurring-cash-item-mutation.js.map +1 -0
  116. package/dist-server/service/recurring-cash-item/recurring-cash-item-query.d.ts +15 -0
  117. package/dist-server/service/recurring-cash-item/recurring-cash-item-query.js +101 -0
  118. package/dist-server/service/recurring-cash-item/recurring-cash-item-query.js.map +1 -0
  119. package/dist-server/service/recurring-cash-item/recurring-cash-item-service.d.ts +23 -0
  120. package/dist-server/service/recurring-cash-item/recurring-cash-item-service.js +91 -0
  121. package/dist-server/service/recurring-cash-item/recurring-cash-item-service.js.map +1 -0
  122. package/dist-server/service/recurring-cash-item/recurring-cash-item-type.d.ts +23 -0
  123. package/dist-server/service/recurring-cash-item/recurring-cash-item-type.js +85 -0
  124. package/dist-server/service/recurring-cash-item/recurring-cash-item-type.js.map +1 -0
  125. package/dist-server/service/recurring-cash-item/recurring-cash-item.d.ts +35 -0
  126. package/dist-server/service/recurring-cash-item/recurring-cash-item.js +142 -0
  127. package/dist-server/service/recurring-cash-item/recurring-cash-item.js.map +1 -0
  128. package/dist-server/service/recurring-cash-item/recurring-schedule.d.ts +36 -0
  129. package/dist-server/service/recurring-cash-item/recurring-schedule.js +41 -0
  130. package/dist-server/service/recurring-cash-item/recurring-schedule.js.map +1 -0
  131. package/dist-server/service/transaction/transaction-history.d.ts +42 -15
  132. package/dist-server/service/transaction/transaction-history.js +160 -54
  133. package/dist-server/service/transaction/transaction-history.js.map +1 -1
  134. package/dist-server/service/transaction/transaction-mutation.d.ts +0 -1
  135. package/dist-server/service/transaction/transaction-mutation.js +13 -78
  136. package/dist-server/service/transaction/transaction-mutation.js.map +1 -1
  137. package/dist-server/service/transaction/transaction-period.d.ts +16 -0
  138. package/dist-server/service/transaction/transaction-period.js +49 -0
  139. package/dist-server/service/transaction/transaction-period.js.map +1 -0
  140. package/dist-server/service/transaction/transaction-query.d.ts +12 -0
  141. package/dist-server/service/transaction/transaction-query.js +84 -2
  142. package/dist-server/service/transaction/transaction-query.js.map +1 -1
  143. package/dist-server/service/transaction/transaction-service.d.ts +30 -0
  144. package/dist-server/service/transaction/transaction-service.js +130 -0
  145. package/dist-server/service/transaction/transaction-service.js.map +1 -0
  146. package/dist-server/service/transaction/transaction-type.d.ts +39 -7
  147. package/dist-server/service/transaction/transaction-type.js +145 -23
  148. package/dist-server/service/transaction/transaction-type.js.map +1 -1
  149. package/dist-server/service/transaction/transaction.d.ts +58 -31
  150. package/dist-server/service/transaction/transaction.js +216 -102
  151. package/dist-server/service/transaction/transaction.js.map +1 -1
  152. package/dist-server/tsconfig.tsbuildinfo +1 -1
  153. package/package.json +5 -3
  154. package/things-factory.config.js +0 -4
  155. package/translations/en.json +34 -2
  156. package/translations/ja.json +0 -1
  157. package/translations/ko.json +34 -2
  158. package/translations/ms.json +0 -1
  159. package/translations/zh.json +0 -1
  160. package/dist-client/pages/account/account-importer.d.ts +0 -22
  161. package/dist-client/pages/account/account-importer.js +0 -99
  162. package/dist-client/pages/account/account-importer.js.map +0 -1
  163. package/dist-client/pages/account/account-list-page.d.ts +0 -57
  164. package/dist-client/pages/account/account-list-page.js +0 -306
  165. package/dist-client/pages/account/account-list-page.js.map +0 -1
  166. package/dist-client/pages/bank-account/bank-account-importer.d.ts +0 -23
  167. package/dist-client/pages/bank-account/bank-account-importer.js +0 -92
  168. package/dist-client/pages/bank-account/bank-account-importer.js.map +0 -1
  169. package/dist-client/pages/bank-account/bank-account-list-page.d.ts +0 -60
  170. package/dist-client/pages/bank-account/bank-account-list-page.js +0 -317
  171. package/dist-client/pages/bank-account/bank-account-list-page.js.map +0 -1
  172. package/dist-client/pages/financial-statement/financial-statement-importer.d.ts +0 -22
  173. package/dist-client/pages/financial-statement/financial-statement-importer.js +0 -99
  174. package/dist-client/pages/financial-statement/financial-statement-importer.js.map +0 -1
  175. package/dist-client/pages/financial-statement/financial-statement-list-page.d.ts +0 -57
  176. package/dist-client/pages/financial-statement/financial-statement-list-page.js +0 -280
  177. package/dist-client/pages/financial-statement/financial-statement-list-page.js.map +0 -1
  178. package/dist-client/pages/income-statement/income-statement-importer.d.ts +0 -22
  179. package/dist-client/pages/income-statement/income-statement-importer.js +0 -99
  180. package/dist-client/pages/income-statement/income-statement-importer.js.map +0 -1
  181. package/dist-client/pages/income-statement/income-statement-list-page.d.ts +0 -57
  182. package/dist-client/pages/income-statement/income-statement-list-page.js +0 -280
  183. package/dist-client/pages/income-statement/income-statement-list-page.js.map +0 -1
  184. package/dist-client/pages/payment/payment-importer.d.ts +0 -23
  185. package/dist-client/pages/payment/payment-importer.js +0 -92
  186. package/dist-client/pages/payment/payment-importer.js.map +0 -1
  187. package/dist-client/pages/payment/payment-list-page.d.ts +0 -60
  188. package/dist-client/pages/payment/payment-list-page.js +0 -317
  189. package/dist-client/pages/payment/payment-list-page.js.map +0 -1
  190. package/dist-client/pages/transaction/transaction-importer.d.ts +0 -22
  191. package/dist-client/pages/transaction/transaction-importer.js +0 -99
  192. package/dist-client/pages/transaction/transaction-importer.js.map +0 -1
  193. package/dist-client/pages/transaction/transaction-list-page.d.ts +0 -57
  194. package/dist-client/pages/transaction/transaction-list-page.js +0 -280
  195. package/dist-client/pages/transaction/transaction-list-page.js.map +0 -1
  196. package/dist-server/controllers/index.d.ts +0 -1
  197. package/dist-server/controllers/index.js +0 -5
  198. package/dist-server/controllers/index.js.map +0 -1
  199. package/dist-server/controllers/summary-statements.d.ts +0 -4
  200. package/dist-server/controllers/summary-statements.js +0 -149
  201. package/dist-server/controllers/summary-statements.js.map +0 -1
  202. package/dist-server/migrations/1725201567284-seed-country-codes.d.ts +0 -5
  203. package/dist-server/migrations/1725201567284-seed-country-codes.js +0 -255
  204. package/dist-server/migrations/1725201567284-seed-country-codes.js.map +0 -1
  205. package/dist-server/service/financial-statement/financial-statement-line-item.d.ts +0 -19
  206. package/dist-server/service/financial-statement/financial-statement-line-item.js +0 -95
  207. package/dist-server/service/financial-statement/financial-statement-line-item.js.map +0 -1
  208. package/dist-server/service/financial-statement/financial-statement-type.d.ts +0 -20
  209. package/dist-server/service/financial-statement/financial-statement-type.js +0 -77
  210. package/dist-server/service/financial-statement/financial-statement-type.js.map +0 -1
  211. package/dist-server/service/income-statement/event-subscriber.d.ts +0 -7
  212. package/dist-server/service/income-statement/event-subscriber.js +0 -21
  213. package/dist-server/service/income-statement/event-subscriber.js.map +0 -1
  214. package/dist-server/service/income-statement/income-statement-history.d.ts +0 -28
  215. package/dist-server/service/income-statement/income-statement-history.js +0 -146
  216. package/dist-server/service/income-statement/income-statement-history.js.map +0 -1
  217. package/dist-server/service/income-statement/income-statement-line-item.d.ts +0 -19
  218. package/dist-server/service/income-statement/income-statement-line-item.js +0 -97
  219. package/dist-server/service/income-statement/income-statement-line-item.js.map +0 -1
  220. package/dist-server/service/income-statement/income-statement-mutation.d.ts +0 -10
  221. package/dist-server/service/income-statement/income-statement-mutation.js +0 -159
  222. package/dist-server/service/income-statement/income-statement-mutation.js.map +0 -1
  223. package/dist-server/service/income-statement/income-statement-query.d.ts +0 -11
  224. package/dist-server/service/income-statement/income-statement-query.js +0 -81
  225. package/dist-server/service/income-statement/income-statement-query.js.map +0 -1
  226. package/dist-server/service/income-statement/income-statement-type.d.ts +0 -20
  227. package/dist-server/service/income-statement/income-statement-type.js +0 -77
  228. package/dist-server/service/income-statement/income-statement-type.js.map +0 -1
  229. package/dist-server/service/income-statement/income-statement.d.ts +0 -28
  230. package/dist-server/service/income-statement/income-statement.js +0 -137
  231. package/dist-server/service/income-statement/income-statement.js.map +0 -1
  232. package/dist-server/service/income-statement/index.d.ts +0 -8
  233. package/dist-server/service/income-statement/index.js +0 -13
  234. package/dist-server/service/income-statement/index.js.map +0 -1
@@ -1,25 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FinancialStatement = exports.FinancialStatementStatus = void 0;
3
+ exports.FinancialStatement = exports.FinancialStatementKind = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const typeorm_1 = require("typeorm");
6
6
  const type_graphql_1 = require("type-graphql");
7
7
  const shell_1 = require("@things-factory/shell");
8
8
  const auth_base_1 = require("@things-factory/auth-base");
9
- const financial_statement_line_item_1 = require("./financial-statement-line-item");
10
- var FinancialStatementStatus;
11
- (function (FinancialStatementStatus) {
12
- FinancialStatementStatus["STATUS_A"] = "STATUS_A";
13
- FinancialStatementStatus["STATUS_B"] = "STATUS_B";
14
- })(FinancialStatementStatus || (exports.FinancialStatementStatus = FinancialStatementStatus = {}));
15
- (0, type_graphql_1.registerEnumType)(FinancialStatementStatus, {
16
- name: 'FinancialStatementStatus',
17
- description: 'State enumeration of a financial statement' // 재무제표 상태 열거형
9
+ const financial_statement_line_1 = require("./financial-statement-line");
10
+ var FinancialStatementKind;
11
+ (function (FinancialStatementKind) {
12
+ FinancialStatementKind["BALANCE_SHEET"] = "BALANCE_SHEET";
13
+ FinancialStatementKind["INCOME_STATEMENT"] = "INCOME_STATEMENT";
14
+ FinancialStatementKind["COST_OF_GOODS"] = "COST_OF_GOODS";
15
+ })(FinancialStatementKind || (exports.FinancialStatementKind = FinancialStatementKind = {}));
16
+ (0, type_graphql_1.registerEnumType)(FinancialStatementKind, {
17
+ name: 'FinancialStatementKind',
18
+ description: 'Which statement - balance sheet, income statement, statement of cost of goods manufactured'
18
19
  });
19
- // 재무제표 (Financial Statement)
20
+ /**
21
+ * A financial statement of a fiscal year, line by line, as it was filed. Filing it again replaces it; what the books
22
+ * moved on the same lines is read beside it, not kept.
23
+ */
20
24
  let FinancialStatement = class FinancialStatement {
21
25
  constructor() {
22
- this.version = 1; // 낙관적 잠금을 위한 버전 관리 필드
26
+ this.version = 1;
23
27
  }
24
28
  };
25
29
  exports.FinancialStatement = FinancialStatement;
@@ -35,98 +39,102 @@ tslib_1.__decorate([
35
39
  ], FinancialStatement.prototype, "version", void 0);
36
40
  tslib_1.__decorate([
37
41
  (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
38
- (0, type_graphql_1.Field)({ nullable: true, description: 'The domain to which this financial statement belongs' }),
39
- tslib_1.__metadata("design:type", shell_1.Domain // 이 재무제표가 속한 도메인
40
- )
42
+ (0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true, description: 'The domain to which this financial statement belongs' }),
43
+ tslib_1.__metadata("design:type", shell_1.Domain)
41
44
  ], FinancialStatement.prototype, "domain", void 0);
42
45
  tslib_1.__decorate([
43
- (0, typeorm_1.RelationId)((financialStatement) => financialStatement.domain),
46
+ (0, typeorm_1.RelationId)((statement) => statement.domain),
44
47
  tslib_1.__metadata("design:type", String)
45
48
  ], FinancialStatement.prototype, "domainId", void 0);
46
49
  tslib_1.__decorate([
47
- (0, typeorm_1.Column)({ nullable: true }),
48
- (0, type_graphql_1.Field)({ nullable: true, description: 'Fiscal year of the financial statement' }),
50
+ (0, typeorm_1.Column)({ type: 'int' }),
51
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Fiscal year' }),
49
52
  tslib_1.__metadata("design:type", Number)
50
- ], FinancialStatement.prototype, "year", void 0);
53
+ ], FinancialStatement.prototype, "fiscalYear", void 0);
54
+ tslib_1.__decorate([
55
+ (0, typeorm_1.Column)(),
56
+ (0, type_graphql_1.Field)(type => FinancialStatementKind, { description: 'Which statement' }),
57
+ tslib_1.__metadata("design:type", String)
58
+ ], FinancialStatement.prototype, "kind", void 0);
51
59
  tslib_1.__decorate([
52
60
  (0, typeorm_1.Column)({ nullable: true }),
53
- (0, type_graphql_1.Field)({ nullable: true, description: 'Fiscal quarter of the financial statement' }),
54
- tslib_1.__metadata("design:type", Number)
55
- ], FinancialStatement.prototype, "quarter", void 0);
61
+ (0, type_graphql_1.Field)({ nullable: true, description: 'YYYY-MM-DD - the first day of the period' }),
62
+ tslib_1.__metadata("design:type", String)
63
+ ], FinancialStatement.prototype, "periodFrom", void 0);
56
64
  tslib_1.__decorate([
57
65
  (0, typeorm_1.Column)({ nullable: true }),
58
- (0, type_graphql_1.Field)({ nullable: true, description: 'Fiscal month of the financial statement' }),
59
- tslib_1.__metadata("design:type", Number)
60
- ], FinancialStatement.prototype, "month", void 0);
66
+ (0, type_graphql_1.Field)({ nullable: true, description: 'YYYY-MM-DD - the last day of the period' }),
67
+ tslib_1.__metadata("design:type", String)
68
+ ], FinancialStatement.prototype, "periodTo", void 0);
61
69
  tslib_1.__decorate([
62
- (0, typeorm_1.Column)((0, shell_1.moneyColumn)({ nullable: true })),
63
- (0, type_graphql_1.Field)({ nullable: true, description: 'Total assets recorded in the financial statement' }),
64
- tslib_1.__metadata("design:type", Number)
65
- ], FinancialStatement.prototype, "asset", void 0);
70
+ (0, typeorm_1.Column)({ nullable: true }),
71
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The kind of filing - regular, amended' }),
72
+ tslib_1.__metadata("design:type", String)
73
+ ], FinancialStatement.prototype, "filingKind", void 0);
66
74
  tslib_1.__decorate([
67
- (0, typeorm_1.Column)((0, shell_1.moneyColumn)({ nullable: true })),
68
- (0, type_graphql_1.Field)({ nullable: true, description: 'Total liabilities recorded in the financial statement' }),
69
- tslib_1.__metadata("design:type", Number)
70
- ], FinancialStatement.prototype, "liability", void 0);
75
+ (0, typeorm_1.Column)({ nullable: true }),
76
+ (0, type_graphql_1.Field)({ nullable: true, description: 'YYYY-MM-DD - when it was filed' }),
77
+ tslib_1.__metadata("design:type", String)
78
+ ], FinancialStatement.prototype, "filedOn", void 0);
71
79
  tslib_1.__decorate([
72
- (0, typeorm_1.Column)((0, shell_1.moneyColumn)({ nullable: true })),
73
- (0, type_graphql_1.Field)({ nullable: true, description: 'Total equity recorded in the financial statement' }),
74
- tslib_1.__metadata("design:type", Number)
75
- ], FinancialStatement.prototype, "equity", void 0);
80
+ (0, typeorm_1.Column)({ nullable: true }),
81
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The issue number of the certificate it came from' }),
82
+ tslib_1.__metadata("design:type", String)
83
+ ], FinancialStatement.prototype, "issueNo", void 0);
84
+ tslib_1.__decorate([
85
+ (0, typeorm_1.Column)({ nullable: true }),
86
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The document it came from' }),
87
+ tslib_1.__metadata("design:type", String)
88
+ ], FinancialStatement.prototype, "source", void 0);
89
+ tslib_1.__decorate([
90
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
91
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Notes' }),
92
+ tslib_1.__metadata("design:type", String)
93
+ ], FinancialStatement.prototype, "notes", void 0);
76
94
  tslib_1.__decorate([
77
- (0, typeorm_1.OneToMany)(type => financial_statement_line_item_1.FinancialStatementLineItem, lineItem => lineItem.statement),
78
- (0, type_graphql_1.Field)(type => [financial_statement_line_item_1.FinancialStatementLineItem], { nullable: true }),
95
+ (0, typeorm_1.OneToMany)(type => financial_statement_line_1.FinancialStatementLine, line => line.statement),
96
+ (0, type_graphql_1.Field)(type => [financial_statement_line_1.FinancialStatementLine], { nullable: true, description: 'Its lines, in the order of the statement' }),
79
97
  tslib_1.__metadata("design:type", Array)
80
- ], FinancialStatement.prototype, "lineItems", void 0);
98
+ ], FinancialStatement.prototype, "lines", void 0);
81
99
  tslib_1.__decorate([
82
100
  (0, typeorm_1.CreateDateColumn)(),
83
- (0, type_graphql_1.Field)({ nullable: true, description: 'The date and time when the financial statement was created' }),
84
- tslib_1.__metadata("design:type", Date // 재무제표가 생성된 날짜 및 시간
85
- )
101
+ (0, type_graphql_1.Field)({ nullable: true, description: 'When it was recorded' }),
102
+ tslib_1.__metadata("design:type", Date)
86
103
  ], FinancialStatement.prototype, "createdAt", void 0);
87
104
  tslib_1.__decorate([
88
105
  (0, typeorm_1.UpdateDateColumn)(),
89
- (0, type_graphql_1.Field)({ nullable: true, description: 'The date and time when the financial statement was last updated' }),
90
- tslib_1.__metadata("design:type", Date // 재무제표가 마지막으로 업데이트된 날짜 및 시간
91
- )
106
+ (0, type_graphql_1.Field)({ nullable: true, description: 'When it last changed' }),
107
+ tslib_1.__metadata("design:type", Date)
92
108
  ], FinancialStatement.prototype, "updatedAt", void 0);
93
109
  tslib_1.__decorate([
94
110
  (0, typeorm_1.DeleteDateColumn)(),
95
- (0, type_graphql_1.Field)({ nullable: true, description: 'The date and time when the financial statement was deleted' }),
96
- tslib_1.__metadata("design:type", Date // 재무제표가 삭제된 날짜 및 시간
97
- )
111
+ (0, type_graphql_1.Field)({ nullable: true, description: 'When it was replaced or deleted' }),
112
+ tslib_1.__metadata("design:type", Date)
98
113
  ], FinancialStatement.prototype, "deletedAt", void 0);
99
114
  tslib_1.__decorate([
100
115
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
101
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'The user who created the financial statement' }),
102
- tslib_1.__metadata("design:type", auth_base_1.User // 재무제표를 생성한 사용자
103
- )
116
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who recorded it' }),
117
+ tslib_1.__metadata("design:type", auth_base_1.User)
104
118
  ], FinancialStatement.prototype, "creator", void 0);
105
119
  tslib_1.__decorate([
106
- (0, typeorm_1.RelationId)((financialStatement) => financialStatement.creator),
120
+ (0, typeorm_1.RelationId)((statement) => statement.creator),
107
121
  tslib_1.__metadata("design:type", String)
108
122
  ], FinancialStatement.prototype, "creatorId", void 0);
109
123
  tslib_1.__decorate([
110
124
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
111
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'The user who last updated the financial statement' }),
112
- tslib_1.__metadata("design:type", auth_base_1.User // 재무제표를 마지막으로 업데이트한 사용자
113
- )
125
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who last changed it' }),
126
+ tslib_1.__metadata("design:type", auth_base_1.User)
114
127
  ], FinancialStatement.prototype, "updater", void 0);
115
128
  tslib_1.__decorate([
116
- (0, typeorm_1.RelationId)((financialStatement) => financialStatement.updater),
129
+ (0, typeorm_1.RelationId)((statement) => statement.updater),
117
130
  tslib_1.__metadata("design:type", String)
118
131
  ], FinancialStatement.prototype, "updaterId", void 0);
119
132
  exports.FinancialStatement = FinancialStatement = tslib_1.__decorate([
120
133
  (0, typeorm_1.Entity)(),
121
- (0, typeorm_1.Index)('ix_financial_statement_0', (financialStatement) => [
122
- financialStatement.domain,
123
- financialStatement.year,
124
- financialStatement.quarter,
125
- financialStatement.month
126
- ], {
134
+ (0, typeorm_1.Index)('ix_financial_statement_0', (statement) => [statement.domain, statement.fiscalYear, statement.kind], {
127
135
  unique: true,
128
- where: '"deleted_at" IS NULL' // 삭제되지 않은 경우에만 유니크
136
+ where: '"deleted_at" IS NULL'
129
137
  }),
130
- (0, type_graphql_1.ObjectType)({ description: 'Entity for FinancialStatement, representing the financial position of an entity' }) // 엔티티 설명 추가
138
+ (0, type_graphql_1.ObjectType)({ description: 'A financial statement of a fiscal year, as it was filed' })
131
139
  ], FinancialStatement);
132
140
  //# sourceMappingURL=financial-statement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"financial-statement.js","sourceRoot":"","sources":["../../../server/service/financial-statement/financial-statement.ts"],"names":[],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CAAC,kBAAsC,EAAE,EAAE,CAAC;QAC1C,kBAAkB,CAAC,MAAM;QACzB,kBAAkB,CAAC,IAAI;QACvB,kBAAkB,CAAC,OAAO;QAC1B,kBAAkB,CAAC,KAAK;KACzB,EACD;QACE,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,sBAAsB,CAAC,mBAAmB;KAClD,CACF;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,iFAAiF,EAAE,CAAC,CAAC,YAAY;GAC/G,kBAAkB,CAqE9B","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn,\n VersionColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain, moneyColumn } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nimport { FinancialStatementLineItem } from './financial-statement-line-item'\n\nexport enum FinancialStatementStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(FinancialStatementStatus, {\n name: 'FinancialStatementStatus',\n description: 'State enumeration of a financial statement' // 재무제표 상태 열거형\n})\n\n// 재무제표 (Financial Statement)\n@Entity()\n@Index(\n 'ix_financial_statement_0',\n (financialStatement: FinancialStatement) => [\n financialStatement.domain,\n financialStatement.year,\n financialStatement.quarter,\n financialStatement.month\n ],\n {\n unique: true,\n where: '\"deleted_at\" IS NULL' // 삭제되지 않은 경우에만 유니크\n }\n)\n@ObjectType({ description: 'Entity for FinancialStatement, representing the financial position of an entity' }) // 엔티티 설명 추가\nexport class FinancialStatement {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier for the financial statement' })\n readonly id: string // 고유 식별자 (UUID)\n\n @VersionColumn()\n @Field({ nullable: true, description: 'Version number for optimistic locking' })\n version?: number = 1 // 낙관적 잠금을 위한 버전 관리 필드\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true, description: 'The domain to which this financial statement belongs' })\n domain?: Domain // 이 재무제표가 속한 도메인\n\n @RelationId((financialStatement: FinancialStatement) => financialStatement.domain)\n domainId?: string // 도메인의 ID\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal year of the financial statement' })\n year?: number // 회계 연도\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal quarter of the financial statement' })\n quarter?: number // 회계 분기\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal month of the financial statement' })\n month?: number // 회계 월\n\n @Column(moneyColumn({ nullable: true }))\n @Field({ nullable: true, description: 'Total assets recorded in the financial statement' })\n asset?: number // 재무제표에 기록된 총자산\n\n @Column(moneyColumn({ nullable: true }))\n @Field({ nullable: true, description: 'Total liabilities recorded in the financial statement' })\n liability?: number // 재무제표에 기록된 총부채\n\n @Column(moneyColumn({ nullable: true }))\n @Field({ nullable: true, description: 'Total equity recorded in the financial statement' })\n equity?: number // 재무제표에 기록된 총자본\n\n @OneToMany(type => FinancialStatementLineItem, lineItem => lineItem.statement)\n @Field(type => [FinancialStatementLineItem], { nullable: true })\n lineItems?: FinancialStatementLineItem[] // 계정별 브레이크다운\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'The date and time when the financial statement was created' })\n createdAt?: Date // 재무제표가 생성된 날짜 및 시간\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'The date and time when the financial statement was last updated' })\n updatedAt?: Date // 재무제표가 마지막으로 업데이트된 날짜 및 시간\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'The date and time when the financial statement was deleted' })\n deletedAt?: Date // 재무제표가 삭제된 날짜 및 시간\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who created the financial statement' })\n creator?: User // 재무제표를 생성한 사용자\n\n @RelationId((financialStatement: FinancialStatement) => financialStatement.creator)\n creatorId?: string // 재무제표를 생성한 사용자의 ID\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who last updated the financial statement' })\n updater?: User // 재무제표를 마지막으로 업데이트한 사용자\n\n @RelationId((financialStatement: FinancialStatement) => financialStatement.updater)\n updaterId?: string // 재무제표를 업데이트한 사용자의 ID\n}\n"]}
1
+ {"version":3,"file":"financial-statement.js","sourceRoot":"","sources":["../../../server/service/financial-statement/financial-statement.ts"],"names":[],"mappings":";;;;AAAA,qCAYgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAEhD,yEAAmE;AAEnE,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,yDAA+B,CAAA;IAC/B,+DAAqC,CAAA;IACrC,yDAA+B,CAAA;AACjC,CAAC,EAJW,sBAAsB,sCAAtB,sBAAsB,QAIjC;AAED,IAAA,+BAAgB,EAAC,sBAAsB,EAAE;IACvC,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,4FAA4F;CAC1G,CAAC,CAAA;AAEF;;;GAGG;AAWI,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAAxB;QAOL,YAAO,GAAY,CAAC,CAAA;IA0EtB,CAAC;CAAA,CAAA;AAjFY,gDAAkB;AAGpB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,+CAA+C,EAAE,CAAC;;8CACjE;AAInB;IAFC,IAAA,uBAAa,GAAE;IACf,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uCAAuC,EAAE,CAAC;;mDAC5D;AAIpB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,sDAAsD,EAAE,CAAC;sCACtG,cAAM;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E,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;sCAC9D,gBAAI;mDAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,SAA6B,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;;qDAC/C;AAIlB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;sCAClE,gBAAI;mDAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,SAA6B,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;;qDAC/C;6BAhFP,kBAAkB;IAV9B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,0BAA0B,EAC1B,CAAC,SAA6B,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC,EAC3F;QACE,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,sBAAsB;KAC9B,CACF;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,yDAAyD,EAAE,CAAC;GAC1E,kBAAkB,CAiF9B","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn,\n VersionColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID, Int, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nimport { FinancialStatementLine } from './financial-statement-line'\n\nexport enum FinancialStatementKind {\n BALANCE_SHEET = 'BALANCE_SHEET',\n INCOME_STATEMENT = 'INCOME_STATEMENT',\n COST_OF_GOODS = 'COST_OF_GOODS'\n}\n\nregisterEnumType(FinancialStatementKind, {\n name: 'FinancialStatementKind',\n description: 'Which statement - balance sheet, income statement, statement of cost of goods manufactured'\n})\n\n/**\n * A financial statement of a fiscal year, line by line, as it was filed. Filing it again replaces it; what the books\n * moved on the same lines is read beside it, not kept.\n */\n@Entity()\n@Index(\n 'ix_financial_statement_0',\n (statement: FinancialStatement) => [statement.domain, statement.fiscalYear, statement.kind],\n {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n }\n)\n@ObjectType({ description: 'A financial statement of a fiscal year, as it was filed' })\nexport class FinancialStatement {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier for the financial statement' })\n readonly id: string\n\n @VersionColumn()\n @Field({ nullable: true, description: 'Version number for optimistic locking' })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true, description: 'The domain to which this financial statement belongs' })\n domain?: Domain\n\n @RelationId((statement: FinancialStatement) => statement.domain)\n domainId?: string\n\n @Column({ type: 'int' })\n @Field(type => Int, { description: 'Fiscal year' })\n fiscalYear: number\n\n @Column()\n @Field(type => FinancialStatementKind, { description: 'Which statement' })\n kind: FinancialStatementKind\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'YYYY-MM-DD - the first day of the period' })\n periodFrom?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'YYYY-MM-DD - the last day of the period' })\n periodTo?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The kind of filing - regular, amended' })\n filingKind?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'YYYY-MM-DD - when it was filed' })\n filedOn?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The issue number of the certificate it came from' })\n issueNo?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The document it came from' })\n source?: string\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true, description: 'Notes' })\n notes?: string\n\n @OneToMany(type => FinancialStatementLine, line => line.statement)\n @Field(type => [FinancialStatementLine], { nullable: true, description: 'Its lines, in the order of the statement' })\n lines?: FinancialStatementLine[]\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'When it was recorded' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'When it last changed' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'When it was replaced or deleted' })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who recorded it' })\n creator?: User\n\n @RelationId((statement: FinancialStatement) => statement.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who last changed it' })\n updater?: User\n\n @RelationId((statement: FinancialStatement) => statement.updater)\n updaterId?: string\n}\n"]}
@@ -1,8 +1,9 @@
1
1
  import { FinancialStatement } from './financial-statement';
2
- import { FinancialStatementLineItem } from './financial-statement-line-item';
2
+ import { FinancialStatementLine } from './financial-statement-line';
3
+ import { FinancialStatementHistory } from './financial-statement-history';
3
4
  import { FinancialStatementQuery } from './financial-statement-query';
4
5
  import { FinancialStatementMutation } from './financial-statement-mutation';
5
6
  import { FinancialStatementHistoryEntitySubscriber } from './event-subscriber';
6
- export declare const entities: (typeof FinancialStatementLineItem | typeof FinancialStatement)[];
7
+ export declare const entities: (typeof FinancialStatementLine | typeof FinancialStatement | typeof FinancialStatementHistory)[];
7
8
  export declare const resolvers: (typeof FinancialStatementQuery | typeof FinancialStatementMutation)[];
8
9
  export declare const subscribers: (typeof FinancialStatementHistoryEntitySubscriber)[];
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.subscribers = exports.resolvers = exports.entities = void 0;
4
4
  const financial_statement_1 = require("./financial-statement");
5
- const financial_statement_line_item_1 = require("./financial-statement-line-item");
5
+ const financial_statement_line_1 = require("./financial-statement-line");
6
6
  const financial_statement_history_1 = require("./financial-statement-history");
7
7
  const financial_statement_query_1 = require("./financial-statement-query");
8
8
  const financial_statement_mutation_1 = require("./financial-statement-mutation");
9
9
  const event_subscriber_1 = require("./event-subscriber");
10
- exports.entities = [financial_statement_1.FinancialStatement, financial_statement_line_item_1.FinancialStatementLineItem, financial_statement_history_1.FinancialStatementHistory];
10
+ exports.entities = [financial_statement_1.FinancialStatement, financial_statement_line_1.FinancialStatementLine, financial_statement_history_1.FinancialStatementHistory];
11
11
  exports.resolvers = [financial_statement_query_1.FinancialStatementQuery, financial_statement_mutation_1.FinancialStatementMutation];
12
12
  exports.subscribers = [event_subscriber_1.FinancialStatementHistoryEntitySubscriber];
13
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/financial-statement/index.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAC1D,mFAA4E;AAC5E,+EAAyE;AACzE,2EAAqE;AACrE,iFAA2E;AAC3E,yDAA8E;AAEjE,QAAA,QAAQ,GAAG,CAAC,wCAAkB,EAAE,0DAA0B,EAAE,uDAAyB,CAAC,CAAA;AACtF,QAAA,SAAS,GAAG,CAAC,mDAAuB,EAAE,yDAA0B,CAAC,CAAA;AACjE,QAAA,WAAW,GAAG,CAAC,4DAAyC,CAAC,CAAA","sourcesContent":["import { FinancialStatement } from './financial-statement'\nimport { FinancialStatementLineItem } from './financial-statement-line-item'\nimport { FinancialStatementHistory } from './financial-statement-history'\nimport { FinancialStatementQuery } from './financial-statement-query'\nimport { FinancialStatementMutation } from './financial-statement-mutation'\nimport { FinancialStatementHistoryEntitySubscriber } from './event-subscriber'\n\nexport const entities = [FinancialStatement, FinancialStatementLineItem, FinancialStatementHistory]\nexport const resolvers = [FinancialStatementQuery, FinancialStatementMutation]\nexport const subscribers = [FinancialStatementHistoryEntitySubscriber]\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/financial-statement/index.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAC1D,yEAAmE;AACnE,+EAAyE;AACzE,2EAAqE;AACrE,iFAA2E;AAC3E,yDAA8E;AAEjE,QAAA,QAAQ,GAAG,CAAC,wCAAkB,EAAE,iDAAsB,EAAE,uDAAyB,CAAC,CAAA;AAClF,QAAA,SAAS,GAAG,CAAC,mDAAuB,EAAE,yDAA0B,CAAC,CAAA;AACjE,QAAA,WAAW,GAAG,CAAC,4DAAyC,CAAC,CAAA","sourcesContent":["import { FinancialStatement } from './financial-statement'\nimport { FinancialStatementLine } from './financial-statement-line'\nimport { FinancialStatementHistory } from './financial-statement-history'\nimport { FinancialStatementQuery } from './financial-statement-query'\nimport { FinancialStatementMutation } from './financial-statement-mutation'\nimport { FinancialStatementHistoryEntitySubscriber } from './event-subscriber'\n\nexport const entities = [FinancialStatement, FinancialStatementLine, FinancialStatementHistory]\nexport const resolvers = [FinancialStatementQuery, FinancialStatementMutation]\nexport const subscribers = [FinancialStatementHistoryEntitySubscriber]\n"]}
@@ -1,16 +1,28 @@
1
- export * from './income-statement/income-statement';
1
+ export * from './cash-flow-type';
2
2
  export * from './financial-statement/financial-statement';
3
3
  export * from './accounting-category/accounting-category';
4
4
  export * from './transaction/transaction';
5
5
  export * from './bank-account/bank-account';
6
+ export * from './bank-statement/bank-statement';
6
7
  export * from './payment/payment';
7
8
  export * from './account/account';
8
9
  export * from './accounting-document/accounting-document';
10
+ export * from './recurring-cash-item/recurring-cash-item';
11
+ export * from './financial-institution/financial-institution';
9
12
  export * from './fiscal-month/fiscal-month';
10
13
  export * from './fiscal-quarter/fiscal-quarter';
11
14
  export * from './fiscal-year/fiscal-year';
12
- export declare const entities: (typeof import("./accounting-category/accounting-category").AccountingCategory | typeof import("./account/account").Account | typeof import("./financial-statement/financial-statement-line-item").FinancialStatementLineItem | typeof import("./financial-statement/financial-statement").FinancialStatement | typeof import("./income-statement/income-statement-line-item").IncomeStatementLineItem | typeof import("./income-statement/income-statement").IncomeStatement | typeof import("./bank-account/bank-account").BankAccount | typeof import("./payment/payment").Payment | typeof import("./transaction/transaction").Transaction | typeof import("./accounting-document/accounting-document").AccountingDocument | typeof import("./fiscal-year/fiscal-year").FiscalYear | typeof import("./transaction/transaction-history").TransactionHistory)[];
15
+ export * from './transaction/transaction-period';
16
+ export * from './transaction/transaction-service';
17
+ export * from './bank-account/bank-account-service';
18
+ export * from './payment/payment-targets';
19
+ export * from './payment/payment-service';
20
+ export * from './financial-statement/financial-statement-line';
21
+ export * from './financial-statement/financial-statement-service';
22
+ export * from './recurring-cash-item/recurring-schedule';
23
+ export * from './recurring-cash-item/recurring-cash-item-service';
24
+ export declare const entities: (typeof import("./financial-statement/financial-statement-line").FinancialStatementLine | typeof import("./financial-statement/financial-statement").FinancialStatement | typeof import("./accounting-category/accounting-category").AccountingCategory | typeof import("./account/account").Account | typeof import("./bank-account/bank-account").BankAccount | typeof import("./bank-statement/bank-statement").BankStatement | typeof import("./payment/payment").Payment | typeof import("./transaction/transaction").Transaction | typeof import("./accounting-document/accounting-document").AccountingDocument | typeof import("./recurring-cash-item/recurring-cash-item").RecurringCashItem | typeof import("./financial-institution/financial-institution").FinancialInstitution | typeof import("./fiscal-year/fiscal-year").FiscalYear | typeof import("./financial-statement/financial-statement-history").FinancialStatementHistory | typeof import("./transaction/transaction-history").TransactionHistory)[];
13
25
  export declare const subscribers: any[];
14
26
  export declare const schema: {
15
- resolverClasses: (typeof import("./income-statement/income-statement-query").IncomeStatementQuery | typeof import("./income-statement/income-statement-mutation").IncomeStatementMutation | typeof import("./financial-statement/financial-statement-query").FinancialStatementQuery | typeof import("./financial-statement/financial-statement-mutation").FinancialStatementMutation | typeof import("./accounting-category/accounting-category-query").AccountingCategoryQuery | typeof import("./accounting-category/accounting-category-mutation").AccountingCategoryMutation | typeof import("./transaction/transaction-query").TransactionQuery | typeof import("./transaction/transaction-mutation").TransactionMutation | typeof import("./bank-account/bank-account-query").BankAccountQuery | typeof import("./bank-account/bank-account-mutation").BankAccountMutation | typeof import("./payment/payment-query").PaymentQuery | typeof import("./payment/payment-mutation").PaymentMutation | typeof import("./account/account-query").AccountQuery | typeof import("./account/account-mutation").AccountMutation | typeof import("./accounting-document/accounting-document-query").AccountingDocumentQuery | typeof import("./accounting-document/accounting-document-mutation").AccountingDocumentMutation | typeof import("./fiscal-month/fiscal-month-query").FiscalMonthQuery | typeof import("./fiscal-month/fiscal-month-mutation").FiscalMonthMutation | typeof import("./fiscal-quarter/fiscal-quarter-query").FiscalQuarterQuery | typeof import("./fiscal-quarter/fiscal-quarter-mutation").FiscalQuarterMutation | typeof import("./fiscal-year/fiscal-year-query").FiscalYearQuery | typeof import("./fiscal-year/fiscal-year-mutation").FiscalYearMutation)[];
27
+ resolverClasses: (typeof import("./financial-statement/financial-statement-query").FinancialStatementQuery | typeof import("./financial-statement/financial-statement-mutation").FinancialStatementMutation | typeof import("./accounting-category/accounting-category-query").AccountingCategoryQuery | typeof import("./accounting-category/accounting-category-mutation").AccountingCategoryMutation | typeof import("./transaction/transaction-query").TransactionQuery | typeof import("./transaction/transaction-mutation").TransactionMutation | typeof import("./bank-account/bank-account-query").BankAccountQuery | typeof import("./bank-account/bank-account-mutation").BankAccountMutation | typeof import("./bank-statement/bank-statement-query").BankStatementQuery | typeof import("./payment/payment-query").PaymentQuery | typeof import("./payment/payment-mutation").PaymentMutation | typeof import("./account/account-query").AccountQuery | typeof import("./account/account-mutation").AccountMutation | typeof import("./accounting-document/accounting-document-query").AccountingDocumentQuery | typeof import("./accounting-document/accounting-document-mutation").AccountingDocumentMutation | typeof import("./recurring-cash-item/recurring-cash-item-query").RecurringCashItemQuery | typeof import("./recurring-cash-item/recurring-cash-item-mutation").RecurringCashItemMutation | typeof import("./financial-institution/financial-institution-query").FinancialInstitutionQuery | typeof import("./financial-institution/financial-institution-mutation").FinancialInstitutionMutation | typeof import("./fiscal-month/fiscal-month-query").FiscalMonthQuery | typeof import("./fiscal-month/fiscal-month-mutation").FiscalMonthMutation | typeof import("./fiscal-quarter/fiscal-quarter-query").FiscalQuarterQuery | typeof import("./fiscal-quarter/fiscal-quarter-mutation").FiscalQuarterMutation | typeof import("./fiscal-year/fiscal-year-query").FiscalYearQuery | typeof import("./fiscal-year/fiscal-year-mutation").FiscalYearMutation)[];
16
28
  };
@@ -3,69 +3,86 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.subscribers = exports.entities = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  /* EXPORT ENTITY TYPES */
6
- tslib_1.__exportStar(require("./income-statement/income-statement"), exports);
6
+ tslib_1.__exportStar(require("./cash-flow-type"), exports);
7
7
  tslib_1.__exportStar(require("./financial-statement/financial-statement"), exports);
8
8
  tslib_1.__exportStar(require("./accounting-category/accounting-category"), exports);
9
9
  tslib_1.__exportStar(require("./transaction/transaction"), exports);
10
10
  tslib_1.__exportStar(require("./bank-account/bank-account"), exports);
11
+ tslib_1.__exportStar(require("./bank-statement/bank-statement"), exports);
11
12
  tslib_1.__exportStar(require("./payment/payment"), exports);
12
13
  tslib_1.__exportStar(require("./account/account"), exports);
13
14
  tslib_1.__exportStar(require("./accounting-document/accounting-document"), exports);
15
+ tslib_1.__exportStar(require("./recurring-cash-item/recurring-cash-item"), exports);
16
+ tslib_1.__exportStar(require("./financial-institution/financial-institution"), exports);
14
17
  tslib_1.__exportStar(require("./fiscal-month/fiscal-month"), exports);
15
18
  tslib_1.__exportStar(require("./fiscal-quarter/fiscal-quarter"), exports);
16
19
  tslib_1.__exportStar(require("./fiscal-year/fiscal-year"), exports);
20
+ /* EXPORT SERVICES */
21
+ tslib_1.__exportStar(require("./transaction/transaction-period"), exports);
22
+ tslib_1.__exportStar(require("./transaction/transaction-service"), exports);
23
+ tslib_1.__exportStar(require("./bank-account/bank-account-service"), exports);
24
+ tslib_1.__exportStar(require("./payment/payment-targets"), exports);
25
+ tslib_1.__exportStar(require("./payment/payment-service"), exports);
26
+ tslib_1.__exportStar(require("./financial-statement/financial-statement-line"), exports);
27
+ tslib_1.__exportStar(require("./financial-statement/financial-statement-service"), exports);
28
+ tslib_1.__exportStar(require("./recurring-cash-item/recurring-schedule"), exports);
29
+ tslib_1.__exportStar(require("./recurring-cash-item/recurring-cash-item-service"), exports);
17
30
  /* IMPORT ENTITIES AND RESOLVERS */
18
- const income_statement_1 = require("./income-statement");
19
31
  const financial_statement_1 = require("./financial-statement");
20
32
  const accounting_category_1 = require("./accounting-category");
21
33
  const transaction_1 = require("./transaction");
22
34
  const bank_account_1 = require("./bank-account");
35
+ const bank_statement_1 = require("./bank-statement");
23
36
  const payment_1 = require("./payment");
24
37
  const account_1 = require("./account");
25
38
  const accounting_document_1 = require("./accounting-document");
39
+ const recurring_cash_item_1 = require("./recurring-cash-item");
40
+ const financial_institution_1 = require("./financial-institution");
26
41
  const fiscal_month_1 = require("./fiscal-month");
27
42
  const fiscal_quarter_1 = require("./fiscal-quarter");
28
43
  const fiscal_year_1 = require("./fiscal-year");
29
44
  exports.entities = [
30
- /* ENTITIES */
31
- ...income_statement_1.entities,
32
45
  ...financial_statement_1.entities,
33
46
  ...accounting_category_1.entities,
34
47
  ...transaction_1.entities,
35
- ...account_1.entities,
36
- ...accounting_document_1.entities,
37
48
  ...bank_account_1.entities,
49
+ ...bank_statement_1.entities,
38
50
  ...payment_1.entities,
51
+ ...account_1.entities,
52
+ ...accounting_document_1.entities,
53
+ ...recurring_cash_item_1.entities,
54
+ ...financial_institution_1.entities,
39
55
  ...fiscal_month_1.entities,
40
56
  ...fiscal_quarter_1.entities,
41
57
  ...fiscal_year_1.entities
42
58
  ];
43
59
  exports.subscribers = [
44
- /* SUBSCRIBERS */
45
- ...income_statement_1.subscribers,
46
60
  ...financial_statement_1.subscribers,
47
61
  ...accounting_category_1.subscribers,
48
62
  ...transaction_1.subscribers,
49
- ...payment_1.subscribers,
50
63
  ...bank_account_1.subscribers,
64
+ ...bank_statement_1.subscribers,
65
+ ...payment_1.subscribers,
51
66
  ...account_1.subscribers,
52
67
  ...accounting_document_1.subscribers,
53
- ...fiscal_year_1.subscribers,
68
+ ...recurring_cash_item_1.subscribers,
69
+ ...financial_institution_1.subscribers,
54
70
  ...fiscal_month_1.subscribers,
55
71
  ...fiscal_quarter_1.subscribers,
56
72
  ...fiscal_year_1.subscribers
57
73
  ];
58
74
  exports.schema = {
59
75
  resolverClasses: [
60
- /* RESOLVER CLASSES */
61
- ...income_statement_1.resolvers,
62
76
  ...financial_statement_1.resolvers,
63
77
  ...accounting_category_1.resolvers,
64
78
  ...transaction_1.resolvers,
65
- ...payment_1.resolvers,
66
79
  ...bank_account_1.resolvers,
80
+ ...bank_statement_1.resolvers,
81
+ ...payment_1.resolvers,
67
82
  ...account_1.resolvers,
68
83
  ...accounting_document_1.resolvers,
84
+ ...recurring_cash_item_1.resolvers,
85
+ ...financial_institution_1.resolvers,
69
86
  ...fiscal_month_1.resolvers,
70
87
  ...fiscal_quarter_1.resolvers,
71
88
  ...fiscal_year_1.resolvers
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,8EAAmD;AACnD,oFAAyD;AACzD,oFAAyD;AACzD,oEAAyC;AACzC,sEAA2C;AAC3C,4DAAiC;AACjC,4DAAiC;AACjC,oFAAyD;AACzD,sEAA2C;AAC3C,0EAA+C;AAC/C,oEAAyC;AAEzC,mCAAmC;AACnC,yDAI2B;AAC3B,+DAI8B;AAC9B,+DAI8B;AAC9B,+CAIsB;AACtB,iDAIuB;AACvB,uCAIkB;AAClB,uCAIkB;AAClB,+DAI8B;AAC9B,iDAIuB;AACvB,qDAIyB;AACzB,+CAIsB;AAET,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,GAAG,2BAAuB;IAC1B,GAAG,8BAA0B;IAC7B,GAAG,8BAA0B;IAC7B,GAAG,sBAAmB;IACtB,GAAG,kBAAe;IAClB,GAAG,8BAA0B;IAC7B,GAAG,uBAAmB;IACtB,GAAG,kBAAe;IAClB,GAAG,uBAAmB;IACtB,GAAG,yBAAqB;IACxB,GAAG,sBAAkB;CACtB,CAAA;AAEY,QAAA,WAAW,GAAG;IACzB,iBAAiB;IACjB,GAAG,8BAA0B;IAC7B,GAAG,iCAA6B;IAChC,GAAG,iCAA6B;IAChC,GAAG,yBAAsB;IACzB,GAAG,qBAAkB;IACrB,GAAG,0BAAsB;IACzB,GAAG,qBAAkB;IACrB,GAAG,iCAA6B;IAChC,GAAG,yBAAqB;IACxB,GAAG,0BAAsB;IACzB,GAAG,4BAAwB;IAC3B,GAAG,yBAAqB;CACzB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,sBAAsB;QACtB,GAAG,4BAAwB;QAC3B,GAAG,+BAA2B;QAC9B,GAAG,+BAA2B;QAC9B,GAAG,uBAAoB;QACvB,GAAG,mBAAgB;QACnB,GAAG,wBAAoB;QACvB,GAAG,mBAAgB;QACnB,GAAG,+BAA2B;QAC9B,GAAG,wBAAoB;QACvB,GAAG,0BAAsB;QACzB,GAAG,uBAAmB;KACvB;CACF,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './income-statement/income-statement'\nexport * from './financial-statement/financial-statement'\nexport * from './accounting-category/accounting-category'\nexport * from './transaction/transaction'\nexport * from './bank-account/bank-account'\nexport * from './payment/payment'\nexport * from './account/account'\nexport * from './accounting-document/accounting-document'\nexport * from './fiscal-month/fiscal-month'\nexport * from './fiscal-quarter/fiscal-quarter'\nexport * from './fiscal-year/fiscal-year'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport {\n entities as IncomeStatementEntities,\n resolvers as IncomeStatementResolvers,\n subscribers as IncomeStatementSubscribers\n} from './income-statement'\nimport {\n entities as FinancialStatementEntities,\n resolvers as FinancialStatementResolvers,\n subscribers as FinancialStatementSubscribers\n} from './financial-statement'\nimport {\n entities as AccountingCategoryEntities,\n resolvers as AccountingCategoryResolvers,\n subscribers as AccountingCategorySubscribers\n} from './accounting-category'\nimport {\n entities as TransactionEntities,\n resolvers as TransactionResolvers,\n subscribers as TransactionSubscribers\n} from './transaction'\nimport {\n entities as BankAccountEntities,\n resolvers as BankAccountResolvers,\n subscribers as BankAccountSubscribers\n} from './bank-account'\nimport {\n entities as PaymentEntities,\n resolvers as PaymentResolvers,\n subscribers as PaymentSubscribers\n} from './payment'\nimport {\n entities as AccountEntities,\n resolvers as AccountResolvers,\n subscribers as AccountSubscribers\n} from './account'\nimport {\n entities as AccountingDocumentEntities,\n resolvers as AccountingDocumentResolvers,\n subscribers as AccountingDocumentSubscribers\n} from './accounting-document'\nimport {\n entities as FiscalMonthEntities,\n resolvers as FiscalMonthResolvers,\n subscribers as FiscalMonthSubscribers\n} from './fiscal-month'\nimport {\n entities as FiscalQuarterEntities,\n resolvers as FiscalQuarterResolvers,\n subscribers as FiscalQuarterSubscribers\n} from './fiscal-quarter'\nimport {\n entities as FiscalYearEntities,\n resolvers as FiscalYearResolvers,\n subscribers as FiscalYearSubscribers\n} from './fiscal-year'\n\nexport const entities = [\n /* ENTITIES */\n ...IncomeStatementEntities,\n ...FinancialStatementEntities,\n ...AccountingCategoryEntities,\n ...TransactionEntities,\n ...AccountEntities,\n ...AccountingDocumentEntities,\n ...BankAccountEntities,\n ...PaymentEntities,\n ...FiscalMonthEntities,\n ...FiscalQuarterEntities,\n ...FiscalYearEntities\n]\n\nexport const subscribers = [\n /* SUBSCRIBERS */\n ...IncomeStatementSubscribers,\n ...FinancialStatementSubscribers,\n ...AccountingCategorySubscribers,\n ...TransactionSubscribers,\n ...PaymentSubscribers,\n ...BankAccountSubscribers,\n ...AccountSubscribers,\n ...AccountingDocumentSubscribers,\n ...FiscalYearSubscribers,\n ...FiscalMonthSubscribers,\n ...FiscalQuarterSubscribers,\n ...FiscalYearSubscribers\n]\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n ...IncomeStatementResolvers,\n ...FinancialStatementResolvers,\n ...AccountingCategoryResolvers,\n ...TransactionResolvers,\n ...PaymentResolvers,\n ...BankAccountResolvers,\n ...AccountResolvers,\n ...AccountingDocumentResolvers,\n ...FiscalMonthResolvers,\n ...FiscalQuarterResolvers,\n ...FiscalYearResolvers\n ]\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,2DAAgC;AAChC,oFAAyD;AACzD,oFAAyD;AACzD,oEAAyC;AACzC,sEAA2C;AAC3C,0EAA+C;AAC/C,4DAAiC;AACjC,4DAAiC;AACjC,oFAAyD;AACzD,oFAAyD;AACzD,wFAA6D;AAC7D,sEAA2C;AAC3C,0EAA+C;AAC/C,oEAAyC;AAEzC,qBAAqB;AACrB,2EAAgD;AAChD,4EAAiD;AACjD,8EAAmD;AACnD,oEAAyC;AACzC,oEAAyC;AACzC,yFAA8D;AAC9D,4FAAiE;AACjE,mFAAwD;AACxD,4FAAiE;AAEjE,mCAAmC;AACnC,+DAI8B;AAC9B,+DAI8B;AAC9B,+CAIsB;AACtB,iDAIuB;AACvB,qDAIyB;AACzB,uCAIkB;AAClB,uCAIkB;AAClB,+DAI8B;AAC9B,+DAI8B;AAC9B,mEAIgC;AAChC,iDAIuB;AACvB,qDAIyB;AACzB,+CAIsB;AAET,QAAA,QAAQ,GAAG;IACtB,GAAG,8BAA0B;IAC7B,GAAG,8BAA0B;IAC7B,GAAG,sBAAmB;IACtB,GAAG,uBAAmB;IACtB,GAAG,yBAAqB;IACxB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,8BAA0B;IAC7B,GAAG,8BAAyB;IAC5B,GAAG,gCAA4B;IAC/B,GAAG,uBAAmB;IACtB,GAAG,yBAAqB;IACxB,GAAG,sBAAkB;CACtB,CAAA;AAEY,QAAA,WAAW,GAAG;IACzB,GAAG,iCAA6B;IAChC,GAAG,iCAA6B;IAChC,GAAG,yBAAsB;IACzB,GAAG,0BAAsB;IACzB,GAAG,4BAAwB;IAC3B,GAAG,qBAAkB;IACrB,GAAG,qBAAkB;IACrB,GAAG,iCAA6B;IAChC,GAAG,iCAA4B;IAC/B,GAAG,mCAA+B;IAClC,GAAG,0BAAsB;IACzB,GAAG,4BAAwB;IAC3B,GAAG,yBAAqB;CACzB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,GAAG,+BAA2B;QAC9B,GAAG,+BAA2B;QAC9B,GAAG,uBAAoB;QACvB,GAAG,wBAAoB;QACvB,GAAG,0BAAsB;QACzB,GAAG,mBAAgB;QACnB,GAAG,mBAAgB;QACnB,GAAG,+BAA2B;QAC9B,GAAG,+BAA0B;QAC7B,GAAG,iCAA6B;QAChC,GAAG,wBAAoB;QACvB,GAAG,0BAAsB;QACzB,GAAG,uBAAmB;KACvB;CACF,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './cash-flow-type'\nexport * from './financial-statement/financial-statement'\nexport * from './accounting-category/accounting-category'\nexport * from './transaction/transaction'\nexport * from './bank-account/bank-account'\nexport * from './bank-statement/bank-statement'\nexport * from './payment/payment'\nexport * from './account/account'\nexport * from './accounting-document/accounting-document'\nexport * from './recurring-cash-item/recurring-cash-item'\nexport * from './financial-institution/financial-institution'\nexport * from './fiscal-month/fiscal-month'\nexport * from './fiscal-quarter/fiscal-quarter'\nexport * from './fiscal-year/fiscal-year'\n\n/* EXPORT SERVICES */\nexport * from './transaction/transaction-period'\nexport * from './transaction/transaction-service'\nexport * from './bank-account/bank-account-service'\nexport * from './payment/payment-targets'\nexport * from './payment/payment-service'\nexport * from './financial-statement/financial-statement-line'\nexport * from './financial-statement/financial-statement-service'\nexport * from './recurring-cash-item/recurring-schedule'\nexport * from './recurring-cash-item/recurring-cash-item-service'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport {\n entities as FinancialStatementEntities,\n resolvers as FinancialStatementResolvers,\n subscribers as FinancialStatementSubscribers\n} from './financial-statement'\nimport {\n entities as AccountingCategoryEntities,\n resolvers as AccountingCategoryResolvers,\n subscribers as AccountingCategorySubscribers\n} from './accounting-category'\nimport {\n entities as TransactionEntities,\n resolvers as TransactionResolvers,\n subscribers as TransactionSubscribers\n} from './transaction'\nimport {\n entities as BankAccountEntities,\n resolvers as BankAccountResolvers,\n subscribers as BankAccountSubscribers\n} from './bank-account'\nimport {\n entities as BankStatementEntities,\n resolvers as BankStatementResolvers,\n subscribers as BankStatementSubscribers\n} from './bank-statement'\nimport {\n entities as PaymentEntities,\n resolvers as PaymentResolvers,\n subscribers as PaymentSubscribers\n} from './payment'\nimport {\n entities as AccountEntities,\n resolvers as AccountResolvers,\n subscribers as AccountSubscribers\n} from './account'\nimport {\n entities as AccountingDocumentEntities,\n resolvers as AccountingDocumentResolvers,\n subscribers as AccountingDocumentSubscribers\n} from './accounting-document'\nimport {\n entities as RecurringCashItemEntities,\n resolvers as RecurringCashItemResolvers,\n subscribers as RecurringCashItemSubscribers\n} from './recurring-cash-item'\nimport {\n entities as FinancialInstitutionEntities,\n resolvers as FinancialInstitutionResolvers,\n subscribers as FinancialInstitutionSubscribers\n} from './financial-institution'\nimport {\n entities as FiscalMonthEntities,\n resolvers as FiscalMonthResolvers,\n subscribers as FiscalMonthSubscribers\n} from './fiscal-month'\nimport {\n entities as FiscalQuarterEntities,\n resolvers as FiscalQuarterResolvers,\n subscribers as FiscalQuarterSubscribers\n} from './fiscal-quarter'\nimport {\n entities as FiscalYearEntities,\n resolvers as FiscalYearResolvers,\n subscribers as FiscalYearSubscribers\n} from './fiscal-year'\n\nexport const entities = [\n ...FinancialStatementEntities,\n ...AccountingCategoryEntities,\n ...TransactionEntities,\n ...BankAccountEntities,\n ...BankStatementEntities,\n ...PaymentEntities,\n ...AccountEntities,\n ...AccountingDocumentEntities,\n ...RecurringCashItemEntities,\n ...FinancialInstitutionEntities,\n ...FiscalMonthEntities,\n ...FiscalQuarterEntities,\n ...FiscalYearEntities\n]\n\nexport const subscribers = [\n ...FinancialStatementSubscribers,\n ...AccountingCategorySubscribers,\n ...TransactionSubscribers,\n ...BankAccountSubscribers,\n ...BankStatementSubscribers,\n ...PaymentSubscribers,\n ...AccountSubscribers,\n ...AccountingDocumentSubscribers,\n ...RecurringCashItemSubscribers,\n ...FinancialInstitutionSubscribers,\n ...FiscalMonthSubscribers,\n ...FiscalQuarterSubscribers,\n ...FiscalYearSubscribers\n]\n\nexport const schema = {\n resolverClasses: [\n ...FinancialStatementResolvers,\n ...AccountingCategoryResolvers,\n ...TransactionResolvers,\n ...BankAccountResolvers,\n ...BankStatementResolvers,\n ...PaymentResolvers,\n ...AccountResolvers,\n ...AccountingDocumentResolvers,\n ...RecurringCashItemResolvers,\n ...FinancialInstitutionResolvers,\n ...FiscalMonthResolvers,\n ...FiscalQuarterResolvers,\n ...FiscalYearResolvers\n ]\n}\n"]}
@@ -2,6 +2,7 @@ import { Payment } from './payment';
2
2
  import { PaymentHistoryEntitySubscriber } from './event-subscriber';
3
3
  import { PaymentQuery } from './payment-query';
4
4
  import { PaymentMutation } from './payment-mutation';
5
+ import './transfer-target';
5
6
  export declare const entities: (typeof Payment)[];
6
7
  export declare const resolvers: (typeof PaymentQuery | typeof PaymentMutation)[];
7
8
  export declare const subscribers: (typeof PaymentHistoryEntitySubscriber)[];
@@ -6,6 +6,7 @@ const payment_history_1 = require("./payment-history");
6
6
  const event_subscriber_1 = require("./event-subscriber");
7
7
  const payment_query_1 = require("./payment-query");
8
8
  const payment_mutation_1 = require("./payment-mutation");
9
+ require("./transfer-target");
9
10
  exports.entities = [payment_1.Payment, payment_history_1.PaymentHistory];
10
11
  exports.resolvers = [payment_query_1.PaymentQuery, payment_mutation_1.PaymentMutation];
11
12
  exports.subscribers = [event_subscriber_1.PaymentHistoryEntitySubscriber];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/payment/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AACnC,uDAAkD;AAClD,yDAAmE;AACnE,mDAA8C;AAC9C,yDAAoD;AAEvC,QAAA,QAAQ,GAAG,CAAC,iBAAO,EAAE,gCAAc,CAAC,CAAA;AACpC,QAAA,SAAS,GAAG,CAAC,4BAAY,EAAE,kCAAe,CAAC,CAAA;AAC3C,QAAA,WAAW,GAAG,CAAC,iDAA8B,CAAC,CAAA","sourcesContent":["import { Payment } from './payment'\nimport { PaymentHistory } from './payment-history'\nimport { PaymentHistoryEntitySubscriber } from './event-subscriber'\nimport { PaymentQuery } from './payment-query'\nimport { PaymentMutation } from './payment-mutation'\n\nexport const entities = [Payment, PaymentHistory]\nexport const resolvers = [PaymentQuery, PaymentMutation]\nexport const subscribers = [PaymentHistoryEntitySubscriber]\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/payment/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AACnC,uDAAkD;AAClD,yDAAmE;AACnE,mDAA8C;AAC9C,yDAAoD;AACpD,6BAA0B;AAEb,QAAA,QAAQ,GAAG,CAAC,iBAAO,EAAE,gCAAc,CAAC,CAAA;AACpC,QAAA,SAAS,GAAG,CAAC,4BAAY,EAAE,kCAAe,CAAC,CAAA;AAC3C,QAAA,WAAW,GAAG,CAAC,iDAA8B,CAAC,CAAA","sourcesContent":["import { Payment } from './payment'\nimport { PaymentHistory } from './payment-history'\nimport { PaymentHistoryEntitySubscriber } from './event-subscriber'\nimport { PaymentQuery } from './payment-query'\nimport { PaymentMutation } from './payment-mutation'\nimport './transfer-target'\n\nexport const entities = [Payment, PaymentHistory]\nexport const resolvers = [PaymentQuery, PaymentMutation]\nexport const subscribers = [PaymentHistoryEntitySubscriber]\n"]}
@@ -2,28 +2,22 @@ import { HistoryActionType, HistoryEntityInterface } from '@operato/typeorm-hist
2
2
  import { User } from '@things-factory/auth-base';
3
3
  import { Domain } from '@things-factory/shell';
4
4
  import { Transaction } from '../transaction/transaction';
5
- import { Payment, PaymentDirection, PaymentType } from './payment';
6
- import { BankAccount } from '../bank-account/bank-account';
5
+ import { Payment, PaymentMethod, PaymentPurpose } from './payment';
6
+ /** Each version of a payment, written when it changes. */
7
7
  export declare class PaymentHistory implements HistoryEntityInterface<Payment> {
8
8
  readonly id: string;
9
9
  version?: number;
10
10
  domain?: Domain;
11
11
  domainId?: string;
12
12
  transaction: Transaction;
13
- transactionId: string;
14
- currency?: string;
13
+ transactionId?: string;
14
+ targetType: string;
15
+ targetId: string;
15
16
  amount: number;
16
- paymentType: PaymentType;
17
- sourceBankAccount?: BankAccount;
18
- sourceBankAccountId?: string;
19
- destinationBankAccount?: BankAccount;
20
- destinationBankAccountId?: string;
21
- year?: number;
22
- quarter?: number;
23
- month?: number;
24
- paidAt: Date;
25
- direction: PaymentDirection;
26
- note?: string;
17
+ purpose: PaymentPurpose;
18
+ method: PaymentMethod;
19
+ basis: string;
20
+ notes: string;
27
21
  createdAt?: Date;
28
22
  updatedAt?: Date;
29
23
  deletedAt?: Date;
@@ -31,7 +25,6 @@ export declare class PaymentHistory implements HistoryEntityInterface<Payment> {
31
25
  creatorId?: string;
32
26
  updater?: User;
33
27
  updaterId?: string;
34
- thumbnail?: string;
35
28
  originalId: string;
36
29
  action: HistoryActionType;
37
30
  }