proflores-db-model 0.1.21 → 0.1.23
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/entities/Bank/TransactionBank.d.ts +2 -0
- package/dist/entities/Bank/TransactionBank.js +9 -0
- package/dist/entities/ExpenseTransaction.d.ts +2 -0
- package/dist/entities/ExpenseTransaction.js +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -1
- package/package.json +1 -1
- package/src/entities/Bank/TransactionBank.ts +11 -2
- package/src/entities/ExpenseTransaction.ts +7 -0
- package/src/index.ts +2 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ObjectLiteral } from "typeorm";
|
|
2
2
|
import { BankAccount } from "./BankAccount";
|
|
3
|
+
import { ExpenseTransaction } from "../ExpenseTransaction";
|
|
3
4
|
export declare class TransactionBank implements ObjectLiteral {
|
|
4
5
|
idTransactionBank: number;
|
|
5
6
|
amount: number;
|
|
6
7
|
type: "INCOME" | "EXPENSE";
|
|
7
8
|
transactionDate: Date;
|
|
8
9
|
bankAccount: BankAccount;
|
|
10
|
+
expenseTransaction?: ExpenseTransaction;
|
|
9
11
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.TransactionBank = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BankAccount_1 = require("./BankAccount");
|
|
15
|
+
const ExpenseTransaction_1 = require("../ExpenseTransaction");
|
|
15
16
|
let TransactionBank = class TransactionBank {
|
|
16
17
|
};
|
|
17
18
|
__decorate([
|
|
@@ -36,6 +37,14 @@ __decorate([
|
|
|
36
37
|
}),
|
|
37
38
|
__metadata("design:type", BankAccount_1.BankAccount)
|
|
38
39
|
], TransactionBank.prototype, "bankAccount", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.OneToOne)(() => ExpenseTransaction_1.ExpenseTransaction, (expenseTransaction) => expenseTransaction.transactionBank, {
|
|
42
|
+
nullable: true,
|
|
43
|
+
cascade: true,
|
|
44
|
+
}),
|
|
45
|
+
(0, typeorm_1.JoinColumn)({ name: "expenseTransactionId" }),
|
|
46
|
+
__metadata("design:type", ExpenseTransaction_1.ExpenseTransaction)
|
|
47
|
+
], TransactionBank.prototype, "expenseTransaction", void 0);
|
|
39
48
|
TransactionBank = __decorate([
|
|
40
49
|
(0, typeorm_1.Entity)("transactions_bank")
|
|
41
50
|
], TransactionBank);
|
|
@@ -2,6 +2,7 @@ import { ObjectLiteral } from "typeorm";
|
|
|
2
2
|
import { ProjectOrder } from "./ProjectOrder";
|
|
3
3
|
import { ExpenseType } from "./ExpenseType";
|
|
4
4
|
import { ExpenseDetail } from "./ExpenseDetail";
|
|
5
|
+
import { TransactionBank } from "./Bank/TransactionBank";
|
|
5
6
|
export declare class ExpenseTransaction implements ObjectLiteral {
|
|
6
7
|
expenseTransactionId: number;
|
|
7
8
|
bankId: string;
|
|
@@ -13,4 +14,5 @@ export declare class ExpenseTransaction implements ObjectLiteral {
|
|
|
13
14
|
projectOrder: ProjectOrder;
|
|
14
15
|
expenseType: ExpenseType;
|
|
15
16
|
expenseDetails: ExpenseDetail[];
|
|
17
|
+
transactionBank?: TransactionBank;
|
|
16
18
|
}
|
|
@@ -15,6 +15,7 @@ const typeorm_1 = require("typeorm");
|
|
|
15
15
|
const ProjectOrder_1 = require("./ProjectOrder");
|
|
16
16
|
const ExpenseType_1 = require("./ExpenseType");
|
|
17
17
|
const ExpenseDetail_1 = require("./ExpenseDetail");
|
|
18
|
+
const TransactionBank_1 = require("./Bank/TransactionBank");
|
|
18
19
|
let ExpenseTransaction = class ExpenseTransaction {
|
|
19
20
|
};
|
|
20
21
|
__decorate([
|
|
@@ -61,6 +62,12 @@ __decorate([
|
|
|
61
62
|
}),
|
|
62
63
|
__metadata("design:type", Array)
|
|
63
64
|
], ExpenseTransaction.prototype, "expenseDetails", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.OneToOne)(() => TransactionBank_1.TransactionBank, (transactionBank) => transactionBank.expenseTransaction, {
|
|
67
|
+
nullable: true,
|
|
68
|
+
}),
|
|
69
|
+
__metadata("design:type", TransactionBank_1.TransactionBank)
|
|
70
|
+
], ExpenseTransaction.prototype, "transactionBank", void 0);
|
|
64
71
|
ExpenseTransaction = __decorate([
|
|
65
72
|
(0, typeorm_1.Entity)()
|
|
66
73
|
], ExpenseTransaction);
|
package/dist/index.d.ts
CHANGED
|
@@ -9,4 +9,6 @@ export { Supplier } from "./entities/Suppliers";
|
|
|
9
9
|
export { CategoryForCosting } from "./entities/CategoryForCosting";
|
|
10
10
|
export { CategoryForPlantType } from "./entities/CategoryForPlantType";
|
|
11
11
|
export { UnitOfMeasure } from "./entities/UnitOfMesure";
|
|
12
|
+
export { BankAccount } from "./entities/Bank/BankAccount";
|
|
13
|
+
export { TransactionBank } from "./entities/Bank/TransactionBank";
|
|
12
14
|
export * from "./types";
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.UnitOfMeasure = exports.CategoryForPlantType = exports.CategoryForCosting = exports.Supplier = exports.ContainerType = exports.InventoryItem = exports.ExpenseTransaction = exports.User = exports.ProjectOrder = exports.ExpenseType = exports.ExpenseDetail = void 0;
|
|
17
|
+
exports.TransactionBank = exports.BankAccount = exports.UnitOfMeasure = exports.CategoryForPlantType = exports.CategoryForCosting = exports.Supplier = exports.ContainerType = exports.InventoryItem = exports.ExpenseTransaction = exports.User = exports.ProjectOrder = exports.ExpenseType = exports.ExpenseDetail = void 0;
|
|
18
18
|
var ExpenseDetail_1 = require("./entities/ExpenseDetail");
|
|
19
19
|
Object.defineProperty(exports, "ExpenseDetail", { enumerable: true, get: function () { return ExpenseDetail_1.ExpenseDetail; } });
|
|
20
20
|
var ExpenseType_1 = require("./entities/ExpenseType");
|
|
@@ -37,4 +37,8 @@ var CategoryForPlantType_1 = require("./entities/CategoryForPlantType");
|
|
|
37
37
|
Object.defineProperty(exports, "CategoryForPlantType", { enumerable: true, get: function () { return CategoryForPlantType_1.CategoryForPlantType; } });
|
|
38
38
|
var UnitOfMesure_1 = require("./entities/UnitOfMesure");
|
|
39
39
|
Object.defineProperty(exports, "UnitOfMeasure", { enumerable: true, get: function () { return UnitOfMesure_1.UnitOfMeasure; } });
|
|
40
|
+
var BankAccount_1 = require("./entities/Bank/BankAccount");
|
|
41
|
+
Object.defineProperty(exports, "BankAccount", { enumerable: true, get: function () { return BankAccount_1.BankAccount; } });
|
|
42
|
+
var TransactionBank_1 = require("./entities/Bank/TransactionBank");
|
|
43
|
+
Object.defineProperty(exports, "TransactionBank", { enumerable: true, get: function () { return TransactionBank_1.TransactionBank; } });
|
|
40
44
|
__exportStar(require("./types"), exports);
|
package/package.json
CHANGED
|
@@ -3,10 +3,13 @@ import {
|
|
|
3
3
|
PrimaryGeneratedColumn,
|
|
4
4
|
Column,
|
|
5
5
|
ManyToOne,
|
|
6
|
-
ObjectLiteral
|
|
6
|
+
ObjectLiteral,
|
|
7
|
+
OneToOne,
|
|
8
|
+
JoinColumn
|
|
7
9
|
} from "typeorm";
|
|
8
10
|
import { BankAccount } from "./BankAccount";
|
|
9
|
-
|
|
11
|
+
import { ExpenseTransaction } from "../ExpenseTransaction";
|
|
12
|
+
|
|
10
13
|
@Entity("transactions_bank")
|
|
11
14
|
export class TransactionBank implements ObjectLiteral {
|
|
12
15
|
@PrimaryGeneratedColumn("increment")
|
|
@@ -25,5 +28,11 @@ import {
|
|
|
25
28
|
onDelete: "CASCADE",
|
|
26
29
|
})
|
|
27
30
|
bankAccount!: BankAccount;
|
|
31
|
+
@OneToOne(() => ExpenseTransaction, (expenseTransaction) => expenseTransaction.transactionBank, {
|
|
32
|
+
nullable: true,
|
|
33
|
+
cascade: true,
|
|
34
|
+
})
|
|
35
|
+
@JoinColumn({ name: "expenseTransactionId" })
|
|
36
|
+
expenseTransaction?: ExpenseTransaction;
|
|
28
37
|
}
|
|
29
38
|
|
|
@@ -7,10 +7,12 @@ import {
|
|
|
7
7
|
JoinColumn,
|
|
8
8
|
OneToMany,
|
|
9
9
|
ObjectLiteral,
|
|
10
|
+
OneToOne
|
|
10
11
|
} from "typeorm";
|
|
11
12
|
import { ProjectOrder } from "./ProjectOrder";
|
|
12
13
|
import { ExpenseType } from "./ExpenseType";
|
|
13
14
|
import { ExpenseDetail } from "./ExpenseDetail";
|
|
15
|
+
import { TransactionBank } from "./Bank/TransactionBank";
|
|
14
16
|
|
|
15
17
|
@Entity()
|
|
16
18
|
export class ExpenseTransaction implements ObjectLiteral {
|
|
@@ -47,4 +49,9 @@ export class ExpenseTransaction implements ObjectLiteral {
|
|
|
47
49
|
cascade: true,
|
|
48
50
|
})
|
|
49
51
|
expenseDetails!: ExpenseDetail[];
|
|
52
|
+
|
|
53
|
+
@OneToOne(() => TransactionBank, (transactionBank) => transactionBank.expenseTransaction, {
|
|
54
|
+
nullable: true,
|
|
55
|
+
})
|
|
56
|
+
transactionBank?: TransactionBank;
|
|
50
57
|
}
|
package/src/index.ts
CHANGED
|
@@ -9,6 +9,8 @@ export { Supplier } from "./entities/Suppliers";
|
|
|
9
9
|
export { CategoryForCosting } from "./entities/CategoryForCosting";
|
|
10
10
|
export { CategoryForPlantType } from "./entities/CategoryForPlantType";
|
|
11
11
|
export { UnitOfMeasure } from "./entities/UnitOfMesure";
|
|
12
|
+
export { BankAccount } from "./entities/Bank/BankAccount";
|
|
13
|
+
export { TransactionBank } from "./entities/Bank/TransactionBank";
|
|
12
14
|
|
|
13
15
|
|
|
14
16
|
export * from "./types";
|