proflores-db-model 0.2.21 → 0.2.22
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.
|
@@ -4,9 +4,11 @@ import { UnitOfMeasure } from "./UnitOfMesure";
|
|
|
4
4
|
import { CategoryForCosting } from "./CategoryForCosting";
|
|
5
5
|
import { CategoryForPlantType } from "./CategoryForPlantType";
|
|
6
6
|
import { Supplier } from "./Suppliers";
|
|
7
|
+
import { PlantTechnicalSheet } from "../models/technical-sheet/PlantTechnicalSheet";
|
|
7
8
|
export declare class InventoryItem implements ObjectLiteral {
|
|
8
9
|
idInventoryItem: number;
|
|
9
10
|
concept: string;
|
|
11
|
+
technicalSheet?: PlantTechnicalSheet;
|
|
10
12
|
container: ContainerType;
|
|
11
13
|
wholesalePrice: number;
|
|
12
14
|
retailPrice: number;
|
|
@@ -16,6 +16,7 @@ const UnitOfMesure_1 = require("./UnitOfMesure");
|
|
|
16
16
|
const CategoryForCosting_1 = require("./CategoryForCosting");
|
|
17
17
|
const CategoryForPlantType_1 = require("./CategoryForPlantType");
|
|
18
18
|
const Suppliers_1 = require("./Suppliers");
|
|
19
|
+
const PlantTechnicalSheet_1 = require("../models/technical-sheet/PlantTechnicalSheet");
|
|
19
20
|
let InventoryItem = class InventoryItem {
|
|
20
21
|
};
|
|
21
22
|
exports.InventoryItem = InventoryItem;
|
|
@@ -27,6 +28,11 @@ __decorate([
|
|
|
27
28
|
(0, typeorm_1.Column)("varchar", { nullable: false, length: 255 }),
|
|
28
29
|
__metadata("design:type", String)
|
|
29
30
|
], InventoryItem.prototype, "concept", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.ManyToOne)(() => PlantTechnicalSheet_1.PlantTechnicalSheet, { nullable: true }),
|
|
33
|
+
(0, typeorm_1.JoinColumn)({ name: "plantTechnicalSheetId" }),
|
|
34
|
+
__metadata("design:type", PlantTechnicalSheet_1.PlantTechnicalSheet)
|
|
35
|
+
], InventoryItem.prototype, "technicalSheet", void 0);
|
|
30
36
|
__decorate([
|
|
31
37
|
(0, typeorm_1.ManyToOne)(() => ContainerType_1.ContainerType, { nullable: false }),
|
|
32
38
|
(0, typeorm_1.JoinColumn)({ name: "containerId" }),
|
package/package.json
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Entity,
|
|
3
|
+
PrimaryGeneratedColumn,
|
|
4
|
+
Column,
|
|
5
|
+
ObjectLiteral,
|
|
6
|
+
ManyToOne,
|
|
7
|
+
JoinColumn,
|
|
8
|
+
} from "typeorm";
|
|
2
9
|
import { ContainerType } from "./ContainerType";
|
|
3
10
|
import { UnitOfMeasure } from "./UnitOfMesure";
|
|
4
11
|
import { CategoryForCosting } from "./CategoryForCosting";
|
|
5
12
|
import { CategoryForPlantType } from "./CategoryForPlantType";
|
|
6
13
|
import { Supplier } from "./Suppliers";
|
|
7
|
-
|
|
14
|
+
import { PlantTechnicalSheet } from "../models/technical-sheet/PlantTechnicalSheet";
|
|
8
15
|
|
|
9
16
|
@Entity("inventory_items")
|
|
10
17
|
export class InventoryItem implements ObjectLiteral {
|
|
@@ -14,8 +21,12 @@ export class InventoryItem implements ObjectLiteral {
|
|
|
14
21
|
@Column("varchar", { nullable: false, length: 255 })
|
|
15
22
|
concept!: string;
|
|
16
23
|
|
|
24
|
+
@ManyToOne(() => PlantTechnicalSheet, { nullable: true })
|
|
25
|
+
@JoinColumn({ name: "plantTechnicalSheetId" })
|
|
26
|
+
technicalSheet?: PlantTechnicalSheet;
|
|
27
|
+
|
|
17
28
|
@ManyToOne(() => ContainerType, { nullable: false })
|
|
18
|
-
@JoinColumn({ name: "containerId" })
|
|
29
|
+
@JoinColumn({ name: "containerId" })
|
|
19
30
|
container!: ContainerType;
|
|
20
31
|
|
|
21
32
|
@Column("decimal", { nullable: false })
|
|
@@ -29,10 +40,10 @@ export class InventoryItem implements ObjectLiteral {
|
|
|
29
40
|
|
|
30
41
|
@Column("decimal", { nullable: false, default: 0 })
|
|
31
42
|
quantity!: number;
|
|
32
|
-
|
|
43
|
+
|
|
33
44
|
@ManyToOne(() => UnitOfMeasure)
|
|
34
45
|
@JoinColumn({ name: "unitOfMeasureId" })
|
|
35
|
-
unitOfMeasure!: UnitOfMeasure;
|
|
46
|
+
unitOfMeasure!: UnitOfMeasure;
|
|
36
47
|
|
|
37
48
|
@ManyToOne(() => CategoryForCosting)
|
|
38
49
|
@JoinColumn({ name: "categoryForCostingId" })
|