@things-factory/accounting 7.0.1-beta.1 → 7.0.1-beta.10
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.
- package/dist-client/activities/activity-book-edit.d.ts +1 -1
- package/dist-client/activities/activity-book-edit.js.map +1 -1
- package/dist-client/activities/activity-book-view.d.ts +1 -1
- package/dist-client/activities/activity-book-view.js.map +1 -1
- package/dist-client/activities/activity-expense-edit.d.ts +1 -1
- package/dist-client/activities/activity-expense-edit.js.map +1 -1
- package/dist-client/activities/activity-expense-view.d.ts +1 -1
- package/dist-client/activities/activity-expense-view.js.map +1 -1
- package/dist-client/pages/account/account-importer.d.ts +1 -1
- package/dist-client/pages/account/account-importer.js.map +1 -1
- package/dist-client/pages/account/account-list-page.d.ts +1 -1
- package/dist-client/pages/account/account-list-page.js.map +1 -1
- package/dist-client/pages/accounting-category/accounting-category-importer.d.ts +1 -1
- package/dist-client/pages/accounting-category/accounting-category-importer.js.map +1 -1
- package/dist-client/pages/accounting-category/accounting-category-list-page.d.ts +1 -1
- package/dist-client/pages/accounting-category/accounting-category-list-page.js.map +1 -1
- package/dist-client/pages/financial-statement/financial-statement-importer.d.ts +1 -1
- package/dist-client/pages/financial-statement/financial-statement-importer.js.map +1 -1
- package/dist-client/pages/financial-statement/financial-statement-list-page.d.ts +1 -1
- package/dist-client/pages/financial-statement/financial-statement-list-page.js.map +1 -1
- package/dist-client/pages/income-statement/income-statement-importer.d.ts +1 -1
- package/dist-client/pages/income-statement/income-statement-importer.js.map +1 -1
- package/dist-client/pages/income-statement/income-statement-list-page.d.ts +1 -1
- package/dist-client/pages/income-statement/income-statement-list-page.js.map +1 -1
- package/dist-client/pages/ledger/ledger-importer.d.ts +1 -1
- package/dist-client/pages/ledger/ledger-importer.js.map +1 -1
- package/dist-client/pages/ledger/ledger-list-page.d.ts +1 -1
- package/dist-client/pages/ledger/ledger-list-page.js.map +1 -1
- package/dist-client/pages/main.js.map +1 -1
- package/dist-client/pages/transaction/transaction-importer.d.ts +1 -1
- package/dist-client/pages/transaction/transaction-importer.js.map +1 -1
- package/dist-client/pages/transaction/transaction-list-page.d.ts +1 -1
- package/dist-client/pages/transaction/transaction-list-page.js.map +1 -1
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/activities/activity-book.d.ts +58 -0
- package/dist-server/activities/activity-book.js.map +1 -1
- package/dist-server/activities/activity-expense.d.ts +58 -0
- package/dist-server/activities/activity-expense.js.map +1 -1
- package/dist-server/activities/index.d.ts +1 -0
- package/dist-server/activities/index.js +1 -1
- package/dist-server/activities/index.js.map +1 -1
- package/dist-server/controllers/index.d.ts +0 -0
- package/dist-server/index.d.ts +3 -0
- package/dist-server/middlewares/index.d.ts +1 -0
- package/dist-server/migrations/index.d.ts +1 -0
- package/dist-server/routes.d.ts +0 -0
- package/dist-server/routes.js +0 -1
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/account/account-history.d.ts +23 -0
- package/dist-server/service/account/account-history.js +2 -2
- package/dist-server/service/account/account-history.js.map +1 -1
- package/dist-server/service/account/account-mutation.d.ts +10 -0
- package/dist-server/service/account/account-mutation.js +2 -2
- package/dist-server/service/account/account-mutation.js.map +1 -1
- package/dist-server/service/account/account-query.d.ts +11 -0
- package/dist-server/service/account/account-query.js +2 -2
- package/dist-server/service/account/account-query.js.map +1 -1
- package/dist-server/service/account/account-type.d.ts +17 -0
- package/dist-server/service/account/account-type.js +6 -6
- package/dist-server/service/account/account-type.js.map +1 -1
- package/dist-server/service/account/account.d.ts +22 -0
- package/dist-server/service/account/account.js +2 -2
- package/dist-server/service/account/account.js.map +1 -1
- package/dist-server/service/account/event-subscriber.d.ts +7 -0
- package/dist-server/service/account/event-subscriber.js +2 -2
- package/dist-server/service/account/event-subscriber.js.map +1 -1
- package/dist-server/service/account/index.d.ts +8 -0
- package/dist-server/service/accounting-category/accounting-category-mutation.d.ts +10 -0
- package/dist-server/service/accounting-category/accounting-category-mutation.js +2 -2
- package/dist-server/service/accounting-category/accounting-category-mutation.js.map +1 -1
- package/dist-server/service/accounting-category/accounting-category-query.d.ts +11 -0
- package/dist-server/service/accounting-category/accounting-category-query.js +2 -2
- package/dist-server/service/accounting-category/accounting-category-query.js.map +1 -1
- package/dist-server/service/accounting-category/accounting-category-type.d.ts +17 -0
- package/dist-server/service/accounting-category/accounting-category-type.js +6 -6
- package/dist-server/service/accounting-category/accounting-category-type.js.map +1 -1
- package/dist-server/service/accounting-category/accounting-category.d.ts +19 -0
- package/dist-server/service/accounting-category/accounting-category.js +6 -7
- package/dist-server/service/accounting-category/accounting-category.js.map +1 -1
- package/dist-server/service/accounting-category/index.d.ts +6 -0
- package/dist-server/service/financial-statement/event-subscriber.d.ts +7 -0
- package/dist-server/service/financial-statement/event-subscriber.js +2 -2
- package/dist-server/service/financial-statement/event-subscriber.js.map +1 -1
- package/dist-server/service/financial-statement/financial-statement-history.d.ts +24 -0
- package/dist-server/service/financial-statement/financial-statement-history.js +2 -2
- package/dist-server/service/financial-statement/financial-statement-history.js.map +1 -1
- package/dist-server/service/financial-statement/financial-statement-mutation.d.ts +10 -0
- package/dist-server/service/financial-statement/financial-statement-mutation.js +2 -2
- package/dist-server/service/financial-statement/financial-statement-mutation.js.map +1 -1
- package/dist-server/service/financial-statement/financial-statement-query.d.ts +11 -0
- package/dist-server/service/financial-statement/financial-statement-query.js +2 -2
- package/dist-server/service/financial-statement/financial-statement-query.js.map +1 -1
- package/dist-server/service/financial-statement/financial-statement-type.d.ts +20 -0
- package/dist-server/service/financial-statement/financial-statement-type.js +6 -6
- package/dist-server/service/financial-statement/financial-statement-type.js.map +1 -1
- package/dist-server/service/financial-statement/financial-statement.d.ts +25 -0
- package/dist-server/service/financial-statement/financial-statement.js +3 -3
- package/dist-server/service/financial-statement/financial-statement.js.map +1 -1
- package/dist-server/service/financial-statement/index.d.ts +8 -0
- package/dist-server/service/income-statement/event-subscriber.d.ts +7 -0
- package/dist-server/service/income-statement/event-subscriber.js +2 -2
- package/dist-server/service/income-statement/event-subscriber.js.map +1 -1
- package/dist-server/service/income-statement/income-statement-history.d.ts +24 -0
- package/dist-server/service/income-statement/income-statement-history.js +2 -2
- package/dist-server/service/income-statement/income-statement-history.js.map +1 -1
- package/dist-server/service/income-statement/income-statement-mutation.d.ts +10 -0
- package/dist-server/service/income-statement/income-statement-mutation.js +2 -2
- package/dist-server/service/income-statement/income-statement-mutation.js.map +1 -1
- package/dist-server/service/income-statement/income-statement-query.d.ts +11 -0
- package/dist-server/service/income-statement/income-statement-query.js +2 -2
- package/dist-server/service/income-statement/income-statement-query.js.map +1 -1
- package/dist-server/service/income-statement/income-statement-type.d.ts +20 -0
- package/dist-server/service/income-statement/income-statement-type.js +6 -6
- package/dist-server/service/income-statement/income-statement-type.js.map +1 -1
- package/dist-server/service/income-statement/income-statement.d.ts +26 -0
- package/dist-server/service/income-statement/income-statement.js +3 -3
- package/dist-server/service/income-statement/income-statement.js.map +1 -1
- package/dist-server/service/income-statement/index.d.ts +8 -0
- package/dist-server/service/index.d.ts +10 -0
- package/dist-server/service/transaction/event-subscriber.d.ts +7 -0
- package/dist-server/service/transaction/event-subscriber.js +2 -2
- package/dist-server/service/transaction/event-subscriber.js.map +1 -1
- package/dist-server/service/transaction/index.d.ts +8 -0
- package/dist-server/service/transaction/transaction-history.d.ts +24 -0
- package/dist-server/service/transaction/transaction-history.js +2 -2
- package/dist-server/service/transaction/transaction-history.js.map +1 -1
- package/dist-server/service/transaction/transaction-mutation.d.ts +10 -0
- package/dist-server/service/transaction/transaction-mutation.js +2 -2
- package/dist-server/service/transaction/transaction-mutation.js.map +1 -1
- package/dist-server/service/transaction/transaction-query.d.ts +11 -0
- package/dist-server/service/transaction/transaction-query.js +2 -2
- package/dist-server/service/transaction/transaction-query.js.map +1 -1
- package/dist-server/service/transaction/transaction-type.d.ts +19 -0
- package/dist-server/service/transaction/transaction-type.js +6 -6
- package/dist-server/service/transaction/transaction-type.js.map +1 -1
- package/dist-server/service/transaction/transaction.d.ts +32 -0
- package/dist-server/service/transaction/transaction.js +3 -3
- package/dist-server/service/transaction/transaction.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/server/activities/index.ts +4 -5
- package/server/routes.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"income-statement.js","sourceRoot":"","sources":["../../../server/service/income-statement/income-statement.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAEhD,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;AACvB,CAAC,EAHW,qBAAqB,
|
|
1
|
+
{"version":3,"file":"income-statement.js","sourceRoot":"","sources":["../../../server/service/income-statement/income-statement.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAEhD,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;AACvB,CAAC,EAHW,qBAAqB,qCAArB,qBAAqB,QAGhC;AAED,IAAA,+BAAgB,EAAC,qBAAqB,EAAE;IACtC,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,wCAAwC;CACtD,CAAC,CAAA;AAEF,QAAQ;AAQD,IAAM,eAAe,GAArB,MAAM,eAAe;IAArB;QAOL,YAAO,GAAY,CAAC,CAAA;IA8DtB,CAAC;CAAA,CAAA;AArEY,0CAAe;AAGjB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;2CACC;AAInB;IAFC,IAAA,uBAAa,GAAE;IACf,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAIpB;IAFC,IAAA,mBAAS,EAAC,IAAI,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,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;GAC7C,eAAe,CAqE3B","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn,\n VersionColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nexport enum IncomeStatementStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(IncomeStatementStatus, {\n name: 'IncomeStatementStatus',\n description: 'state enumeration of a incomeStatement'\n})\n\n// 손익계산서\n@Entity()\n@Index(\n 'ix_income_statement_0',\n (incomeStatement: IncomeStatement) => [incomeStatement.domain, incomeStatement.deletedAt],\n { unique: true }\n)\n@ObjectType({ description: 'Entity for IncomeStatement' })\nexport class IncomeStatement {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @VersionColumn()\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((incomeStatement: IncomeStatement) => incomeStatement.domain)\n domainId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'fiscal year' })\n year?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'fiscal quarter' })\n quarter?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n month?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n revenue?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n expense?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n netIncome?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active?: boolean\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((incomeStatement: IncomeStatement) => incomeStatement.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((incomeStatement: IncomeStatement) => incomeStatement.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IncomeStatement } from './income-statement';
|
|
2
|
+
import { IncomeStatementHistory } from './income-statement-history';
|
|
3
|
+
import { IncomeStatementQuery } from './income-statement-query';
|
|
4
|
+
import { IncomeStatementMutation } from './income-statement-mutation';
|
|
5
|
+
import { IncomeStatementHistoryEntitySubscriber } from './event-subscriber';
|
|
6
|
+
export declare const entities: (typeof IncomeStatement | typeof IncomeStatementHistory)[];
|
|
7
|
+
export declare const resolvers: (typeof IncomeStatementQuery | typeof IncomeStatementMutation)[];
|
|
8
|
+
export declare const subscribers: (typeof IncomeStatementHistoryEntitySubscriber)[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './income-statement/income-statement';
|
|
2
|
+
export * from './financial-statement/financial-statement';
|
|
3
|
+
export * from './accounting-category/accounting-category';
|
|
4
|
+
export * from './transaction/transaction';
|
|
5
|
+
export * from './account/account';
|
|
6
|
+
export declare const entities: (typeof import("./income-statement/income-statement").IncomeStatement | typeof import("./financial-statement/financial-statement").FinancialStatement | typeof import("./accounting-category/accounting-category").AccountingCategory | typeof import("./account/account").Account | typeof import("./transaction/transaction").Transaction | typeof import("./income-statement/income-statement-history").IncomeStatementHistory | typeof import("./financial-statement/financial-statement-history").FinancialStatementHistory | typeof import("./transaction/transaction-history").TransactionHistory | typeof import("./account/account-history").AccountHistory)[];
|
|
7
|
+
export declare const subscribers: any[];
|
|
8
|
+
export declare const schema: {
|
|
9
|
+
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("./account/account-query").AccountQuery | typeof import("./account/account-mutation").AccountMutation)[];
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HistoryEntitySubscriber } from '@operato/typeorm-history';
|
|
2
|
+
import { Transaction } from './transaction';
|
|
3
|
+
import { TransactionHistory } from './transaction-history';
|
|
4
|
+
export declare class TransactionHistoryEntitySubscriber extends HistoryEntitySubscriber<Transaction, TransactionHistory> {
|
|
5
|
+
get entity(): typeof Transaction;
|
|
6
|
+
get historyEntity(): typeof TransactionHistory;
|
|
7
|
+
}
|
|
@@ -14,8 +14,8 @@ let TransactionHistoryEntitySubscriber = class TransactionHistoryEntitySubscribe
|
|
|
14
14
|
return transaction_history_1.TransactionHistory;
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
|
-
TransactionHistoryEntitySubscriber =
|
|
17
|
+
exports.TransactionHistoryEntitySubscriber = TransactionHistoryEntitySubscriber;
|
|
18
|
+
exports.TransactionHistoryEntitySubscriber = TransactionHistoryEntitySubscriber = tslib_1.__decorate([
|
|
18
19
|
(0, typeorm_1.EventSubscriber)()
|
|
19
20
|
], TransactionHistoryEntitySubscriber);
|
|
20
|
-
exports.TransactionHistoryEntitySubscriber = TransactionHistoryEntitySubscriber;
|
|
21
21
|
//# sourceMappingURL=event-subscriber.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-subscriber.js","sourceRoot":"","sources":["../../../server/service/transaction/event-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAAyC;AAEzC,8DAAkE;AAElE,+CAA2C;AAC3C,+DAA0D;AAGnD,IAAM,kCAAkC,GAAxC,MAAM,kCAAmC,SAAQ,yCAAwD;IAC9G,IAAW,MAAM;QACf,OAAO,yBAAW,CAAA;IACpB,CAAC;IAED,IAAW,aAAa;QACtB,OAAO,wCAAkB,CAAA;IAC3B,CAAC;CACF,CAAA;AARY,kCAAkC;IAD9C,IAAA,yBAAe,GAAE;GACL,kCAAkC,CAQ9C
|
|
1
|
+
{"version":3,"file":"event-subscriber.js","sourceRoot":"","sources":["../../../server/service/transaction/event-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAAyC;AAEzC,8DAAkE;AAElE,+CAA2C;AAC3C,+DAA0D;AAGnD,IAAM,kCAAkC,GAAxC,MAAM,kCAAmC,SAAQ,yCAAwD;IAC9G,IAAW,MAAM;QACf,OAAO,yBAAW,CAAA;IACpB,CAAC;IAED,IAAW,aAAa;QACtB,OAAO,wCAAkB,CAAA;IAC3B,CAAC;CACF,CAAA;AARY,gFAAkC;6CAAlC,kCAAkC;IAD9C,IAAA,yBAAe,GAAE;GACL,kCAAkC,CAQ9C","sourcesContent":["import { EventSubscriber } from 'typeorm'\n\nimport { HistoryEntitySubscriber } from '@operato/typeorm-history'\n\nimport { Transaction } from './transaction'\nimport { TransactionHistory } from './transaction-history'\n\n@EventSubscriber()\nexport class TransactionHistoryEntitySubscriber extends HistoryEntitySubscriber<Transaction, TransactionHistory> {\n public get entity() {\n return Transaction\n }\n\n public get historyEntity() {\n return TransactionHistory\n }\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Transaction } from './transaction';
|
|
2
|
+
import { TransactionHistory } from './transaction-history';
|
|
3
|
+
import { TransactionQuery } from './transaction-query';
|
|
4
|
+
import { TransactionMutation } from './transaction-mutation';
|
|
5
|
+
import { TransactionHistoryEntitySubscriber } from './event-subscriber';
|
|
6
|
+
export declare const entities: (typeof Transaction | typeof TransactionHistory)[];
|
|
7
|
+
export declare const resolvers: (typeof TransactionQuery | typeof TransactionMutation)[];
|
|
8
|
+
export declare const subscribers: (typeof TransactionHistoryEntitySubscriber)[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { HistoryActionType, HistoryEntityInterface } from '@operato/typeorm-history';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { Domain } from '@things-factory/shell';
|
|
4
|
+
import { Transaction, TransactionType } from './transaction';
|
|
5
|
+
export declare class TransactionHistory implements HistoryEntityInterface<Transaction> {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
version?: number;
|
|
8
|
+
domain?: Domain;
|
|
9
|
+
domainId?: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
active?: boolean;
|
|
13
|
+
type?: TransactionType;
|
|
14
|
+
params?: string;
|
|
15
|
+
createdAt?: Date;
|
|
16
|
+
updatedAt?: Date;
|
|
17
|
+
deletedAt?: Date;
|
|
18
|
+
creator?: User;
|
|
19
|
+
creatorId?: string;
|
|
20
|
+
updater?: User;
|
|
21
|
+
updaterId?: string;
|
|
22
|
+
originalId: string;
|
|
23
|
+
action: HistoryActionType;
|
|
24
|
+
}
|
|
@@ -16,6 +16,7 @@ let TransactionHistory = class TransactionHistory {
|
|
|
16
16
|
this.version = 1;
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
+
exports.TransactionHistory = TransactionHistory;
|
|
19
20
|
tslib_1.__decorate([
|
|
20
21
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
21
22
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -109,7 +110,7 @@ tslib_1.__decorate([
|
|
|
109
110
|
}),
|
|
110
111
|
tslib_1.__metadata("design:type", String)
|
|
111
112
|
], TransactionHistory.prototype, "action", void 0);
|
|
112
|
-
TransactionHistory = tslib_1.__decorate([
|
|
113
|
+
exports.TransactionHistory = TransactionHistory = tslib_1.__decorate([
|
|
113
114
|
(0, typeorm_1.Entity)(),
|
|
114
115
|
(0, typeorm_1.Index)('ix_transaction_history_0', (transactionHistory) => [transactionHistory.originalId, transactionHistory.version], { unique: true }),
|
|
115
116
|
(0, typeorm_1.Index)('ix_transaction_history_1', (transactionHistory) => [
|
|
@@ -119,5 +120,4 @@ TransactionHistory = tslib_1.__decorate([
|
|
|
119
120
|
], { unique: true }),
|
|
120
121
|
(0, type_graphql_1.ObjectType)({ description: 'History Entity of Transaction' })
|
|
121
122
|
], TransactionHistory);
|
|
122
|
-
exports.TransactionHistory = TransactionHistory;
|
|
123
123
|
//# sourceMappingURL=transaction-history.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-history.js","sourceRoot":"","sources":["../../../server/service/transaction/transaction-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAA8F;AAE9F,8DAKiC;AACjC,yDAAsD;AACtD,6CAA4C;AAC5C,iDAA8C;AAE9C,+CAA4D;AAE5D,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAkB7B,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAAxB;QAOL,YAAO,GAAY,CAAC,CAAA;IAqEtB,CAAC;CAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"transaction-history.js","sourceRoot":"","sources":["../../../server/service/transaction/transaction-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAA8F;AAE9F,8DAKiC;AACjC,yDAAsD;AACtD,6CAA4C;AAC5C,iDAA8C;AAE9C,+CAA4D;AAE5D,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAkB7B,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAAxB;QAOL,YAAO,GAAY,CAAC,CAAA;IAqEtB,CAAC;CAAA,CAAA;AA5EY,gDAAkB;AAG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AAU;QAClB,IAAI,EAAE,mCAAiB;KACxB,CAAC;;kDAC+B;6BA3EtB,kBAAkB;IAhB9B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,0BAA0B,EAC1B,CAAC,kBAAsC,EAAE,EAAE,CAAC,CAAC,kBAAkB,CAAC,UAAU,EAAE,kBAAkB,CAAC,OAAO,CAAC,EACvG,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,eAAK,EACJ,0BAA0B,EAC1B,CAAC,kBAAsC,EAAE,EAAE,CAAC;QAC1C,kBAAkB,CAAC,MAAM;QACzB,kBAAkB,CAAC,UAAU;QAC7B,kBAAkB,CAAC,OAAO;KAC3B,EACD,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;GAChD,kBAAkB,CA4E9B","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, TransactionType } from './transaction'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index(\n 'ix_transaction_history_0',\n (transactionHistory: TransactionHistory) => [transactionHistory.originalId, transactionHistory.version],\n { unique: true }\n)\n@Index(\n 'ix_transaction_history_1',\n (transactionHistory: TransactionHistory) => [\n transactionHistory.domain,\n transactionHistory.originalId,\n transactionHistory.version\n ],\n { unique: true }\n)\n@ObjectType({ description: 'History Entity of Transaction' })\nexport class TransactionHistory implements HistoryEntityInterface<Transaction> {\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(type => Domain)\n domain?: Domain\n\n @RelationId((transaction: Transaction) => transaction.domain)\n domainId?: string\n\n @Column()\n @Field()\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n type?: TransactionType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n params?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n createdAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n updatedAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((transaction: Transaction) => transaction.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((transaction: Transaction) => transaction.updater)\n updaterId?: string\n\n @HistoryOriginalIdColumn()\n public originalId!: string\n\n @HistoryActionColumn({\n nullable: false,\n type:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'enum'\n : DATABASE_TYPE == 'oracle'\n ? 'varchar2'\n : 'smallint',\n enum: HistoryActionType\n })\n public action!: HistoryActionType\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Transaction } from './transaction';
|
|
2
|
+
import { NewTransaction, TransactionPatch } from './transaction-type';
|
|
3
|
+
export declare class TransactionMutation {
|
|
4
|
+
createTransaction(transaction: NewTransaction, context: ResolverContext): Promise<Transaction>;
|
|
5
|
+
updateTransaction(id: string, patch: TransactionPatch, context: ResolverContext): Promise<Transaction>;
|
|
6
|
+
updateMultipleTransaction(patches: TransactionPatch[], context: ResolverContext): Promise<Transaction[]>;
|
|
7
|
+
deleteTransaction(id: string, context: ResolverContext): Promise<boolean>;
|
|
8
|
+
deleteTransactions(ids: string[], context: ResolverContext): Promise<boolean>;
|
|
9
|
+
importTransactions(transactions: TransactionPatch[], context: ResolverContext): Promise<boolean>;
|
|
10
|
+
}
|
|
@@ -68,6 +68,7 @@ let TransactionMutation = class TransactionMutation {
|
|
|
68
68
|
return true;
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
+
exports.TransactionMutation = TransactionMutation;
|
|
71
72
|
tslib_1.__decorate([
|
|
72
73
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
73
74
|
(0, type_graphql_1.Mutation)(returns => transaction_1.Transaction, { description: 'To create new Transaction' }),
|
|
@@ -123,8 +124,7 @@ tslib_1.__decorate([
|
|
|
123
124
|
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
124
125
|
tslib_1.__metadata("design:returntype", Promise)
|
|
125
126
|
], TransactionMutation.prototype, "importTransactions", null);
|
|
126
|
-
TransactionMutation = tslib_1.__decorate([
|
|
127
|
+
exports.TransactionMutation = TransactionMutation = tslib_1.__decorate([
|
|
127
128
|
(0, type_graphql_1.Resolver)(transaction_1.Transaction)
|
|
128
129
|
], TransactionMutation);
|
|
129
|
-
exports.TransactionMutation = TransactionMutation;
|
|
130
130
|
//# sourceMappingURL=transaction-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-mutation.js","sourceRoot":"","sources":["../../../server/service/transaction/transaction-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,qEAA0F;AAE1F,+CAA2C;AAC3C,yDAAqE;AAG9D,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAGxB,AAAN,KAAK,CAAC,iBAAiB,CACD,WAA2B,EACxC,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,MAAM,GAAG,MAAM,EAAE,C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Ac,CAAC,MAAM,GAAG,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"transaction-mutation.js","sourceRoot":"","sources":["../../../server/service/transaction/transaction-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,qEAA0F;AAE1F,+CAA2C;AAC3C,yDAAqE;AAG9D,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAGxB,AAAN,KAAK,CAAC,iBAAiB,CACD,WAA2B,EACxC,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,yBAAW,CAAC,CAAC,IAAI,iCAClD,WAAW,KACd,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC;IAIK,AAAN,KAAK,CAAC,iBAAiB,CACV,EAAU,EACP,KAAuB,EAC9B,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,yBAAW,CAAC,CAAA;QAChD,MAAM,WAAW,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YAC3C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;QAEF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,IAAI,+CAC/B,WAAW,GACX,KAAK,KACR,OAAO,EAAE,IAAI,IACb,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC;IAIK,AAAN,KAAK,CAAC,yBAAyB,CACe,OAA2B,EAChE,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE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,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;4DAOpD;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;IAE9E,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;6DAYP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;IAE9E,mBAAA,IAAA,kBAAG,EAAC,cAAc,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,mCAAgB,CAAC,CAAC,CAAA;IAC/C,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;6DAWP;8BApIU,mBAAmB;IAD/B,IAAA,uBAAQ,EAAC,yBAAW,CAAC;GACT,mBAAmB,CAqI/B","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { createAttachment, deleteAttachmentsByRef } from '@things-factory/attachment-base'\n\nimport { Transaction } from './transaction'\nimport { NewTransaction, TransactionPatch } from './transaction-type'\n\n@Resolver(Transaction)\nexport class TransactionMutation {\n @Directive('@transaction')\n @Mutation(returns => Transaction, { description: 'To create new Transaction' })\n async createTransaction(\n @Arg('transaction') transaction: NewTransaction,\n @Ctx() context: ResolverContext\n ): Promise<Transaction> {\n const { domain, user, tx } = context.state\n\n const result = await tx.getRepository(Transaction).save({\n ...transaction,\n domain,\n creator: user,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => Transaction, { description: 'To modify Transaction information' })\n async updateTransaction(\n @Arg('id') id: string,\n @Arg('patch') patch: TransactionPatch,\n @Ctx() context: ResolverContext\n ): Promise<Transaction> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(Transaction)\n const transaction = await repository.findOne({\n where: { domain: { id: domain.id }, id }\n })\n\n const result = await repository.save({\n ...transaction,\n ...patch,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Transaction], { description: \"To modify multiple Transactions' information\" })\n async updateMultipleTransaction(\n @Arg('patches', type => [TransactionPatch]) patches: TransactionPatch[],\n @Ctx() context: ResolverContext\n ): Promise<Transaction[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const transactionRepo = tx.getRepository(Transaction)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await transactionRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const transaction = await transactionRepo.findOneBy({ id: updateRecord.id })\n\n const result = await transactionRepo.save({\n ...transaction,\n ...updateRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete Transaction' })\n async deleteTransaction(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Transaction).delete({ domain: { id: domain.id }, id })\n await deleteAttachmentsByRef(null, { refBys: [id] }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple Transactions' })\n async deleteTransactions(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Transaction).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n await deleteAttachmentsByRef(null, { refBys: ids }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To import multiple Transactions' })\n async importTransactions(\n @Arg('transactions', type => [TransactionPatch]) transactions: TransactionPatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await Promise.all(\n transactions.map(async (transaction: TransactionPatch) => {\n const createdTransaction: Transaction = await tx.getRepository(Transaction).save({ domain, ...transaction })\n })\n )\n\n return true\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Domain, ListParam } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { Transaction } from './transaction';
|
|
4
|
+
import { TransactionList } from './transaction-type';
|
|
5
|
+
export declare class TransactionQuery {
|
|
6
|
+
transaction(id: string, context: ResolverContext): Promise<Transaction>;
|
|
7
|
+
transactions(params: ListParam, context: ResolverContext): Promise<TransactionList>;
|
|
8
|
+
domain(transaction: Transaction): Promise<Domain>;
|
|
9
|
+
updater(transaction: Transaction): Promise<User>;
|
|
10
|
+
creator(transaction: Transaction): Promise<User>;
|
|
11
|
+
}
|
|
@@ -35,6 +35,7 @@ let TransactionQuery = class TransactionQuery {
|
|
|
35
35
|
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: transaction.creatorId });
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
+
exports.TransactionQuery = TransactionQuery;
|
|
38
39
|
tslib_1.__decorate([
|
|
39
40
|
(0, type_graphql_1.Query)(returns => transaction_1.Transaction, { nullable: true, description: 'To fetch a Transaction' }),
|
|
40
41
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
@@ -72,8 +73,7 @@ tslib_1.__decorate([
|
|
|
72
73
|
tslib_1.__metadata("design:paramtypes", [transaction_1.Transaction]),
|
|
73
74
|
tslib_1.__metadata("design:returntype", Promise)
|
|
74
75
|
], TransactionQuery.prototype, "creator", null);
|
|
75
|
-
TransactionQuery = tslib_1.__decorate([
|
|
76
|
+
exports.TransactionQuery = TransactionQuery = tslib_1.__decorate([
|
|
76
77
|
(0, type_graphql_1.Resolver)(transaction_1.Transaction)
|
|
77
78
|
], TransactionQuery);
|
|
78
|
-
exports.TransactionQuery = TransactionQuery;
|
|
79
79
|
//# sourceMappingURL=transaction-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-query.js","sourceRoot":"","sources":["../../../server/service/transaction/transaction-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAgD;AAChD,+CAA2C;AAC3C,yDAAoD;AAG7C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAErB,AAAN,KAAK,CAAC,WAAW,CAAY,EAAU,EAAS,OAAwB;QACtE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,yBAAW,CAAC,CAAC,OAAO,CAAC;YAC9C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,YAAY,CAAS,MAAiB,EAAS,OAAwB;QAC3E,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,y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AA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;mDAM9C;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,kCAAe,EAAE,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IACjE,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;oDAa3C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAc,yBAAW;;8CAE5C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAc,yBAAW;;+CAE7C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAc,yBAAW;;+CAE7C;2BAvCU,gBAAgB;IAD5B,IAAA,uBAAQ,EAAC,yBAAW,CAAC;GACT,gBAAgB,CAwC5B","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Transaction } from './transaction'\nimport { TransactionList } from './transaction-type'\n\n@Resolver(Transaction)\nexport class TransactionQuery {\n @Query(returns => Transaction!, { nullable: true, description: 'To fetch a Transaction' })\n async transaction(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Transaction> {\n const { domain } = context.state\n\n return await getRepository(Transaction).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => TransactionList, { description: 'To fetch multiple Transactions' })\n async transactions(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<TransactionList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(Transaction),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() transaction: Transaction): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: transaction.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() transaction: Transaction): Promise<User> {\n return await getRepository(User).findOneBy({ id: transaction.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() transaction: Transaction): Promise<User> {\n return await getRepository(User).findOneBy({ id: transaction.creatorId })\n }\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Transaction, TransactionType } from './transaction';
|
|
2
|
+
export declare class NewTransaction {
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
type?: TransactionType;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class TransactionPatch {
|
|
9
|
+
id?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
type?: TransactionType;
|
|
13
|
+
active?: boolean;
|
|
14
|
+
cuFlag?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class TransactionList {
|
|
17
|
+
items: Transaction[];
|
|
18
|
+
total: number;
|
|
19
|
+
}
|
|
@@ -6,6 +6,7 @@ const type_graphql_1 = require("type-graphql");
|
|
|
6
6
|
const transaction_1 = require("./transaction");
|
|
7
7
|
let NewTransaction = class NewTransaction {
|
|
8
8
|
};
|
|
9
|
+
exports.NewTransaction = NewTransaction;
|
|
9
10
|
tslib_1.__decorate([
|
|
10
11
|
(0, type_graphql_1.Field)(),
|
|
11
12
|
tslib_1.__metadata("design:type", String)
|
|
@@ -22,12 +23,12 @@ tslib_1.__decorate([
|
|
|
22
23
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
24
|
tslib_1.__metadata("design:type", Boolean)
|
|
24
25
|
], NewTransaction.prototype, "active", void 0);
|
|
25
|
-
NewTransaction = tslib_1.__decorate([
|
|
26
|
+
exports.NewTransaction = NewTransaction = tslib_1.__decorate([
|
|
26
27
|
(0, type_graphql_1.InputType)()
|
|
27
28
|
], NewTransaction);
|
|
28
|
-
exports.NewTransaction = NewTransaction;
|
|
29
29
|
let TransactionPatch = class TransactionPatch {
|
|
30
30
|
};
|
|
31
|
+
exports.TransactionPatch = TransactionPatch;
|
|
31
32
|
tslib_1.__decorate([
|
|
32
33
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
33
34
|
tslib_1.__metadata("design:type", String)
|
|
@@ -52,12 +53,12 @@ tslib_1.__decorate([
|
|
|
52
53
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
53
54
|
tslib_1.__metadata("design:type", String)
|
|
54
55
|
], TransactionPatch.prototype, "cuFlag", void 0);
|
|
55
|
-
TransactionPatch = tslib_1.__decorate([
|
|
56
|
+
exports.TransactionPatch = TransactionPatch = tslib_1.__decorate([
|
|
56
57
|
(0, type_graphql_1.InputType)()
|
|
57
58
|
], TransactionPatch);
|
|
58
|
-
exports.TransactionPatch = TransactionPatch;
|
|
59
59
|
let TransactionList = class TransactionList {
|
|
60
60
|
};
|
|
61
|
+
exports.TransactionList = TransactionList;
|
|
61
62
|
tslib_1.__decorate([
|
|
62
63
|
(0, type_graphql_1.Field)(type => [transaction_1.Transaction]),
|
|
63
64
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -66,8 +67,7 @@ tslib_1.__decorate([
|
|
|
66
67
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
67
68
|
tslib_1.__metadata("design:type", Number)
|
|
68
69
|
], TransactionList.prototype, "total", void 0);
|
|
69
|
-
TransactionList = tslib_1.__decorate([
|
|
70
|
+
exports.TransactionList = TransactionList = tslib_1.__decorate([
|
|
70
71
|
(0, type_graphql_1.ObjectType)()
|
|
71
72
|
], TransactionList);
|
|
72
|
-
exports.TransactionList = TransactionList;
|
|
73
73
|
//# sourceMappingURL=transaction-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-type.js","sourceRoot":"","sources":["../../../server/service/transaction/transaction-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,+CAA4D;AAGrD,IAAM,cAAc,GAApB,MAAM,cAAc;CAY1B,CAAA;
|
|
1
|
+
{"version":3,"file":"transaction-type.js","sourceRoot":"","sources":["../../../server/service/transaction/transaction-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,+CAA4D;AAGrD,IAAM,cAAc,GAApB,MAAM,cAAc;CAY1B,CAAA;AAZY,wCAAc;AAEzB;IADC,IAAA,oBAAK,GAAE;;4CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,6BAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC7B;AAGtB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACV;yBAXL,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CAY1B;AAGM,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAkB5B,CAAA;AAlBY,4CAAgB;AAE3B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,6BAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CAC7B;AAGtB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACX;2BAjBJ,gBAAgB;IAD5B,IAAA,wBAAS,GAAE;GACC,gBAAgB,CAkB5B;AAGM,IAAM,eAAe,GAArB,MAAM,eAAe;CAM3B,CAAA;AANY,0CAAe;AAE1B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,yBAAW,CAAC,CAAC;;8CACT;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;8CACN;0BALF,eAAe;IAD3B,IAAA,yBAAU,GAAE;GACA,eAAe,CAM3B","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Transaction, TransactionType } from './transaction'\n\n@InputType()\nexport class NewTransaction {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => TransactionType, { nullable: true })\n type?: TransactionType\n\n @Field({ nullable: true })\n active?: boolean\n}\n\n@InputType()\nexport class TransactionPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => TransactionType, { nullable: true })\n type?: TransactionType\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class TransactionList {\n @Field(type => [Transaction])\n items: Transaction[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Domain } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { Account } from '../account/account';
|
|
4
|
+
export declare enum TransactionType {
|
|
5
|
+
Income = 0,// 회사가 받은 돈을 나타냅니다. 예를 들어, 제품 판매 수익 등이 해당됩니다.
|
|
6
|
+
Expense = 1,// 회사가 지불한 돈을 나타냅니다. 예를 들어, 임금, 재고 구매 비용, 건물 임대료 등이 해당됩니다.
|
|
7
|
+
Asset = 2,// 회사가 소유한 자산을 나타냅니다. 예를 들어, 토지, 건물, 차량 등이 해당됩니다.
|
|
8
|
+
Liability = 3,// 회사가 지불해야 하는 부채를 나타냅니다. 예를 들어, 대출, 미지급금 등이 해당됩니다.
|
|
9
|
+
Equity = 4
|
|
10
|
+
}
|
|
11
|
+
export declare class Transaction {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
version?: number;
|
|
14
|
+
domain?: Domain;
|
|
15
|
+
domainId?: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
date?: Date;
|
|
19
|
+
currency?: string;
|
|
20
|
+
amount?: number;
|
|
21
|
+
active?: boolean;
|
|
22
|
+
type?: TransactionType;
|
|
23
|
+
account?: Account;
|
|
24
|
+
accountId?: string;
|
|
25
|
+
createdAt?: Date;
|
|
26
|
+
updatedAt?: Date;
|
|
27
|
+
deletedAt?: Date;
|
|
28
|
+
creator?: User;
|
|
29
|
+
creatorId?: string;
|
|
30
|
+
updater?: User;
|
|
31
|
+
updaterId?: string;
|
|
32
|
+
}
|
|
@@ -14,7 +14,7 @@ var TransactionType;
|
|
|
14
14
|
TransactionType[TransactionType["Asset"] = 2] = "Asset";
|
|
15
15
|
TransactionType[TransactionType["Liability"] = 3] = "Liability";
|
|
16
16
|
TransactionType[TransactionType["Equity"] = 4] = "Equity"; // 회사의 자본을 나타냅니다. 예를 들어, 자본금, 이익 잉여금 등이 해당됩니다.
|
|
17
|
-
})(TransactionType
|
|
17
|
+
})(TransactionType || (exports.TransactionType = TransactionType = {}));
|
|
18
18
|
(0, type_graphql_1.registerEnumType)(TransactionType, {
|
|
19
19
|
name: 'TransactionType',
|
|
20
20
|
description: 'type enumeration of a transaction'
|
|
@@ -25,6 +25,7 @@ let Transaction = class Transaction {
|
|
|
25
25
|
this.amount = 0;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
+
exports.Transaction = Transaction;
|
|
28
29
|
tslib_1.__decorate([
|
|
29
30
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
30
31
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -121,10 +122,9 @@ tslib_1.__decorate([
|
|
|
121
122
|
(0, typeorm_1.RelationId)((transaction) => transaction.updater),
|
|
122
123
|
tslib_1.__metadata("design:type", String)
|
|
123
124
|
], Transaction.prototype, "updaterId", void 0);
|
|
124
|
-
Transaction = tslib_1.__decorate([
|
|
125
|
+
exports.Transaction = Transaction = tslib_1.__decorate([
|
|
125
126
|
(0, typeorm_1.Entity)(),
|
|
126
127
|
(0, typeorm_1.Index)('ix_transaction_0', (transaction) => [transaction.domain, transaction.name, transaction.deletedAt], { unique: true }),
|
|
127
128
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for Transaction' })
|
|
128
129
|
], Transaction);
|
|
129
|
-
exports.Transaction = Transaction;
|
|
130
130
|
//# sourceMappingURL=transaction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../server/service/transaction/transaction.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAChD,gDAA4C;AAE5C,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,yDAAM,CAAA;IACN,2DAAO,CAAA;IACP,uDAAK,CAAA;IACL,+DAAS,CAAA;IACT,yDAAM,CAAA,CAAC,8CAA8C;AACvD,CAAC,EANW,eAAe,
|
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../server/service/transaction/transaction.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAChD,gDAA4C;AAE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AAA,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,CAAC;sCAC9B,gBAAI;4CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,WAAwB,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;8CAC5C;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,CAAC;sCAC9B,gBAAI;4CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,WAAwB,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;8CAC5C;sBA3EP,WAAW;IAPvB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,kBAAkB,EAClB,CAAC,WAAwB,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC,EAC3F,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;GACzC,WAAW,CA4EvB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn,\n VersionColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Account } from '../account/account'\n\nexport enum TransactionType {\n Income, // 회사가 받은 돈을 나타냅니다. 예를 들어, 제품 판매 수익 등이 해당됩니다.\n Expense, // 회사가 지불한 돈을 나타냅니다. 예를 들어, 임금, 재고 구매 비용, 건물 임대료 등이 해당됩니다.\n Asset, // 회사가 소유한 자산을 나타냅니다. 예를 들어, 토지, 건물, 차량 등이 해당됩니다.\n Liability, // 회사가 지불해야 하는 부채를 나타냅니다. 예를 들어, 대출, 미지급금 등이 해당됩니다.\n Equity // 회사의 자본을 나타냅니다. 예를 들어, 자본금, 이익 잉여금 등이 해당됩니다.\n}\n\nregisterEnumType(TransactionType, {\n name: 'TransactionType',\n description: 'type enumeration of a transaction'\n})\n\n@Entity()\n@Index(\n 'ix_transaction_0',\n (transaction: Transaction) => [transaction.domain, transaction.name, transaction.deletedAt],\n { unique: true }\n)\n@ObjectType({ description: 'Entity for Transaction' })\nexport class Transaction {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @VersionColumn()\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((transaction: Transaction) => transaction.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n date?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n currency?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n amount?: number = 0\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n type?: TransactionType\n\n @ManyToOne(type => Account)\n @Field({ nullable: true })\n account?: Account\n\n @RelationId((transaction: Transaction) => transaction.account)\n accountId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((transaction: Transaction) => transaction.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((transaction: Transaction) => transaction.updater)\n updaterId?: string\n}\n"]}
|