@things-factory/accounting 8.0.0-beta.9 → 8.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/client/activities/activity-book-edit.ts +88 -0
- package/client/activities/activity-book-view.ts +88 -0
- package/client/activities/activity-expense-edit.ts +88 -0
- package/client/activities/activity-expense-view.ts +88 -0
- package/client/bootstrap.ts +10 -0
- package/client/components/accounting-category-selector.ts +136 -0
- package/client/components/accounting-category-view.ts +75 -0
- package/client/grist-editors/grist-editor-accounting-category-object.ts +83 -0
- package/client/grist-editors/grist-renderer-accounting-category-object.ts +13 -0
- package/client/index.ts +0 -0
- package/client/pages/account/account-importer.ts +97 -0
- package/client/pages/account/account-list-page.ts +364 -0
- package/client/pages/accounting-category/accounting-category-importer.ts +97 -0
- package/client/pages/accounting-category/accounting-category-list-page.ts +368 -0
- package/client/pages/accounting-category/accounting-category-tree-page.ts +338 -0
- package/client/pages/accounting-document/accounting-document-importer.ts +90 -0
- package/client/pages/accounting-document/accounting-document-list-page.ts +398 -0
- package/client/pages/financial-statement/financial-statement-importer.ts +97 -0
- package/client/pages/financial-statement/financial-statement-list-page.ts +338 -0
- package/client/pages/fiscal-month/fiscal-month-importer.ts +90 -0
- package/client/pages/fiscal-month/fiscal-month-list-page.ts +398 -0
- package/client/pages/fiscal-quarter/fiscal-quarter-importer.ts +90 -0
- package/client/pages/fiscal-quarter/fiscal-quarter-list-page.ts +398 -0
- package/client/pages/fiscal-year/fiscal-year-importer.ts +90 -0
- package/client/pages/fiscal-year/fiscal-year-list-page.ts +398 -0
- package/client/pages/income-statement/income-statement-importer.ts +97 -0
- package/client/pages/income-statement/income-statement-list-page.ts +338 -0
- package/client/pages/payment/payment-importer.ts +90 -0
- package/client/pages/payment/payment-list-page.ts +398 -0
- package/client/pages/transaction/transaction-importer.ts +97 -0
- package/client/pages/transaction/transaction-list-page.ts +338 -0
- package/client/route.ts +35 -0
- package/client/tsconfig.json +13 -0
- package/client/types/accounting-category.ts +23 -0
- package/client/types/index.ts +1 -0
- package/dist-client/pages/accounting-category/accounting-category-tree-page.js +1 -1
- package/dist-client/pages/accounting-category/accounting-category-tree-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/index.d.ts +2 -3
- package/dist-server/service/index.js +0 -5
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/payment/index.d.ts +2 -1
- package/dist-server/service/payment/payment-history.d.ts +1 -8
- package/dist-server/service/payment/payment-history.js +10 -41
- package/dist-server/service/payment/payment-history.js.map +1 -1
- package/dist-server/service/payment/payment-type.d.ts +1 -7
- package/dist-server/service/payment/payment-type.js +0 -24
- package/dist-server/service/payment/payment-type.js.map +1 -1
- package/dist-server/service/payment/payment.d.ts +0 -12
- package/dist-server/service/payment/payment.js +1 -36
- package/dist-server/service/payment/payment.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/server/activities/activity-book.ts +172 -0
- package/server/activities/activity-expense.ts +149 -0
- package/server/activities/index.ts +18 -0
- package/server/controllers/index.ts +1 -0
- package/server/controllers/summary-statements.ts +166 -0
- package/server/index.ts +6 -0
- package/server/middlewares/index.ts +3 -0
- package/server/migrations/1725200507196-seed-fiscal-entities.ts +106 -0
- package/server/migrations/1725201467183-seed-accounts.ts +339 -0
- package/server/migrations/index.ts +9 -0
- package/server/routes.ts +26 -0
- package/server/service/account/account-history.ts +117 -0
- package/server/service/account/account-mutation.ts +140 -0
- package/server/service/account/account-query.ts +51 -0
- package/server/service/account/account-type.ts +44 -0
- package/server/service/account/account.ts +97 -0
- package/server/service/account/event-subscriber.ts +17 -0
- package/server/service/account/index.ts +9 -0
- package/server/service/accounting-category/accounting-category-history.ts +129 -0
- package/server/service/accounting-category/accounting-category-mutation.ts +148 -0
- package/server/service/accounting-category/accounting-category-query.ts +74 -0
- package/server/service/accounting-category/accounting-category-type.ts +48 -0
- package/server/service/accounting-category/accounting-category.ts +100 -0
- package/server/service/accounting-category/event-subscriber.ts +20 -0
- package/server/service/accounting-category/index.ts +9 -0
- package/server/service/accounting-document/accounting-document-history.ts +123 -0
- package/server/service/accounting-document/accounting-document-mutation.ts +137 -0
- package/server/service/accounting-document/accounting-document-query.ts +48 -0
- package/server/service/accounting-document/accounting-document-type.ts +52 -0
- package/server/service/accounting-document/accounting-document.ts +93 -0
- package/server/service/accounting-document/event-subscriber.ts +17 -0
- package/server/service/accounting-document/index.ts +9 -0
- package/server/service/common-type.ts +12 -0
- package/server/service/financial-statement/event-subscriber.ts +17 -0
- package/server/service/financial-statement/financial-statement-history.ts +129 -0
- package/server/service/financial-statement/financial-statement-line-item.ts +82 -0
- package/server/service/financial-statement/financial-statement-mutation.ts +148 -0
- package/server/service/financial-statement/financial-statement-query.ts +53 -0
- package/server/service/financial-statement/financial-statement-type.ts +51 -0
- package/server/service/financial-statement/financial-statement.ts +116 -0
- package/server/service/financial-statement/index.ts +10 -0
- package/server/service/fiscal-month/fiscal-month-mutation.ts +145 -0
- package/server/service/fiscal-month/fiscal-month-query.ts +58 -0
- package/server/service/fiscal-month/fiscal-month-type.ts +66 -0
- package/server/service/fiscal-month/fiscal-month.ts +84 -0
- package/server/service/fiscal-month/index.ts +7 -0
- package/server/service/fiscal-quarter/fiscal-quarter-mutation.ts +148 -0
- package/server/service/fiscal-quarter/fiscal-quarter-query.ts +60 -0
- package/server/service/fiscal-quarter/fiscal-quarter-type.ts +60 -0
- package/server/service/fiscal-quarter/fiscal-quarter.ts +80 -0
- package/server/service/fiscal-quarter/index.ts +7 -0
- package/server/service/fiscal-year/fiscal-year-mutation.ts +145 -0
- package/server/service/fiscal-year/fiscal-year-query.ts +53 -0
- package/server/service/fiscal-year/fiscal-year-type.ts +54 -0
- package/server/service/fiscal-year/fiscal-year.ts +76 -0
- package/server/service/fiscal-year/index.ts +7 -0
- package/server/service/income-statement/event-subscriber.ts +17 -0
- package/server/service/income-statement/income-statement-history.ts +133 -0
- package/server/service/income-statement/income-statement-line-item.ts +84 -0
- package/server/service/income-statement/income-statement-mutation.ts +147 -0
- package/server/service/income-statement/income-statement-query.ts +50 -0
- package/server/service/income-statement/income-statement-type.ts +51 -0
- package/server/service/income-statement/income-statement.ts +120 -0
- package/server/service/income-statement/index.ts +10 -0
- package/server/service/index.ts +108 -0
- package/server/service/payment/event-subscriber.ts +17 -0
- package/server/service/payment/index.ts +9 -0
- package/server/service/payment/payment-history.ts +132 -0
- package/server/service/payment/payment-mutation.ts +139 -0
- package/server/service/payment/payment-query.ts +50 -0
- package/server/service/payment/payment-type.ts +64 -0
- package/server/service/payment/payment.ts +123 -0
- package/server/service/transaction/event-subscriber.ts +17 -0
- package/server/service/transaction/index.ts +9 -0
- package/server/service/transaction/transaction-history.ts +161 -0
- package/server/service/transaction/transaction-mutation.ts +146 -0
- package/server/service/transaction/transaction-query.ts +50 -0
- package/server/service/transaction/transaction-type.ts +48 -0
- package/server/service/transaction/transaction.ts +230 -0
- package/server/tsconfig.json +10 -0
- package/dist-client/pages/bank/bank-importer.d.ts +0 -23
- package/dist-client/pages/bank/bank-importer.js +0 -93
- package/dist-client/pages/bank/bank-importer.js.map +0 -1
- package/dist-client/pages/bank/bank-list-page.d.ts +0 -66
- package/dist-client/pages/bank/bank-list-page.js +0 -370
- package/dist-client/pages/bank/bank-list-page.js.map +0 -1
- package/dist-client/pages/bank-account/bank-account-importer.d.ts +0 -23
- package/dist-client/pages/bank-account/bank-account-importer.js +0 -93
- package/dist-client/pages/bank-account/bank-account-importer.js.map +0 -1
- package/dist-client/pages/bank-account/bank-account-list-page.d.ts +0 -66
- package/dist-client/pages/bank-account/bank-account-list-page.js +0 -370
- package/dist-client/pages/bank-account/bank-account-list-page.js.map +0 -1
- package/dist-client/pages/financial-institution/financial-institution-importer.d.ts +0 -23
- package/dist-client/pages/financial-institution/financial-institution-importer.js +0 -93
- package/dist-client/pages/financial-institution/financial-institution-importer.js.map +0 -1
- package/dist-client/pages/financial-institution/financial-institution-list-page.d.ts +0 -66
- package/dist-client/pages/financial-institution/financial-institution-list-page.js +0 -370
- package/dist-client/pages/financial-institution/financial-institution-list-page.js.map +0 -1
- package/dist-server/migrations/1725201567284-seed-country-codes.d.ts +0 -5
- package/dist-server/migrations/1725201567284-seed-country-codes.js +0 -248
- package/dist-server/migrations/1725201567284-seed-country-codes.js.map +0 -1
- package/dist-server/migrations/1725201667385-seed-financial-institutions.d.ts +0 -5
- package/dist-server/migrations/1725201667385-seed-financial-institutions.js +0 -348
- package/dist-server/migrations/1725201667385-seed-financial-institutions.js.map +0 -1
- package/dist-server/service/bank-account/bank-account-history.d.ts +0 -34
- package/dist-server/service/bank-account/bank-account-history.js +0 -172
- package/dist-server/service/bank-account/bank-account-history.js.map +0 -1
- package/dist-server/service/bank-account/bank-account-mutation.d.ts +0 -10
- package/dist-server/service/bank-account/bank-account-mutation.js +0 -128
- package/dist-server/service/bank-account/bank-account-mutation.js.map +0 -1
- package/dist-server/service/bank-account/bank-account-query.d.ts +0 -11
- package/dist-server/service/bank-account/bank-account-query.js +0 -79
- package/dist-server/service/bank-account/bank-account-query.js.map +0 -1
- package/dist-server/service/bank-account/bank-account-type.d.ts +0 -39
- package/dist-server/service/bank-account/bank-account-type.js +0 -153
- package/dist-server/service/bank-account/bank-account-type.js.map +0 -1
- package/dist-server/service/bank-account/bank-account.d.ts +0 -38
- package/dist-server/service/bank-account/bank-account.js +0 -164
- package/dist-server/service/bank-account/bank-account.js.map +0 -1
- package/dist-server/service/bank-account/event-subscriber.d.ts +0 -7
- package/dist-server/service/bank-account/event-subscriber.js +0 -21
- package/dist-server/service/bank-account/event-subscriber.js.map +0 -1
- package/dist-server/service/bank-account/index.d.ts +0 -7
- package/dist-server/service/bank-account/index.js +0 -12
- package/dist-server/service/bank-account/index.js.map +0 -1
- package/dist-server/service/financial-institution/financial-institution-mutation.d.ts +0 -10
- package/dist-server/service/financial-institution/financial-institution-mutation.js +0 -169
- package/dist-server/service/financial-institution/financial-institution-mutation.js.map +0 -1
- package/dist-server/service/financial-institution/financial-institution-query.d.ts +0 -12
- package/dist-server/service/financial-institution/financial-institution-query.js +0 -97
- package/dist-server/service/financial-institution/financial-institution-query.js.map +0 -1
- package/dist-server/service/financial-institution/financial-institution-type.d.ts +0 -32
- package/dist-server/service/financial-institution/financial-institution-type.js +0 -126
- package/dist-server/service/financial-institution/financial-institution-type.js.map +0 -1
- package/dist-server/service/financial-institution/financial-institution.d.ts +0 -34
- package/dist-server/service/financial-institution/financial-institution.js +0 -137
- package/dist-server/service/financial-institution/financial-institution.js.map +0 -1
- package/dist-server/service/financial-institution/index.d.ts +0 -6
- package/dist-server/service/financial-institution/index.js +0 -10
- package/dist-server/service/financial-institution/index.js.map +0 -1
- package/helps/accounting/bank-account.md +0 -160
- package/helps/accounting/bank.md +0 -160
- package/helps/accounting/financial-institution.md +0 -160
@@ -2,15 +2,14 @@ export * from './income-statement/income-statement';
|
|
2
2
|
export * from './financial-statement/financial-statement';
|
3
3
|
export * from './accounting-category/accounting-category';
|
4
4
|
export * from './transaction/transaction';
|
5
|
-
export * from './bank-account/bank-account';
|
6
5
|
export * from './payment/payment';
|
7
6
|
export * from './account/account';
|
8
7
|
export * from './accounting-document/accounting-document';
|
9
8
|
export * from './fiscal-month/fiscal-month';
|
10
9
|
export * from './fiscal-quarter/fiscal-quarter';
|
11
10
|
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("./
|
11
|
+
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("./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 | typeof import("./payment/payment-history").PaymentHistory)[];
|
13
12
|
export declare const subscribers: any[];
|
14
13
|
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("./
|
14
|
+
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("./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)[];
|
16
15
|
};
|
@@ -7,7 +7,6 @@ tslib_1.__exportStar(require("./income-statement/income-statement"), 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
|
-
tslib_1.__exportStar(require("./bank-account/bank-account"), exports);
|
11
10
|
tslib_1.__exportStar(require("./payment/payment"), exports);
|
12
11
|
tslib_1.__exportStar(require("./account/account"), exports);
|
13
12
|
tslib_1.__exportStar(require("./accounting-document/accounting-document"), exports);
|
@@ -19,7 +18,6 @@ const income_statement_1 = require("./income-statement");
|
|
19
18
|
const financial_statement_1 = require("./financial-statement");
|
20
19
|
const accounting_category_1 = require("./accounting-category");
|
21
20
|
const transaction_1 = require("./transaction");
|
22
|
-
const bank_account_1 = require("./bank-account");
|
23
21
|
const payment_1 = require("./payment");
|
24
22
|
const account_1 = require("./account");
|
25
23
|
const accounting_document_1 = require("./accounting-document");
|
@@ -34,7 +32,6 @@ exports.entities = [
|
|
34
32
|
...transaction_1.entities,
|
35
33
|
...account_1.entities,
|
36
34
|
...accounting_document_1.entities,
|
37
|
-
...bank_account_1.entities,
|
38
35
|
...payment_1.entities,
|
39
36
|
...fiscal_month_1.entities,
|
40
37
|
...fiscal_quarter_1.entities,
|
@@ -47,7 +44,6 @@ exports.subscribers = [
|
|
47
44
|
...accounting_category_1.subscribers,
|
48
45
|
...transaction_1.subscribers,
|
49
46
|
...payment_1.subscribers,
|
50
|
-
...bank_account_1.subscribers,
|
51
47
|
...account_1.subscribers,
|
52
48
|
...accounting_document_1.subscribers,
|
53
49
|
...fiscal_year_1.subscribers,
|
@@ -63,7 +59,6 @@ exports.schema = {
|
|
63
59
|
...accounting_category_1.resolvers,
|
64
60
|
...transaction_1.resolvers,
|
65
61
|
...payment_1.resolvers,
|
66
|
-
...bank_account_1.resolvers,
|
67
62
|
...account_1.resolvers,
|
68
63
|
...accounting_document_1.resolvers,
|
69
64
|
...fiscal_month_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,
|
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,4DAAiC;AACjC,4DAAiC;AACjC,oFAAyD;AACzD,sEAA2C;AAC3C,0EAA+C;AAC/C,oEAAyC;AAEzC,mCAAmC;AACnC,yDAI2B;AAC3B,+DAI8B;AAC9B,+DAI8B;AAC9B,+CAIsB;AACtB,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,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,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,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 './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 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 ...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 ...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 ...AccountResolvers,\n ...AccountingDocumentResolvers,\n ...FiscalMonthResolvers,\n ...FiscalQuarterResolvers,\n ...FiscalYearResolvers\n ]\n}\n"]}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { Payment } from './payment';
|
2
|
+
import { PaymentHistory } from './payment-history';
|
2
3
|
import { PaymentHistoryEntitySubscriber } from './event-subscriber';
|
3
4
|
import { PaymentQuery } from './payment-query';
|
4
5
|
import { PaymentMutation } from './payment-mutation';
|
5
|
-
export declare const entities: (typeof Payment)[];
|
6
|
+
export declare const entities: (typeof Payment | typeof PaymentHistory)[];
|
6
7
|
export declare const resolvers: (typeof PaymentQuery | typeof PaymentMutation)[];
|
7
8
|
export declare const subscribers: (typeof PaymentHistoryEntitySubscriber)[];
|
@@ -2,8 +2,7 @@ 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
|
6
|
-
import { BankAccount } from '../bank-account/bank-account';
|
5
|
+
import { Payment, PaymentDirection } from './payment';
|
7
6
|
export declare class PaymentHistory implements HistoryEntityInterface<Payment> {
|
8
7
|
readonly id: string;
|
9
8
|
version?: number;
|
@@ -11,13 +10,7 @@ export declare class PaymentHistory implements HistoryEntityInterface<Payment> {
|
|
11
10
|
domainId?: string;
|
12
11
|
transaction: Transaction;
|
13
12
|
transactionId: string;
|
14
|
-
currency?: string;
|
15
13
|
amount: number;
|
16
|
-
paymentType: PaymentType;
|
17
|
-
sourceBankAccount?: BankAccount;
|
18
|
-
sourceBankAccountId?: string;
|
19
|
-
destinationBankAccount?: BankAccount;
|
20
|
-
destinationBankAccountId?: string;
|
21
14
|
year?: number;
|
22
15
|
quarter?: number;
|
23
16
|
month?: number;
|
@@ -10,7 +10,6 @@ const env_1 = require("@things-factory/env");
|
|
10
10
|
const shell_1 = require("@things-factory/shell");
|
11
11
|
const transaction_1 = require("../transaction/transaction");
|
12
12
|
const payment_1 = require("./payment");
|
13
|
-
const bank_account_1 = require("../bank-account/bank-account");
|
14
13
|
const ORMCONFIG = env_1.config.get('ormconfig', {});
|
15
14
|
const DATABASE_TYPE = ORMCONFIG.type;
|
16
15
|
let PaymentHistory = class PaymentHistory {
|
@@ -40,76 +39,46 @@ tslib_1.__decorate([
|
|
40
39
|
], PaymentHistory.prototype, "domainId", void 0);
|
41
40
|
tslib_1.__decorate([
|
42
41
|
(0, typeorm_1.ManyToOne)(type => transaction_1.Transaction, transaction => transaction.payments),
|
43
|
-
(0, type_graphql_1.Field)(type => transaction_1.Transaction
|
44
|
-
tslib_1.__metadata("design:type", transaction_1.Transaction
|
45
|
-
)
|
42
|
+
(0, type_graphql_1.Field)(type => transaction_1.Transaction),
|
43
|
+
tslib_1.__metadata("design:type", transaction_1.Transaction)
|
46
44
|
], PaymentHistory.prototype, "transaction", void 0);
|
47
45
|
tslib_1.__decorate([
|
48
46
|
(0, typeorm_1.RelationId)((payment) => payment.transaction),
|
49
47
|
tslib_1.__metadata("design:type", String)
|
50
48
|
], PaymentHistory.prototype, "transactionId", void 0);
|
51
|
-
tslib_1.__decorate([
|
52
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
53
|
-
(0, type_graphql_1.Field)({ nullable: true, description: 'The currency used in the payment' }),
|
54
|
-
tslib_1.__metadata("design:type", String)
|
55
|
-
], PaymentHistory.prototype, "currency", void 0);
|
56
49
|
tslib_1.__decorate([
|
57
50
|
(0, typeorm_1.Column)({ nullable: false }),
|
58
|
-
(0, type_graphql_1.Field)({ nullable: false
|
51
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
59
52
|
tslib_1.__metadata("design:type", Number)
|
60
53
|
], PaymentHistory.prototype, "amount", void 0);
|
61
|
-
tslib_1.__decorate([
|
62
|
-
(0, typeorm_1.Column)(),
|
63
|
-
(0, type_graphql_1.Field)(type => payment_1.PaymentType, { description: 'Type of the payment' }),
|
64
|
-
tslib_1.__metadata("design:type", String)
|
65
|
-
], PaymentHistory.prototype, "paymentType", void 0);
|
66
|
-
tslib_1.__decorate([
|
67
|
-
(0, typeorm_1.ManyToOne)(type => bank_account_1.BankAccount, { nullable: true }),
|
68
|
-
(0, type_graphql_1.Field)(type => bank_account_1.BankAccount, { nullable: true, description: 'Source bank account for the payment' }),
|
69
|
-
tslib_1.__metadata("design:type", bank_account_1.BankAccount)
|
70
|
-
], PaymentHistory.prototype, "sourceBankAccount", void 0);
|
71
|
-
tslib_1.__decorate([
|
72
|
-
(0, typeorm_1.RelationId)((payment) => payment.sourceBankAccount),
|
73
|
-
tslib_1.__metadata("design:type", String)
|
74
|
-
], PaymentHistory.prototype, "sourceBankAccountId", void 0);
|
75
|
-
tslib_1.__decorate([
|
76
|
-
(0, typeorm_1.ManyToOne)(type => bank_account_1.BankAccount, { nullable: true }),
|
77
|
-
(0, type_graphql_1.Field)(type => bank_account_1.BankAccount, { nullable: true, description: 'Destination bank account for the payment' }),
|
78
|
-
tslib_1.__metadata("design:type", bank_account_1.BankAccount)
|
79
|
-
], PaymentHistory.prototype, "destinationBankAccount", void 0);
|
80
|
-
tslib_1.__decorate([
|
81
|
-
(0, typeorm_1.RelationId)((payment) => payment.destinationBankAccount),
|
82
|
-
tslib_1.__metadata("design:type", String)
|
83
|
-
], PaymentHistory.prototype, "destinationBankAccountId", void 0);
|
84
54
|
tslib_1.__decorate([
|
85
55
|
(0, typeorm_1.Column)({ nullable: true }),
|
86
|
-
(0, type_graphql_1.Field)({ nullable: true, description: '
|
56
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'fiscal year' }),
|
87
57
|
tslib_1.__metadata("design:type", Number)
|
88
58
|
], PaymentHistory.prototype, "year", void 0);
|
89
59
|
tslib_1.__decorate([
|
90
60
|
(0, typeorm_1.Column)({ nullable: true }),
|
91
|
-
(0, type_graphql_1.Field)({ nullable: true, description: '
|
61
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'fiscal quarter' }),
|
92
62
|
tslib_1.__metadata("design:type", Number)
|
93
63
|
], PaymentHistory.prototype, "quarter", void 0);
|
94
64
|
tslib_1.__decorate([
|
95
65
|
(0, typeorm_1.Column)({ nullable: true }),
|
96
|
-
(0, type_graphql_1.Field)({ nullable: true, description: '
|
66
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'fiscal month' }),
|
97
67
|
tslib_1.__metadata("design:type", Number)
|
98
68
|
], PaymentHistory.prototype, "month", void 0);
|
99
69
|
tslib_1.__decorate([
|
100
70
|
(0, typeorm_1.Column)({ nullable: false }),
|
101
|
-
(0, type_graphql_1.Field)({ nullable: false
|
102
|
-
tslib_1.__metadata("design:type", Date
|
103
|
-
)
|
71
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
72
|
+
tslib_1.__metadata("design:type", Date)
|
104
73
|
], PaymentHistory.prototype, "paidAt", void 0);
|
105
74
|
tslib_1.__decorate([
|
106
75
|
(0, typeorm_1.Column)({ nullable: false }),
|
107
|
-
(0, type_graphql_1.Field)(type => payment_1.PaymentDirection
|
76
|
+
(0, type_graphql_1.Field)(type => payment_1.PaymentDirection),
|
108
77
|
tslib_1.__metadata("design:type", String)
|
109
78
|
], PaymentHistory.prototype, "direction", void 0);
|
110
79
|
tslib_1.__decorate([
|
111
80
|
(0, typeorm_1.Column)({ nullable: true }),
|
112
|
-
(0, type_graphql_1.Field)({ nullable: true
|
81
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
113
82
|
tslib_1.__metadata("design:type", String)
|
114
83
|
], PaymentHistory.prototype, "note", void 0);
|
115
84
|
tslib_1.__decorate([
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"payment-history.js","sourceRoot":"","sources":["../../../server/service/payment/payment-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAA8F;AAE9F,8DAKiC;AACjC,yDAAsD;AACtD,6CAA4C;AAC5C,iDAA8C;AAE9C,4DAAwD;AACxD,uCAAkE;AAClE,+DAA0D;AAE1D,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAc7B,IAAM,cAAc,GAApB,MAAM,cAAc;IAApB;QAOL,YAAO,GAAY,CAAC,CAAA;IAmHtB,CAAC;CAAA,CAAA;AA1HY,wCAAc;AAGhB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;0CACC;AAInB;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACtC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACN;AAIpB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,E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AAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC,EAC9G,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;GAC5C,cAAc,CA0H1B","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 { Transaction } from '../transaction/transaction'\nimport { Payment, PaymentDirection, PaymentType } from './payment'\nimport { BankAccount } from '../bank-account/bank-account'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index(\n 'ix_payment_history_0',\n (paymentHistory: PaymentHistory) => [paymentHistory.originalId, paymentHistory.version],\n { unique: true }\n)\n@Index(\n 'ix_payment_history_1',\n (paymentHistory: PaymentHistory) => [paymentHistory.domain, paymentHistory.originalId, paymentHistory.version],\n { unique: true }\n)\n@ObjectType({ description: 'History Entity of Payment' })\nexport class PaymentHistory implements HistoryEntityInterface<Payment> {\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((payment: Payment) => payment.domain)\n domainId?: string\n\n @ManyToOne(type => Transaction, transaction => transaction.payments)\n @Field(type => Transaction, { description: 'The transaction associated with this payment' })\n transaction: Transaction // 결제와 연결된 트랜잭션\n\n @RelationId((payment: Payment) => payment.transaction)\n transactionId: string // 연결된 트랜잭션의 ID\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The currency used in the payment' })\n currency?: string // 결제에 사용된 통화\n\n @Column({ nullable: false })\n @Field({ nullable: false, description: 'The amount of money involved in the payment' })\n amount: number // 결제된 금액\n\n @Column()\n @Field(type => PaymentType, { description: 'Type of the payment' })\n paymentType: PaymentType // 결제 유형\n\n @ManyToOne(type => BankAccount, { nullable: true })\n @Field(type => BankAccount, { nullable: true, description: 'Source bank account for the payment' })\n sourceBankAccount?: BankAccount\n\n @RelationId((payment: Payment) => payment.sourceBankAccount)\n sourceBankAccountId?: string\n\n @ManyToOne(type => BankAccount, { nullable: true })\n @Field(type => BankAccount, { nullable: true, description: 'Destination bank account for the payment' })\n destinationBankAccount?: BankAccount\n\n @RelationId((payment: Payment) => payment.destinationBankAccount)\n destinationBankAccountId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal year in which the payment was made' })\n year?: number // 결제가 발생한 회계 연도\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal quarter in which the payment was made' })\n quarter?: number // 결제가 발생한 회계 분기\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal month in which the payment was made' })\n month?: number // 결제가 발생한 회계 월\n\n @Column({ nullable: false })\n @Field({ nullable: false, description: 'The date and time when the payment was made' })\n paidAt: Date // 결제가 이루어진 날짜 및 시간\n\n @Column({ nullable: false })\n @Field(type => PaymentDirection, { description: 'Direction of the payment (Incoming or Outgoing)' })\n direction: PaymentDirection // 결제 방향 (수금 또는 지출)\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Additional notes or comments about the payment' })\n note?: 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(type => User, { nullable: true })\n creator?: User\n\n @RelationId((payment: Payment) => payment.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((payment: Payment) => payment.updater)\n updaterId?: string\n\n @Field(type => String, { nullable: true })\n thumbnail?: 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 : DATABASE_TYPE == 'mssql'\n ? 'nvarchar'\n : 'varchar',\n enum:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? HistoryActionType\n : undefined,\n length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10\n })\n public action!: HistoryActionType\n}\n"]}
|
1
|
+
{"version":3,"file":"payment-history.js","sourceRoot":"","sources":["../../../server/service/payment/payment-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAA8F;AAE9F,8DAKiC;AACjC,yDAAsD;AACtD,6CAA4C;AAC5C,iDAA8C;AAE9C,4DAAwD;AACxD,uCAAqD;AAErD,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAc7B,IAAM,cAAc,GAApB,MAAM,cAAc;IAApB;QAOL,YAAO,GAAY,CAAC,CAAA;IA6FtB,CAAC;CAAA,CAAA;AApGY,wCAAc;AAGhB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;0CACC;AAInB;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,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AAU,EAAE,cAAc,CAAC,OAAO,CAAC,EACvF,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,eAAK,EACJ,sBAAsB,EACtB,CAAC,cAA8B,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC,EAC9G,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;GAC5C,cAAc,CAoG1B","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 { Transaction } from '../transaction/transaction'\nimport { Payment, PaymentDirection } from './payment'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index(\n 'ix_payment_history_0',\n (paymentHistory: PaymentHistory) => [paymentHistory.originalId, paymentHistory.version],\n { unique: true }\n)\n@Index(\n 'ix_payment_history_1',\n (paymentHistory: PaymentHistory) => [paymentHistory.domain, paymentHistory.originalId, paymentHistory.version],\n { unique: true }\n)\n@ObjectType({ description: 'History Entity of Payment' })\nexport class PaymentHistory implements HistoryEntityInterface<Payment> {\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((payment: Payment) => payment.domain)\n domainId?: string\n\n @ManyToOne(type => Transaction, transaction => transaction.payments)\n @Field(type => Transaction)\n transaction: Transaction\n\n @RelationId((payment: Payment) => payment.transaction)\n transactionId: string\n\n @Column({ nullable: false })\n @Field({ nullable: false })\n amount: number\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, description: 'fiscal month' })\n month?: number\n\n @Column({ nullable: false })\n @Field({ nullable: false })\n paidAt: Date\n\n @Column({ nullable: false })\n @Field(type => PaymentDirection)\n direction: PaymentDirection\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n note?: 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(type => User, { nullable: true })\n creator?: User\n\n @RelationId((payment: Payment) => payment.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((payment: Payment) => payment.updater)\n updaterId?: string\n\n @Field(type => String, { nullable: true })\n thumbnail?: 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 : DATABASE_TYPE == 'mssql'\n ? 'nvarchar'\n : 'varchar',\n enum:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? HistoryActionType\n : undefined,\n length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10\n })\n public action!: HistoryActionType\n}\n"]}
|
@@ -1,14 +1,11 @@
|
|
1
1
|
import { ObjectRef } from '@things-factory/shell';
|
2
|
-
import { Payment, PaymentDirection
|
2
|
+
import { Payment, PaymentDirection } from './payment';
|
3
3
|
export declare class NewPayment {
|
4
4
|
transaction: ObjectRef;
|
5
5
|
currency?: string;
|
6
6
|
amount: number;
|
7
7
|
paidAt: Date;
|
8
8
|
direction: PaymentDirection;
|
9
|
-
paymentType: PaymentType;
|
10
|
-
sourceBankAccount?: ObjectRef;
|
11
|
-
destinationBankAccount?: ObjectRef;
|
12
9
|
note?: string;
|
13
10
|
}
|
14
11
|
export declare class PaymentPatch {
|
@@ -18,9 +15,6 @@ export declare class PaymentPatch {
|
|
18
15
|
amount: number;
|
19
16
|
paidAt: Date;
|
20
17
|
direction: PaymentDirection;
|
21
|
-
paymentType: PaymentType;
|
22
|
-
sourceBankAccount?: ObjectRef;
|
23
|
-
destinationBankAccount?: ObjectRef;
|
24
18
|
note?: string;
|
25
19
|
cuFlag?: string;
|
26
20
|
}
|
@@ -28,18 +28,6 @@ tslib_1.__decorate([
|
|
28
28
|
(0, type_graphql_1.Field)(type => payment_1.PaymentDirection),
|
29
29
|
tslib_1.__metadata("design:type", String)
|
30
30
|
], NewPayment.prototype, "direction", void 0);
|
31
|
-
tslib_1.__decorate([
|
32
|
-
(0, type_graphql_1.Field)(type => payment_1.PaymentType, { description: 'Type of the payment' }),
|
33
|
-
tslib_1.__metadata("design:type", String)
|
34
|
-
], NewPayment.prototype, "paymentType", void 0);
|
35
|
-
tslib_1.__decorate([
|
36
|
-
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true, description: 'Source bank account for the payment' }),
|
37
|
-
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
38
|
-
], NewPayment.prototype, "sourceBankAccount", void 0);
|
39
|
-
tslib_1.__decorate([
|
40
|
-
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true, description: 'Destination bank account for the payment' }),
|
41
|
-
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
42
|
-
], NewPayment.prototype, "destinationBankAccount", void 0);
|
43
31
|
tslib_1.__decorate([
|
44
32
|
(0, type_graphql_1.Field)({ nullable: true }),
|
45
33
|
tslib_1.__metadata("design:type", String)
|
@@ -74,18 +62,6 @@ tslib_1.__decorate([
|
|
74
62
|
(0, type_graphql_1.Field)(type => payment_1.PaymentDirection),
|
75
63
|
tslib_1.__metadata("design:type", String)
|
76
64
|
], PaymentPatch.prototype, "direction", void 0);
|
77
|
-
tslib_1.__decorate([
|
78
|
-
(0, type_graphql_1.Field)(type => payment_1.PaymentType, { description: 'Type of the payment' }),
|
79
|
-
tslib_1.__metadata("design:type", String)
|
80
|
-
], PaymentPatch.prototype, "paymentType", void 0);
|
81
|
-
tslib_1.__decorate([
|
82
|
-
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true, description: 'Source bank account for the payment' }),
|
83
|
-
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
84
|
-
], PaymentPatch.prototype, "sourceBankAccount", void 0);
|
85
|
-
tslib_1.__decorate([
|
86
|
-
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true, description: 'Destination bank account for the payment' }),
|
87
|
-
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
88
|
-
], PaymentPatch.prototype, "destinationBankAccount", void 0);
|
89
65
|
tslib_1.__decorate([
|
90
66
|
(0, type_graphql_1.Field)({ nullable: true }),
|
91
67
|
tslib_1.__metadata("design:type", String)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"payment-type.js","sourceRoot":"","sources":["../../../server/service/payment/payment-type.ts"],"names":[],"mappings":";;;;AAEA,+CAAsF;AAEtF,iDAA+D;AAE/D,
|
1
|
+
{"version":3,"file":"payment-type.js","sourceRoot":"","sources":["../../../server/service/payment/payment-type.ts"],"names":[],"mappings":";;;;AAEA,+CAAsF;AAEtF,iDAA+D;AAE/D,uCAAqD;AAG9C,IAAM,UAAU,GAAhB,MAAM,UAAU;CAkBtB,CAAA;AAlBY,gCAAU;AAErB;IAD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AAQ,EAAE,IAAI,EAAE,CAAC;;4CACX;uBAvBJ,YAAY;IADxB,IAAA,wBAAS,GAAE;GACC,YAAY,CAwBxB;AAGM,IAAM,WAAW,GAAjB,MAAM,WAAW;CAMvB,CAAA;AANY,kCAAW;AAEtB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,iBAAO,CAAC,CAAC;;0CACT;AAGhB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;0CACN;sBALF,WAAW;IADvB,IAAA,yBAAU,GAAE;GACA,WAAW,CAMvB","sourcesContent":["import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'\nimport GraphQLUpload from 'graphql-upload/GraphQLUpload.js'\nimport { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { ObjectRef, ScalarObject } from '@things-factory/shell'\n\nimport { Payment, PaymentDirection } from './payment'\n\n@InputType()\nexport class NewPayment {\n @Field(type => ObjectRef)\n transaction: ObjectRef\n\n @Field({ nullable: true })\n currency?: string\n\n @Field({ nullable: false })\n amount: number\n\n @Field({ nullable: false })\n paidAt: Date\n\n @Field(type => PaymentDirection)\n direction: PaymentDirection\n\n @Field({ nullable: true })\n note?: string\n}\n\n@InputType()\nexport class PaymentPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field(type => ObjectRef)\n transaction: ObjectRef\n\n @Field({ nullable: true })\n currency?: string\n\n @Field({ nullable: false })\n amount: number\n\n @Field({ nullable: false })\n paidAt: Date\n\n @Field(type => PaymentDirection)\n direction: PaymentDirection\n\n @Field({ nullable: true })\n note?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class PaymentList {\n @Field(type => [Payment])\n items: Payment[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
@@ -1,17 +1,10 @@
|
|
1
1
|
import { Domain } from '@things-factory/shell';
|
2
2
|
import { User } from '@things-factory/auth-base';
|
3
3
|
import { Transaction } from '../transaction/transaction';
|
4
|
-
import { BankAccount } from '../bank-account/bank-account';
|
5
4
|
export declare enum PaymentDirection {
|
6
5
|
Incoming = "Incoming",// 수금
|
7
6
|
Outgoing = "Outgoing"
|
8
7
|
}
|
9
|
-
export declare enum PaymentType {
|
10
|
-
Transfer = "Transfer",// 계좌 이체
|
11
|
-
Cash = "Cash",// 현금
|
12
|
-
CreditCard = "CreditCard",// 신용카드
|
13
|
-
DebitCard = "DebitCard"
|
14
|
-
}
|
15
8
|
export declare class Payment {
|
16
9
|
readonly id: string;
|
17
10
|
version?: number;
|
@@ -21,11 +14,6 @@ export declare class Payment {
|
|
21
14
|
transactionId: string;
|
22
15
|
currency?: string;
|
23
16
|
amount: number;
|
24
|
-
paymentType: PaymentType;
|
25
|
-
sourceBankAccount?: BankAccount;
|
26
|
-
sourceBankAccountId?: string;
|
27
|
-
destinationBankAccount?: BankAccount;
|
28
|
-
destinationBankAccountId?: string;
|
29
17
|
year?: number;
|
30
18
|
quarter?: number;
|
31
19
|
month?: number;
|
@@ -1,13 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Payment = exports.
|
3
|
+
exports.Payment = exports.PaymentDirection = 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
9
|
const transaction_1 = require("../transaction/transaction");
|
10
|
-
const bank_account_1 = require("../bank-account/bank-account");
|
11
10
|
var PaymentDirection;
|
12
11
|
(function (PaymentDirection) {
|
13
12
|
PaymentDirection["Incoming"] = "Incoming";
|
@@ -17,17 +16,6 @@ var PaymentDirection;
|
|
17
16
|
name: 'PaymentDirection',
|
18
17
|
description: 'Indicates whether the payment is incoming (received) or outgoing (paid)' // 결제 방향을 나타냅니다 (수금 또는 지출)
|
19
18
|
});
|
20
|
-
var PaymentType;
|
21
|
-
(function (PaymentType) {
|
22
|
-
PaymentType["Transfer"] = "Transfer";
|
23
|
-
PaymentType["Cash"] = "Cash";
|
24
|
-
PaymentType["CreditCard"] = "CreditCard";
|
25
|
-
PaymentType["DebitCard"] = "DebitCard"; // 직불카드
|
26
|
-
})(PaymentType || (exports.PaymentType = PaymentType = {}));
|
27
|
-
(0, type_graphql_1.registerEnumType)(PaymentType, {
|
28
|
-
name: 'PaymentType',
|
29
|
-
description: 'Type of the payment (e.g., Transfer, Cash, CreditCard, DebitCard)' // 결제 유형을 나타냅니다
|
30
|
-
});
|
31
19
|
let Payment = class Payment {
|
32
20
|
constructor() {
|
33
21
|
this.version = 1; // 낙관적 잠금을 위한 버전 관리 필드
|
@@ -74,29 +62,6 @@ tslib_1.__decorate([
|
|
74
62
|
(0, type_graphql_1.Field)({ nullable: false, description: 'The amount of money involved in the payment' }),
|
75
63
|
tslib_1.__metadata("design:type", Number)
|
76
64
|
], Payment.prototype, "amount", void 0);
|
77
|
-
tslib_1.__decorate([
|
78
|
-
(0, typeorm_1.Column)({ nullable: false }),
|
79
|
-
(0, type_graphql_1.Field)(type => PaymentType, { description: 'Type of the payment' }),
|
80
|
-
tslib_1.__metadata("design:type", String)
|
81
|
-
], Payment.prototype, "paymentType", void 0);
|
82
|
-
tslib_1.__decorate([
|
83
|
-
(0, typeorm_1.ManyToOne)(type => bank_account_1.BankAccount, { nullable: true }),
|
84
|
-
(0, type_graphql_1.Field)(type => bank_account_1.BankAccount, { nullable: true, description: 'Source bank account for the payment' }),
|
85
|
-
tslib_1.__metadata("design:type", bank_account_1.BankAccount)
|
86
|
-
], Payment.prototype, "sourceBankAccount", void 0);
|
87
|
-
tslib_1.__decorate([
|
88
|
-
(0, typeorm_1.RelationId)((payment) => payment.sourceBankAccount),
|
89
|
-
tslib_1.__metadata("design:type", String)
|
90
|
-
], Payment.prototype, "sourceBankAccountId", void 0);
|
91
|
-
tslib_1.__decorate([
|
92
|
-
(0, typeorm_1.ManyToOne)(type => bank_account_1.BankAccount, { nullable: true }),
|
93
|
-
(0, type_graphql_1.Field)(type => bank_account_1.BankAccount, { nullable: true, description: 'Destination bank account for the payment' }),
|
94
|
-
tslib_1.__metadata("design:type", bank_account_1.BankAccount)
|
95
|
-
], Payment.prototype, "destinationBankAccount", void 0);
|
96
|
-
tslib_1.__decorate([
|
97
|
-
(0, typeorm_1.RelationId)((payment) => payment.destinationBankAccount),
|
98
|
-
tslib_1.__metadata("design:type", String)
|
99
|
-
], Payment.prototype, "destinationBankAccountId", void 0);
|
100
65
|
tslib_1.__decorate([
|
101
66
|
(0, typeorm_1.Column)({ nullable: true }),
|
102
67
|
(0, type_graphql_1.Field)({ nullable: true, description: 'Fiscal year in which the payment was made' }),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../server/service/payment/payment.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAAsE;AAEtE,iDAA8C;AAC9C,yDAAgD;AAChD,4DAAwD;AACxD,+DAA0D;AAE1D,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,yCAAqB,CAAA;IACrB,yCAAqB,CAAA,CAAC,KAAK;AAC7B,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,IAAA,+BAAgB,EAAC,gBAAgB,EAAE;IACjC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,yEAAyE,CAAC,0BAA0B;CAClH,CAAC,CAAA;AAEF,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,oCAAqB,CAAA;IACrB,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,sCAAuB,CAAA,CAAC,OAAO;AACjC,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAED,IAAA,+BAAgB,EAAC,WAAW,EAAE;IAC5B,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,mEAAmE,CAAC,eAAe;CACjG,CAA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AAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,EACpG;QACE,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,sBAAsB;KAC9B,CACF;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,oDAAoD,EAAE,CAAC,CAAC,0BAA0B;GAChG,OAAO,CAkGnB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n VersionColumn,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Transaction } from '../transaction/transaction'\nimport { BankAccount } from '../bank-account/bank-account'\n\nexport enum PaymentDirection {\n Incoming = 'Incoming', // 수금\n Outgoing = 'Outgoing' // 지출\n}\n\nregisterEnumType(PaymentDirection, {\n name: 'PaymentDirection',\n description: 'Indicates whether the payment is incoming (received) or outgoing (paid)' // 결제 방향을 나타냅니다 (수금 또는 지출)\n})\n\nexport enum PaymentType {\n Transfer = 'Transfer', // 계좌 이체\n Cash = 'Cash', // 현금\n CreditCard = 'CreditCard', // 신용카드\n DebitCard = 'DebitCard' // 직불카드\n}\n\nregisterEnumType(PaymentType, {\n name: 'PaymentType',\n description: 'Type of the payment (e.g., Transfer, Cash, CreditCard, DebitCard)' // 결제 유형을 나타냅니다\n})\n\n@Entity()\n@Index('ix_payment_0', (payment: Payment) => [payment.domain, payment.transaction, payment.paidAt], {\n where: '\"deleted_at\" IS NULL',\n unique: true\n})\n@Index(\n 'ix_payment_1',\n (payment: Payment) => [payment.domain, payment.year, payment.quarter, payment.month, payment.paidAt],\n {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n }\n)\n@ObjectType({ description: 'Entity representing a Payment record in the system' }) // 시스템 내에서 결제 기록을 나타내는 엔티티\nexport class Payment {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier for the payment record' })\n readonly id: string // 고유 식별자 (UUID)\n\n @VersionColumn()\n @Field({ nullable: true, description: 'Version number used for optimistic locking' })\n version?: number = 1 // 낙관적 잠금을 위한 버전 관리 필드\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true, description: 'The domain to which this payment belongs' })\n domain?: Domain // 결제가 속한 도메인\n\n @RelationId((payment: Payment) => payment.domain)\n domainId?: string // 도메인의 ID\n\n @ManyToOne(type => Transaction, transaction => transaction.payments)\n @Field(type => Transaction, { description: 'The transaction associated with this payment' })\n transaction: Transaction // 결제와 연결된 트랜잭션\n\n @RelationId((payment: Payment) => payment.transaction)\n transactionId: string // 연결된 트랜잭션의 ID\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The currency used in the payment' })\n currency?: string // 결제에 사용된 통화\n\n @Column({ nullable: false })\n @Field({ nullable: false, description: 'The amount of money involved in the payment' })\n amount: number // 결제된 금액\n\n @Column({ nullable: false })\n @Field(type => PaymentType, { description: 'Type of the payment' })\n paymentType: PaymentType // 결제 유형\n\n @ManyToOne(type => BankAccount, { nullable: true })\n @Field(type => BankAccount, { nullable: true, description: 'Source bank account for the payment' })\n sourceBankAccount?: BankAccount\n\n @RelationId((payment: Payment) => payment.sourceBankAccount)\n sourceBankAccountId?: string\n\n @ManyToOne(type => BankAccount, { nullable: true })\n @Field(type => BankAccount, { nullable: true, description: 'Destination bank account for the payment' })\n destinationBankAccount?: BankAccount\n\n @RelationId((payment: Payment) => payment.destinationBankAccount)\n destinationBankAccountId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal year in which the payment was made' })\n year?: number // 결제가 발생한 회계 연도\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal quarter in which the payment was made' })\n quarter?: number // 결제가 발생한 회계 분기\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal month in which the payment was made' })\n month?: number // 결제가 발생한 회계 월\n\n @Column({ nullable: false })\n @Field({ nullable: false, description: 'The date and time when the payment was made' })\n paidAt: Date // 결제가 이루어진 날짜 및 시간\n\n @Column({ nullable: false })\n @Field(type => PaymentDirection, { description: 'Direction of the payment (Incoming or Outgoing)' })\n direction: PaymentDirection // 결제 방향 (수금 또는 지출)\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Additional notes or comments about the payment' })\n note?: string // 결제에 대한 추가 설명 또는 메모\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'The date and time when the payment record was created' })\n createdAt?: Date // 결제 레코드가 생성된 날짜 및 시간\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'The date and time when the payment record was last updated' })\n updatedAt?: Date // 결제 레코드가 마지막으로 업데이트된 날짜 및 시간\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'The date and time when the payment record was deleted' })\n deletedAt?: Date // 결제 레코드가 삭제된 날짜 및 시간\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who created the payment record' })\n creator?: User // 결제 레코드를 생성한 사용자\n\n @RelationId((payment: Payment) => payment.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 payment record' })\n updater?: User // 결제 레코드를 마지막으로 업데이트한 사용자\n\n @RelationId((payment: Payment) => payment.updater)\n updaterId?: string // 결제 레코드를 업데이트한 사용자의 ID\n}\n"]}
|
1
|
+
{"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../server/service/payment/payment.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAAsE;AAEtE,iDAA8C;AAC9C,yDAAgD;AAChD,4DAAwD;AAExD,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,yCAAqB,CAAA;IACrB,yCAAqB,CAAA,CAAC,KAAK;AAC7B,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,IAAA,+BAAgB,EAAC,gB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B,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;0CAChC;kBA/EP,OAAO;IAdnB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,cAAc,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE;QAClG,KAAK,EAAE,sBAAsB;QAC7B,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,eAAK,EACJ,cAAc,EACd,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,EACpG;QACE,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,sBAAsB;KAC9B,CACF;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,oDAAoD,EAAE,CAAC,CAAC,0BAA0B;GAChG,OAAO,CAgFnB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n VersionColumn,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Transaction } from '../transaction/transaction'\n\nexport enum PaymentDirection {\n Incoming = 'Incoming', // 수금\n Outgoing = 'Outgoing' // 지출\n}\n\nregisterEnumType(PaymentDirection, {\n name: 'PaymentDirection',\n description: 'Indicates whether the payment is incoming (received) or outgoing (paid)' // 결제 방향을 나타냅니다 (수금 또는 지출)\n})\n\n@Entity()\n@Index('ix_payment_0', (payment: Payment) => [payment.domain, payment.transaction, payment.paidAt], {\n where: '\"deleted_at\" IS NULL',\n unique: true\n})\n@Index(\n 'ix_payment_1',\n (payment: Payment) => [payment.domain, payment.year, payment.quarter, payment.month, payment.paidAt],\n {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n }\n)\n@ObjectType({ description: 'Entity representing a Payment record in the system' }) // 시스템 내에서 결제 기록을 나타내는 엔티티\nexport class Payment {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier for the payment record' })\n readonly id: string // 고유 식별자 (UUID)\n\n @VersionColumn()\n @Field({ nullable: true, description: 'Version number used for optimistic locking' })\n version?: number = 1 // 낙관적 잠금을 위한 버전 관리 필드\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true, description: 'The domain to which this payment belongs' })\n domain?: Domain // 결제가 속한 도메인\n\n @RelationId((payment: Payment) => payment.domain)\n domainId?: string // 도메인의 ID\n\n @ManyToOne(type => Transaction, transaction => transaction.payments)\n @Field(type => Transaction, { description: 'The transaction associated with this payment' })\n transaction: Transaction // 결제와 연결된 트랜잭션\n\n @RelationId((payment: Payment) => payment.transaction)\n transactionId: string // 연결된 트랜잭션의 ID\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The currency used in the payment' })\n currency?: string // 결제에 사용된 통화\n\n @Column({ nullable: false })\n @Field({ nullable: false, description: 'The amount of money involved in the payment' })\n amount: number // 결제된 금액\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal year in which the payment was made' })\n year?: number // 결제가 발생한 회계 연도\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal quarter in which the payment was made' })\n quarter?: number // 결제가 발생한 회계 분기\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal month in which the payment was made' })\n month?: number // 결제가 발생한 회계 월\n\n @Column({ nullable: false })\n @Field({ nullable: false, description: 'The date and time when the payment was made' })\n paidAt: Date // 결제가 이루어진 날짜 및 시간\n\n @Column({ nullable: false })\n @Field(type => PaymentDirection, { description: 'Direction of the payment (Incoming or Outgoing)' })\n direction: PaymentDirection // 결제 방향 (수금 또는 지출)\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Additional notes or comments about the payment' })\n note?: string // 결제에 대한 추가 설명 또는 메모\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'The date and time when the payment record was created' })\n createdAt?: Date // 결제 레코드가 생성된 날짜 및 시간\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'The date and time when the payment record was last updated' })\n updatedAt?: Date // 결제 레코드가 마지막으로 업데이트된 날짜 및 시간\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'The date and time when the payment record was deleted' })\n deletedAt?: Date // 결제 레코드가 삭제된 날짜 및 시간\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who created the payment record' })\n creator?: User // 결제 레코드를 생성한 사용자\n\n @RelationId((payment: Payment) => payment.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 payment record' })\n updater?: User // 결제 레코드를 마지막으로 업데이트한 사용자\n\n @RelationId((payment: Payment) => payment.updater)\n updaterId?: string // 결제 레코드를 업데이트한 사용자의 ID\n}\n"]}
|