proflores-db-model 0.2.52 → 0.2.54
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/ExpenseDetail.d.ts +6 -0
- package/dist/entities/ExpenseDetail.js +19 -1
- package/dist/entities/ExpenseTransaction.d.ts +2 -0
- package/dist/entities/ExpenseTransaction.js +11 -1
- package/dist/entities/Income.d.ts +29 -0
- package/dist/entities/Income.js +121 -0
- package/dist/entities/InventoryMovement.d.ts +2 -0
- package/dist/entities/InventoryMovement.js +7 -0
- package/dist/entities/index.d.ts +24 -0
- package/dist/entities/index.js +60 -0
- package/dist/index.d.ts +2 -23
- package/dist/index.js +5 -47
- package/dist/models/apu/Budget.d.ts +4 -0
- package/dist/models/apu/Budget.js +10 -0
- package/dist/models/production/CropActivity.d.ts +20 -0
- package/dist/models/production/CropActivity.js +85 -0
- package/dist/models/production/CropExpense.d.ts +22 -0
- package/dist/models/production/CropExpense.js +93 -0
- package/dist/models/production/CropLot.d.ts +33 -0
- package/dist/models/production/CropLot.js +132 -0
- package/dist/models/production/CropStage.d.ts +13 -0
- package/dist/models/production/CropStage.js +58 -0
- package/dist/models/production/CropStageImage.d.ts +9 -0
- package/dist/models/production/CropStageImage.js +44 -0
- package/dist/models/production/GrowthArea.d.ts +13 -0
- package/dist/models/production/GrowthArea.js +55 -0
- package/dist/models/production/Harvest.d.ts +16 -0
- package/dist/models/production/Harvest.js +70 -0
- package/dist/models/production/ProductionSeason.d.ts +11 -0
- package/dist/models/production/ProductionSeason.js +49 -0
- package/dist/models/production/index.d.ts +8 -0
- package/dist/models/production/index.js +20 -0
- package/dist/types/CropActivityType.d.ts +12 -0
- package/dist/types/CropActivityType.js +16 -0
- package/dist/types/CropLotStatus.d.ts +10 -0
- package/dist/types/CropLotStatus.js +14 -0
- package/dist/types/GrowthStage.d.ts +10 -0
- package/dist/types/GrowthStage.js +14 -0
- package/dist/types/IncomeStatus.d.ts +5 -0
- package/dist/types/IncomeStatus.js +9 -0
- package/dist/types/IncomeType.d.ts +6 -0
- package/dist/types/IncomeType.js +10 -0
- package/dist/types/MovementType.d.ts +2 -1
- package/dist/types/MovementType.js +1 -0
- package/dist/types/QualityGrade.d.ts +6 -0
- package/dist/types/QualityGrade.js +10 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.js +15 -1
- package/package.json +1 -1
- package/src/entities/ExpenseDetail.ts +16 -1
- package/src/entities/ExpenseTransaction.ts +12 -2
- package/src/entities/Income.ts +99 -0
- package/src/entities/InventoryMovement.ts +7 -1
- package/src/entities/index.ts +41 -0
- package/src/index.ts +6 -23
- package/src/models/apu/Budget.ts +8 -0
- package/src/models/production/CropActivity.ts +68 -0
- package/src/models/production/CropExpense.ts +74 -0
- package/src/models/production/CropLot.ts +106 -0
- package/src/models/production/CropStage.ts +45 -0
- package/src/models/production/CropStageImage.ts +32 -0
- package/src/models/production/GrowthArea.ts +41 -0
- package/src/models/production/Harvest.ts +56 -0
- package/src/models/production/ProductionSeason.ts +34 -0
- package/src/models/production/index.ts +9 -0
- package/src/types/CropActivityType.ts +12 -0
- package/src/types/CropLotStatus.ts +10 -0
- package/src/types/GrowthStage.ts +10 -0
- package/src/types/IncomeStatus.ts +5 -0
- package/src/types/IncomeType.ts +6 -0
- package/src/types/MovementType.ts +5 -4
- package/src/types/QualityGrade.ts +6 -0
- package/src/types/index.ts +11 -1
|
@@ -2,6 +2,9 @@ import { ObjectLiteral } from "typeorm";
|
|
|
2
2
|
import { ExpenseTransaction } from "./ExpenseTransaction";
|
|
3
3
|
import { Inventory } from "./Inventory";
|
|
4
4
|
import { ProjectOrder } from "./ProjectOrder";
|
|
5
|
+
import { Budget } from "../models/apu/Budget";
|
|
6
|
+
import { CropLot } from "../models/production/CropLot";
|
|
7
|
+
import { CropActivity } from "../models/production/CropActivity";
|
|
5
8
|
export declare class ExpenseDetail implements ObjectLiteral {
|
|
6
9
|
expenseDetailId: number;
|
|
7
10
|
expenseTransaction: ExpenseTransaction;
|
|
@@ -12,4 +15,7 @@ export declare class ExpenseDetail implements ObjectLiteral {
|
|
|
12
15
|
purchaseDate: Date;
|
|
13
16
|
isActive: boolean;
|
|
14
17
|
projectOrder?: ProjectOrder;
|
|
18
|
+
budget?: Budget | null;
|
|
19
|
+
cropLot?: CropLot | null;
|
|
20
|
+
cropActivity?: CropActivity | null;
|
|
15
21
|
}
|
|
@@ -14,6 +14,9 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const ExpenseTransaction_1 = require("./ExpenseTransaction");
|
|
15
15
|
const Inventory_1 = require("./Inventory");
|
|
16
16
|
const ProjectOrder_1 = require("./ProjectOrder");
|
|
17
|
+
const Budget_1 = require("../models/apu/Budget");
|
|
18
|
+
const CropLot_1 = require("../models/production/CropLot");
|
|
19
|
+
const CropActivity_1 = require("../models/production/CropActivity");
|
|
17
20
|
let ExpenseDetail = class ExpenseDetail {
|
|
18
21
|
};
|
|
19
22
|
exports.ExpenseDetail = ExpenseDetail;
|
|
@@ -55,10 +58,25 @@ __decorate([
|
|
|
55
58
|
__metadata("design:type", Boolean)
|
|
56
59
|
], ExpenseDetail.prototype, "isActive", void 0);
|
|
57
60
|
__decorate([
|
|
58
|
-
(0, typeorm_1.ManyToOne)(() => ProjectOrder_1.ProjectOrder, { nullable:
|
|
61
|
+
(0, typeorm_1.ManyToOne)(() => ProjectOrder_1.ProjectOrder, { nullable: true }),
|
|
59
62
|
(0, typeorm_1.JoinColumn)({ name: "projectId" }),
|
|
60
63
|
__metadata("design:type", ProjectOrder_1.ProjectOrder)
|
|
61
64
|
], ExpenseDetail.prototype, "projectOrder", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.ManyToOne)(() => Budget_1.Budget, { nullable: true, onDelete: "SET NULL" }),
|
|
67
|
+
(0, typeorm_1.JoinColumn)({ name: "idBudget" }),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], ExpenseDetail.prototype, "budget", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.ManyToOne)(() => CropLot_1.CropLot, { nullable: true, onDelete: "SET NULL" }),
|
|
72
|
+
(0, typeorm_1.JoinColumn)({ name: "idCropLot" }),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], ExpenseDetail.prototype, "cropLot", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.ManyToOne)(() => CropActivity_1.CropActivity, { nullable: true, onDelete: "SET NULL" }),
|
|
77
|
+
(0, typeorm_1.JoinColumn)({ name: "idCropActivity" }),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], ExpenseDetail.prototype, "cropActivity", void 0);
|
|
62
80
|
exports.ExpenseDetail = ExpenseDetail = __decorate([
|
|
63
81
|
(0, typeorm_1.Entity)()
|
|
64
82
|
], ExpenseDetail);
|
|
@@ -2,6 +2,7 @@ import { ObjectLiteral } from "typeorm";
|
|
|
2
2
|
import { ExpenseType } from "./ExpenseType";
|
|
3
3
|
import { ExpenseDetail } from "./ExpenseDetail";
|
|
4
4
|
import { TransactionBank } from "./Bank/TransactionBank";
|
|
5
|
+
import { Budget } from "../models/apu/Budget";
|
|
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
|
expenseType: ExpenseType;
|
|
14
15
|
expenseDetails?: ExpenseDetail[];
|
|
15
16
|
transactionBank?: TransactionBank;
|
|
17
|
+
budget?: Budget | null;
|
|
16
18
|
}
|
|
@@ -15,6 +15,7 @@ const typeorm_1 = require("typeorm");
|
|
|
15
15
|
const ExpenseType_1 = require("./ExpenseType");
|
|
16
16
|
const ExpenseDetail_1 = require("./ExpenseDetail");
|
|
17
17
|
const TransactionBank_1 = require("./Bank/TransactionBank");
|
|
18
|
+
const Budget_1 = require("../models/apu/Budget");
|
|
18
19
|
let ExpenseTransaction = class ExpenseTransaction {
|
|
19
20
|
};
|
|
20
21
|
exports.ExpenseTransaction = ExpenseTransaction;
|
|
@@ -63,6 +64,15 @@ __decorate([
|
|
|
63
64
|
}),
|
|
64
65
|
__metadata("design:type", TransactionBank_1.TransactionBank)
|
|
65
66
|
], ExpenseTransaction.prototype, "transactionBank", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.ManyToOne)(() => Budget_1.Budget, (budget) => budget.expenses, {
|
|
69
|
+
nullable: true,
|
|
70
|
+
onDelete: "SET NULL",
|
|
71
|
+
}),
|
|
72
|
+
(0, typeorm_1.JoinColumn)({ name: "idBudget" }),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], ExpenseTransaction.prototype, "budget", void 0);
|
|
66
75
|
exports.ExpenseTransaction = ExpenseTransaction = __decorate([
|
|
67
|
-
(0, typeorm_1.Entity)()
|
|
76
|
+
(0, typeorm_1.Entity)(),
|
|
77
|
+
(0, typeorm_1.Index)(["budget"])
|
|
68
78
|
], ExpenseTransaction);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ObjectLiteral } from "typeorm";
|
|
2
|
+
import { Budget } from "../models/apu/Budget";
|
|
3
|
+
import { Payment } from "./Payment";
|
|
4
|
+
import { CropLot } from "../models/production/CropLot";
|
|
5
|
+
import { Client } from "../models/apu/Client";
|
|
6
|
+
import { Inventory } from "./Inventory";
|
|
7
|
+
import { TransactionBank } from "./Bank/TransactionBank";
|
|
8
|
+
import { IncomeType } from "../types/IncomeType";
|
|
9
|
+
import { IncomeStatus } from "../types/IncomeStatus";
|
|
10
|
+
export declare class Income implements ObjectLiteral {
|
|
11
|
+
idIncome: number;
|
|
12
|
+
incomeType: IncomeType;
|
|
13
|
+
amount: number;
|
|
14
|
+
incomeDate: Date;
|
|
15
|
+
description?: string | null;
|
|
16
|
+
status: IncomeStatus;
|
|
17
|
+
budget?: Budget | null;
|
|
18
|
+
payment?: Payment | null;
|
|
19
|
+
cropLot?: CropLot | null;
|
|
20
|
+
client?: Client | null;
|
|
21
|
+
inventory?: Inventory | null;
|
|
22
|
+
quantity?: number | null;
|
|
23
|
+
unitPrice?: number | null;
|
|
24
|
+
invoiceUuid?: string | null;
|
|
25
|
+
transactionBank?: TransactionBank | null;
|
|
26
|
+
notes?: string | null;
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
updatedAt: Date;
|
|
29
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Income = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Budget_1 = require("../models/apu/Budget");
|
|
15
|
+
const Payment_1 = require("./Payment");
|
|
16
|
+
const CropLot_1 = require("../models/production/CropLot");
|
|
17
|
+
const Client_1 = require("../models/apu/Client");
|
|
18
|
+
const Inventory_1 = require("./Inventory");
|
|
19
|
+
const TransactionBank_1 = require("./Bank/TransactionBank");
|
|
20
|
+
const IncomeType_1 = require("../types/IncomeType");
|
|
21
|
+
const IncomeStatus_1 = require("../types/IncomeStatus");
|
|
22
|
+
let Income = class Income {
|
|
23
|
+
};
|
|
24
|
+
exports.Income = Income;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("increment"),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], Income.prototype, "idIncome", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({
|
|
31
|
+
type: "enum",
|
|
32
|
+
enum: IncomeType_1.IncomeType,
|
|
33
|
+
default: IncomeType_1.IncomeType.OTHER,
|
|
34
|
+
}),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], Income.prototype, "incomeType", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)("decimal", { precision: 14, scale: 2, nullable: false }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], Income.prototype, "amount", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)("date", { nullable: false }),
|
|
43
|
+
__metadata("design:type", Date)
|
|
44
|
+
], Income.prototype, "incomeDate", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)("text", { nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], Income.prototype, "description", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({
|
|
51
|
+
type: "enum",
|
|
52
|
+
enum: IncomeStatus_1.IncomeStatus,
|
|
53
|
+
default: IncomeStatus_1.IncomeStatus.PENDING,
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], Income.prototype, "status", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.ManyToOne)(() => Budget_1.Budget, (budget) => budget.incomes, {
|
|
59
|
+
nullable: true,
|
|
60
|
+
onDelete: "SET NULL",
|
|
61
|
+
}),
|
|
62
|
+
(0, typeorm_1.JoinColumn)({ name: "idBudget" }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], Income.prototype, "budget", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.ManyToOne)(() => Payment_1.Payment, { nullable: true, onDelete: "SET NULL" }),
|
|
67
|
+
(0, typeorm_1.JoinColumn)({ name: "idPayment" }),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], Income.prototype, "payment", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.ManyToOne)(() => CropLot_1.CropLot, { nullable: true, onDelete: "SET NULL" }),
|
|
72
|
+
(0, typeorm_1.JoinColumn)({ name: "idCropLot" }),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], Income.prototype, "cropLot", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.ManyToOne)(() => Client_1.Client, { nullable: true, onDelete: "SET NULL" }),
|
|
77
|
+
(0, typeorm_1.JoinColumn)({ name: "idClient" }),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], Income.prototype, "client", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.ManyToOne)(() => Inventory_1.Inventory, { nullable: true, onDelete: "SET NULL" }),
|
|
82
|
+
(0, typeorm_1.JoinColumn)({ name: "idInventory" }),
|
|
83
|
+
__metadata("design:type", Object)
|
|
84
|
+
], Income.prototype, "inventory", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)("decimal", { precision: 12, scale: 4, nullable: true }),
|
|
87
|
+
__metadata("design:type", Object)
|
|
88
|
+
], Income.prototype, "quantity", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.Column)("decimal", { precision: 14, scale: 4, nullable: true }),
|
|
91
|
+
__metadata("design:type", Object)
|
|
92
|
+
], Income.prototype, "unitPrice", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.Column)("varchar", { length: 255, nullable: true }),
|
|
95
|
+
__metadata("design:type", Object)
|
|
96
|
+
], Income.prototype, "invoiceUuid", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, typeorm_1.OneToOne)(() => TransactionBank_1.TransactionBank, { nullable: true, cascade: true }),
|
|
99
|
+
(0, typeorm_1.JoinColumn)({ name: "idTransactionBank" }),
|
|
100
|
+
__metadata("design:type", Object)
|
|
101
|
+
], Income.prototype, "transactionBank", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, typeorm_1.Column)("text", { nullable: true }),
|
|
104
|
+
__metadata("design:type", Object)
|
|
105
|
+
], Income.prototype, "notes", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, typeorm_1.CreateDateColumn)({ type: "timestamp" }),
|
|
108
|
+
__metadata("design:type", Date)
|
|
109
|
+
], Income.prototype, "createdAt", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, typeorm_1.UpdateDateColumn)({ type: "timestamp" }),
|
|
112
|
+
__metadata("design:type", Date)
|
|
113
|
+
], Income.prototype, "updatedAt", void 0);
|
|
114
|
+
exports.Income = Income = __decorate([
|
|
115
|
+
(0, typeorm_1.Entity)("incomes"),
|
|
116
|
+
(0, typeorm_1.Index)(["incomeDate"]),
|
|
117
|
+
(0, typeorm_1.Index)(["incomeType"]),
|
|
118
|
+
(0, typeorm_1.Index)(["status"]),
|
|
119
|
+
(0, typeorm_1.Index)(["budget"]),
|
|
120
|
+
(0, typeorm_1.Index)(["cropLot"])
|
|
121
|
+
], Income);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ObjectLiteral } from "typeorm";
|
|
2
2
|
import { Inventory } from "./Inventory";
|
|
3
3
|
import { MovementType } from "../types/MovementType";
|
|
4
|
+
import { Harvest } from "../models/production/Harvest";
|
|
4
5
|
export declare class InventoryMovement implements ObjectLiteral {
|
|
5
6
|
idMovement: number;
|
|
6
7
|
inventory: Inventory;
|
|
@@ -12,4 +13,5 @@ export declare class InventoryMovement implements ObjectLiteral {
|
|
|
12
13
|
description?: string;
|
|
13
14
|
referenceId?: number;
|
|
14
15
|
referenceModule?: string;
|
|
16
|
+
harvest?: Harvest | null;
|
|
15
17
|
}
|
|
@@ -13,6 +13,7 @@ exports.InventoryMovement = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const Inventory_1 = require("./Inventory");
|
|
15
15
|
const MovementType_1 = require("../types/MovementType");
|
|
16
|
+
const Harvest_1 = require("../models/production/Harvest");
|
|
16
17
|
let InventoryMovement = class InventoryMovement {
|
|
17
18
|
};
|
|
18
19
|
exports.InventoryMovement = InventoryMovement;
|
|
@@ -62,6 +63,12 @@ __decorate([
|
|
|
62
63
|
(0, typeorm_1.Column)("varchar", { length: 50, nullable: true }),
|
|
63
64
|
__metadata("design:type", String)
|
|
64
65
|
], InventoryMovement.prototype, "referenceModule", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.OneToOne)(() => Harvest_1.Harvest, (harvest) => harvest.inventoryMovement, {
|
|
68
|
+
nullable: true,
|
|
69
|
+
}),
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
|
+
], InventoryMovement.prototype, "harvest", void 0);
|
|
65
72
|
exports.InventoryMovement = InventoryMovement = __decorate([
|
|
66
73
|
(0, typeorm_1.Entity)("inventory_movement")
|
|
67
74
|
], InventoryMovement);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { BankAccount } from "./Bank/BankAccount";
|
|
2
|
+
export { TransactionBank } from "./Bank/TransactionBank";
|
|
3
|
+
export { CategoryForCosting } from "./CategoryForCosting";
|
|
4
|
+
export { CategoryForPlantType } from "./CategoryForPlantType";
|
|
5
|
+
export { Branch } from "./Branches";
|
|
6
|
+
export { BranchImage } from "./BranchImage";
|
|
7
|
+
export { Product } from "./Products";
|
|
8
|
+
export { ProductImage } from "./ProductImage";
|
|
9
|
+
export { Inventory } from "./Inventory";
|
|
10
|
+
export { InventoryItem } from "./InventoryItem";
|
|
11
|
+
export { InventoryImage } from "./InventoryImage";
|
|
12
|
+
export { InventoryMovement } from "./InventoryMovement";
|
|
13
|
+
export { ContainerType } from "./ContainerType";
|
|
14
|
+
export { Supplier } from "./Suppliers";
|
|
15
|
+
export { SupplierImage } from "./SupplierImage";
|
|
16
|
+
export { ExpenseDetail } from "./ExpenseDetail";
|
|
17
|
+
export { ExpenseTransaction } from "./ExpenseTransaction";
|
|
18
|
+
export { ExpenseType } from "./ExpenseType";
|
|
19
|
+
export { Payment } from "./Payment";
|
|
20
|
+
export { PaymentCfdi } from "./PaymentCfdi";
|
|
21
|
+
export { Income } from "./Income";
|
|
22
|
+
export { ProjectOrder } from "./ProjectOrder";
|
|
23
|
+
export { UnitOfMeasure } from "./UnitOfMesure";
|
|
24
|
+
export { User } from "./User";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.User = exports.UnitOfMeasure = exports.ProjectOrder = exports.Income = exports.PaymentCfdi = exports.Payment = exports.ExpenseType = exports.ExpenseTransaction = exports.ExpenseDetail = exports.SupplierImage = exports.Supplier = exports.ContainerType = exports.InventoryMovement = exports.InventoryImage = exports.InventoryItem = exports.Inventory = exports.ProductImage = exports.Product = exports.BranchImage = exports.Branch = exports.CategoryForPlantType = exports.CategoryForCosting = exports.TransactionBank = exports.BankAccount = void 0;
|
|
4
|
+
// Bank
|
|
5
|
+
var BankAccount_1 = require("./Bank/BankAccount");
|
|
6
|
+
Object.defineProperty(exports, "BankAccount", { enumerable: true, get: function () { return BankAccount_1.BankAccount; } });
|
|
7
|
+
var TransactionBank_1 = require("./Bank/TransactionBank");
|
|
8
|
+
Object.defineProperty(exports, "TransactionBank", { enumerable: true, get: function () { return TransactionBank_1.TransactionBank; } });
|
|
9
|
+
// Categories
|
|
10
|
+
var CategoryForCosting_1 = require("./CategoryForCosting");
|
|
11
|
+
Object.defineProperty(exports, "CategoryForCosting", { enumerable: true, get: function () { return CategoryForCosting_1.CategoryForCosting; } });
|
|
12
|
+
var CategoryForPlantType_1 = require("./CategoryForPlantType");
|
|
13
|
+
Object.defineProperty(exports, "CategoryForPlantType", { enumerable: true, get: function () { return CategoryForPlantType_1.CategoryForPlantType; } });
|
|
14
|
+
// Branches
|
|
15
|
+
var Branches_1 = require("./Branches");
|
|
16
|
+
Object.defineProperty(exports, "Branch", { enumerable: true, get: function () { return Branches_1.Branch; } });
|
|
17
|
+
var BranchImage_1 = require("./BranchImage");
|
|
18
|
+
Object.defineProperty(exports, "BranchImage", { enumerable: true, get: function () { return BranchImage_1.BranchImage; } });
|
|
19
|
+
// Products & Inventory
|
|
20
|
+
var Products_1 = require("./Products");
|
|
21
|
+
Object.defineProperty(exports, "Product", { enumerable: true, get: function () { return Products_1.Product; } });
|
|
22
|
+
var ProductImage_1 = require("./ProductImage");
|
|
23
|
+
Object.defineProperty(exports, "ProductImage", { enumerable: true, get: function () { return ProductImage_1.ProductImage; } });
|
|
24
|
+
var Inventory_1 = require("./Inventory");
|
|
25
|
+
Object.defineProperty(exports, "Inventory", { enumerable: true, get: function () { return Inventory_1.Inventory; } });
|
|
26
|
+
var InventoryItem_1 = require("./InventoryItem");
|
|
27
|
+
Object.defineProperty(exports, "InventoryItem", { enumerable: true, get: function () { return InventoryItem_1.InventoryItem; } });
|
|
28
|
+
var InventoryImage_1 = require("./InventoryImage");
|
|
29
|
+
Object.defineProperty(exports, "InventoryImage", { enumerable: true, get: function () { return InventoryImage_1.InventoryImage; } });
|
|
30
|
+
var InventoryMovement_1 = require("./InventoryMovement");
|
|
31
|
+
Object.defineProperty(exports, "InventoryMovement", { enumerable: true, get: function () { return InventoryMovement_1.InventoryMovement; } });
|
|
32
|
+
var ContainerType_1 = require("./ContainerType");
|
|
33
|
+
Object.defineProperty(exports, "ContainerType", { enumerable: true, get: function () { return ContainerType_1.ContainerType; } });
|
|
34
|
+
// Suppliers
|
|
35
|
+
var Suppliers_1 = require("./Suppliers");
|
|
36
|
+
Object.defineProperty(exports, "Supplier", { enumerable: true, get: function () { return Suppliers_1.Supplier; } });
|
|
37
|
+
var SupplierImage_1 = require("./SupplierImage");
|
|
38
|
+
Object.defineProperty(exports, "SupplierImage", { enumerable: true, get: function () { return SupplierImage_1.SupplierImage; } });
|
|
39
|
+
// Expenses
|
|
40
|
+
var ExpenseDetail_1 = require("./ExpenseDetail");
|
|
41
|
+
Object.defineProperty(exports, "ExpenseDetail", { enumerable: true, get: function () { return ExpenseDetail_1.ExpenseDetail; } });
|
|
42
|
+
var ExpenseTransaction_1 = require("./ExpenseTransaction");
|
|
43
|
+
Object.defineProperty(exports, "ExpenseTransaction", { enumerable: true, get: function () { return ExpenseTransaction_1.ExpenseTransaction; } });
|
|
44
|
+
var ExpenseType_1 = require("./ExpenseType");
|
|
45
|
+
Object.defineProperty(exports, "ExpenseType", { enumerable: true, get: function () { return ExpenseType_1.ExpenseType; } });
|
|
46
|
+
// Payments
|
|
47
|
+
var Payment_1 = require("./Payment");
|
|
48
|
+
Object.defineProperty(exports, "Payment", { enumerable: true, get: function () { return Payment_1.Payment; } });
|
|
49
|
+
var PaymentCfdi_1 = require("./PaymentCfdi");
|
|
50
|
+
Object.defineProperty(exports, "PaymentCfdi", { enumerable: true, get: function () { return PaymentCfdi_1.PaymentCfdi; } });
|
|
51
|
+
// Income
|
|
52
|
+
var Income_1 = require("./Income");
|
|
53
|
+
Object.defineProperty(exports, "Income", { enumerable: true, get: function () { return Income_1.Income; } });
|
|
54
|
+
// Others
|
|
55
|
+
var ProjectOrder_1 = require("./ProjectOrder");
|
|
56
|
+
Object.defineProperty(exports, "ProjectOrder", { enumerable: true, get: function () { return ProjectOrder_1.ProjectOrder; } });
|
|
57
|
+
var UnitOfMesure_1 = require("./UnitOfMesure");
|
|
58
|
+
Object.defineProperty(exports, "UnitOfMeasure", { enumerable: true, get: function () { return UnitOfMesure_1.UnitOfMeasure; } });
|
|
59
|
+
var User_1 = require("./User");
|
|
60
|
+
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return User_1.User; } });
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { ExpenseType } from "./entities/ExpenseType";
|
|
3
|
-
export { ProjectOrder } from "./entities/ProjectOrder";
|
|
4
|
-
export { User } from "./entities/User";
|
|
5
|
-
export { ExpenseTransaction } from "./entities/ExpenseTransaction";
|
|
6
|
-
export { InventoryItem } from "./entities/InventoryItem";
|
|
7
|
-
export { ContainerType } from "./entities/ContainerType";
|
|
8
|
-
export { Supplier } from "./entities/Suppliers";
|
|
9
|
-
export { CategoryForCosting } from "./entities/CategoryForCosting";
|
|
10
|
-
export { CategoryForPlantType } from "./entities/CategoryForPlantType";
|
|
11
|
-
export { UnitOfMeasure } from "./entities/UnitOfMesure";
|
|
12
|
-
export { BankAccount } from "./entities/Bank/BankAccount";
|
|
13
|
-
export { TransactionBank } from "./entities/Bank/TransactionBank";
|
|
14
|
-
export { ProductImage } from "./entities/ProductImage";
|
|
15
|
-
export { Product } from "./entities/Products";
|
|
16
|
-
export { Inventory } from "./entities/Inventory";
|
|
17
|
-
export { InventoryMovement } from "./entities/InventoryMovement";
|
|
18
|
-
export { Branch } from "./entities/Branches";
|
|
19
|
-
export { BranchImage } from "./entities/BranchImage";
|
|
20
|
-
export { SupplierImage } from "./entities/SupplierImage";
|
|
21
|
-
export { InventoryImage } from "./entities/InventoryImage";
|
|
22
|
-
export { Payment } from "./entities/Payment";
|
|
23
|
-
export { PaymentCfdi } from "./entities/PaymentCfdi";
|
|
1
|
+
export * from "./entities";
|
|
24
2
|
export * from "./types";
|
|
25
3
|
export * from "./models/technical-sheet";
|
|
26
4
|
export * from "./models/apu";
|
|
5
|
+
export * from "./models/production";
|
package/dist/index.js
CHANGED
|
@@ -14,53 +14,11 @@ 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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var ExpenseType_1 = require("./entities/ExpenseType");
|
|
21
|
-
Object.defineProperty(exports, "ExpenseType", { enumerable: true, get: function () { return ExpenseType_1.ExpenseType; } });
|
|
22
|
-
var ProjectOrder_1 = require("./entities/ProjectOrder");
|
|
23
|
-
Object.defineProperty(exports, "ProjectOrder", { enumerable: true, get: function () { return ProjectOrder_1.ProjectOrder; } });
|
|
24
|
-
var User_1 = require("./entities/User");
|
|
25
|
-
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return User_1.User; } });
|
|
26
|
-
var ExpenseTransaction_1 = require("./entities/ExpenseTransaction");
|
|
27
|
-
Object.defineProperty(exports, "ExpenseTransaction", { enumerable: true, get: function () { return ExpenseTransaction_1.ExpenseTransaction; } });
|
|
28
|
-
var InventoryItem_1 = require("./entities/InventoryItem");
|
|
29
|
-
Object.defineProperty(exports, "InventoryItem", { enumerable: true, get: function () { return InventoryItem_1.InventoryItem; } });
|
|
30
|
-
var ContainerType_1 = require("./entities/ContainerType");
|
|
31
|
-
Object.defineProperty(exports, "ContainerType", { enumerable: true, get: function () { return ContainerType_1.ContainerType; } });
|
|
32
|
-
var Suppliers_1 = require("./entities/Suppliers");
|
|
33
|
-
Object.defineProperty(exports, "Supplier", { enumerable: true, get: function () { return Suppliers_1.Supplier; } });
|
|
34
|
-
var CategoryForCosting_1 = require("./entities/CategoryForCosting");
|
|
35
|
-
Object.defineProperty(exports, "CategoryForCosting", { enumerable: true, get: function () { return CategoryForCosting_1.CategoryForCosting; } });
|
|
36
|
-
var CategoryForPlantType_1 = require("./entities/CategoryForPlantType");
|
|
37
|
-
Object.defineProperty(exports, "CategoryForPlantType", { enumerable: true, get: function () { return CategoryForPlantType_1.CategoryForPlantType; } });
|
|
38
|
-
var UnitOfMesure_1 = require("./entities/UnitOfMesure");
|
|
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; } });
|
|
44
|
-
var ProductImage_1 = require("./entities/ProductImage");
|
|
45
|
-
Object.defineProperty(exports, "ProductImage", { enumerable: true, get: function () { return ProductImage_1.ProductImage; } });
|
|
46
|
-
var Products_1 = require("./entities/Products");
|
|
47
|
-
Object.defineProperty(exports, "Product", { enumerable: true, get: function () { return Products_1.Product; } });
|
|
48
|
-
var Inventory_1 = require("./entities/Inventory");
|
|
49
|
-
Object.defineProperty(exports, "Inventory", { enumerable: true, get: function () { return Inventory_1.Inventory; } });
|
|
50
|
-
var InventoryMovement_1 = require("./entities/InventoryMovement");
|
|
51
|
-
Object.defineProperty(exports, "InventoryMovement", { enumerable: true, get: function () { return InventoryMovement_1.InventoryMovement; } });
|
|
52
|
-
var Branches_1 = require("./entities/Branches");
|
|
53
|
-
Object.defineProperty(exports, "Branch", { enumerable: true, get: function () { return Branches_1.Branch; } });
|
|
54
|
-
var BranchImage_1 = require("./entities/BranchImage");
|
|
55
|
-
Object.defineProperty(exports, "BranchImage", { enumerable: true, get: function () { return BranchImage_1.BranchImage; } });
|
|
56
|
-
var SupplierImage_1 = require("./entities/SupplierImage");
|
|
57
|
-
Object.defineProperty(exports, "SupplierImage", { enumerable: true, get: function () { return SupplierImage_1.SupplierImage; } });
|
|
58
|
-
var InventoryImage_1 = require("./entities/InventoryImage");
|
|
59
|
-
Object.defineProperty(exports, "InventoryImage", { enumerable: true, get: function () { return InventoryImage_1.InventoryImage; } });
|
|
60
|
-
var Payment_1 = require("./entities/Payment");
|
|
61
|
-
Object.defineProperty(exports, "Payment", { enumerable: true, get: function () { return Payment_1.Payment; } });
|
|
62
|
-
var PaymentCfdi_1 = require("./entities/PaymentCfdi");
|
|
63
|
-
Object.defineProperty(exports, "PaymentCfdi", { enumerable: true, get: function () { return PaymentCfdi_1.PaymentCfdi; } });
|
|
17
|
+
// Entities
|
|
18
|
+
__exportStar(require("./entities"), exports);
|
|
19
|
+
// Types
|
|
64
20
|
__exportStar(require("./types"), exports);
|
|
21
|
+
// Models
|
|
65
22
|
__exportStar(require("./models/technical-sheet"), exports);
|
|
66
23
|
__exportStar(require("./models/apu"), exports);
|
|
24
|
+
__exportStar(require("./models/production"), exports);
|
|
@@ -3,6 +3,8 @@ import { Project } from "./Project";
|
|
|
3
3
|
import { BudgetItem } from "./BudgetItem";
|
|
4
4
|
import { BudgetCancellationFolio } from "./BudgetCancellationFolio";
|
|
5
5
|
import { Payment } from "../../entities/Payment";
|
|
6
|
+
import { ExpenseTransaction } from "../../entities/ExpenseTransaction";
|
|
7
|
+
import { Income } from "../../entities/Income";
|
|
6
8
|
export declare class Budget implements ObjectLiteral {
|
|
7
9
|
idBudget: number;
|
|
8
10
|
project: Project;
|
|
@@ -19,4 +21,6 @@ export declare class Budget implements ObjectLiteral {
|
|
|
19
21
|
items?: BudgetItem[];
|
|
20
22
|
cancellationFolios?: BudgetCancellationFolio[];
|
|
21
23
|
payments?: Payment[];
|
|
24
|
+
expenses?: ExpenseTransaction[];
|
|
25
|
+
incomes?: Income[];
|
|
22
26
|
}
|
|
@@ -16,6 +16,8 @@ const Project_1 = require("./Project");
|
|
|
16
16
|
const BudgetItem_1 = require("./BudgetItem");
|
|
17
17
|
const BudgetCancellationFolio_1 = require("./BudgetCancellationFolio");
|
|
18
18
|
const Payment_1 = require("../../entities/Payment");
|
|
19
|
+
const ExpenseTransaction_1 = require("../../entities/ExpenseTransaction");
|
|
20
|
+
const Income_1 = require("../../entities/Income");
|
|
19
21
|
let Budget = class Budget {
|
|
20
22
|
};
|
|
21
23
|
exports.Budget = Budget;
|
|
@@ -80,6 +82,14 @@ __decorate([
|
|
|
80
82
|
(0, typeorm_1.OneToMany)(() => Payment_1.Payment, (payment) => payment.budget),
|
|
81
83
|
__metadata("design:type", Array)
|
|
82
84
|
], Budget.prototype, "payments", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.OneToMany)(() => ExpenseTransaction_1.ExpenseTransaction, (expense) => expense.budget),
|
|
87
|
+
__metadata("design:type", Array)
|
|
88
|
+
], Budget.prototype, "expenses", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.OneToMany)(() => Income_1.Income, (income) => income.budget),
|
|
91
|
+
__metadata("design:type", Array)
|
|
92
|
+
], Budget.prototype, "incomes", void 0);
|
|
83
93
|
exports.Budget = Budget = __decorate([
|
|
84
94
|
(0, typeorm_1.Entity)("budgets"),
|
|
85
95
|
(0, typeorm_1.Index)(["project"])
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ObjectLiteral } from "typeorm";
|
|
2
|
+
import { CropLot } from "./CropLot";
|
|
3
|
+
import { CropActivityType } from "../../types/CropActivityType";
|
|
4
|
+
import { UnitOfMeasure } from "../../entities/UnitOfMesure";
|
|
5
|
+
import { CropExpense } from "./CropExpense";
|
|
6
|
+
export declare class CropActivity implements ObjectLiteral {
|
|
7
|
+
idCropActivity: number;
|
|
8
|
+
cropLot: CropLot;
|
|
9
|
+
activityType: CropActivityType;
|
|
10
|
+
description: string;
|
|
11
|
+
activityDate: Date;
|
|
12
|
+
quantity?: number | null;
|
|
13
|
+
unitOfMeasure?: UnitOfMeasure | null;
|
|
14
|
+
laborHours?: number | null;
|
|
15
|
+
notes?: string | null;
|
|
16
|
+
performedBy?: string | null;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
updatedAt: Date;
|
|
19
|
+
expenses?: CropExpense[];
|
|
20
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CropActivity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const CropLot_1 = require("./CropLot");
|
|
15
|
+
const CropActivityType_1 = require("../../types/CropActivityType");
|
|
16
|
+
const UnitOfMesure_1 = require("../../entities/UnitOfMesure");
|
|
17
|
+
const CropExpense_1 = require("./CropExpense");
|
|
18
|
+
let CropActivity = class CropActivity {
|
|
19
|
+
};
|
|
20
|
+
exports.CropActivity = CropActivity;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("increment"),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], CropActivity.prototype, "idCropActivity", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.ManyToOne)(() => CropLot_1.CropLot, (cropLot) => cropLot.activities, {
|
|
27
|
+
nullable: false,
|
|
28
|
+
onDelete: "CASCADE",
|
|
29
|
+
}),
|
|
30
|
+
(0, typeorm_1.JoinColumn)({ name: "idCropLot" }),
|
|
31
|
+
__metadata("design:type", CropLot_1.CropLot)
|
|
32
|
+
], CropActivity.prototype, "cropLot", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({
|
|
35
|
+
type: "enum",
|
|
36
|
+
enum: CropActivityType_1.CropActivityType,
|
|
37
|
+
}),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], CropActivity.prototype, "activityType", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)("text", { nullable: false }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], CropActivity.prototype, "description", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)("date", { nullable: false }),
|
|
46
|
+
__metadata("design:type", Date)
|
|
47
|
+
], CropActivity.prototype, "activityDate", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)("decimal", { precision: 12, scale: 4, nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], CropActivity.prototype, "quantity", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.ManyToOne)(() => UnitOfMesure_1.UnitOfMeasure, { nullable: true, onDelete: "SET NULL" }),
|
|
54
|
+
(0, typeorm_1.JoinColumn)({ name: "idUnitOfMeasure" }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], CropActivity.prototype, "unitOfMeasure", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)("decimal", { precision: 8, scale: 2, nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], CropActivity.prototype, "laborHours", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)("text", { nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], CropActivity.prototype, "notes", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)("varchar", { length: 255, nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], CropActivity.prototype, "performedBy", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.CreateDateColumn)({ type: "timestamp" }),
|
|
71
|
+
__metadata("design:type", Date)
|
|
72
|
+
], CropActivity.prototype, "createdAt", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.UpdateDateColumn)({ type: "timestamp" }),
|
|
75
|
+
__metadata("design:type", Date)
|
|
76
|
+
], CropActivity.prototype, "updatedAt", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.OneToMany)(() => CropExpense_1.CropExpense, (expense) => expense.cropActivity, { cascade: true }),
|
|
79
|
+
__metadata("design:type", Array)
|
|
80
|
+
], CropActivity.prototype, "expenses", void 0);
|
|
81
|
+
exports.CropActivity = CropActivity = __decorate([
|
|
82
|
+
(0, typeorm_1.Entity)("crop_activities"),
|
|
83
|
+
(0, typeorm_1.Index)(["cropLot", "activityDate"]),
|
|
84
|
+
(0, typeorm_1.Index)(["activityType"])
|
|
85
|
+
], CropActivity);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ObjectLiteral } from "typeorm";
|
|
2
|
+
import { CropLot } from "./CropLot";
|
|
3
|
+
import { CropActivity } from "./CropActivity";
|
|
4
|
+
import { ExpenseType } from "../../entities/ExpenseType";
|
|
5
|
+
import { Resource } from "../apu/Resource";
|
|
6
|
+
import { Inventory } from "../../entities/Inventory";
|
|
7
|
+
export declare class CropExpense implements ObjectLiteral {
|
|
8
|
+
idCropExpense: number;
|
|
9
|
+
cropLot: CropLot;
|
|
10
|
+
cropActivity?: CropActivity | null;
|
|
11
|
+
expenseType?: ExpenseType | null;
|
|
12
|
+
concept: string;
|
|
13
|
+
amount: number;
|
|
14
|
+
quantity: number;
|
|
15
|
+
unitPrice: number;
|
|
16
|
+
expenseDate: Date;
|
|
17
|
+
resource?: Resource | null;
|
|
18
|
+
inventory?: Inventory | null;
|
|
19
|
+
notes?: string | null;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
}
|