proflores-db-model 0.2.11 → 0.2.20

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.
@@ -6,10 +6,12 @@ import { ContainerType } from "./ContainerType";
6
6
  import { Supplier } from "./Suppliers";
7
7
  import { InventoryImage } from "./InventoryImage";
8
8
  import { InventoryMovement } from "./InventoryMovement";
9
+ import { PlantTechnicalSheet } from "../models/technical-sheet/PlantTechnicalSheet";
9
10
  export declare class Inventory implements ObjectLiteral {
10
11
  idInventory: number;
11
12
  product: Product | null;
12
13
  container: ContainerType | null;
14
+ plantTechnicalSheet?: PlantTechnicalSheet;
13
15
  quantity: number;
14
16
  wholesalePrice: number;
15
17
  retailPrice: number;
@@ -18,6 +18,7 @@ const ContainerType_1 = require("./ContainerType");
18
18
  const Suppliers_1 = require("./Suppliers");
19
19
  const InventoryImage_1 = require("./InventoryImage");
20
20
  const InventoryMovement_1 = require("./InventoryMovement");
21
+ const PlantTechnicalSheet_1 = require("../models/technical-sheet/PlantTechnicalSheet");
21
22
  let Inventory = class Inventory {
22
23
  };
23
24
  exports.Inventory = Inventory;
@@ -35,6 +36,11 @@ __decorate([
35
36
  (0, typeorm_1.JoinColumn)({ name: "containerId" }),
36
37
  __metadata("design:type", Object)
37
38
  ], Inventory.prototype, "container", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.ManyToOne)(() => PlantTechnicalSheet_1.PlantTechnicalSheet, { nullable: true }),
41
+ (0, typeorm_1.JoinColumn)({ name: "idPlantTechnicalSheet" }),
42
+ __metadata("design:type", PlantTechnicalSheet_1.PlantTechnicalSheet)
43
+ ], Inventory.prototype, "plantTechnicalSheet", void 0);
38
44
  __decorate([
39
45
  (0, typeorm_1.Column)("decimal", { nullable: false, default: 0 }),
40
46
  __metadata("design:type", Number)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proflores-db-model",
3
- "version": "0.2.11",
3
+ "version": "0.2.20",
4
4
  "description": "Data model for managing expenses and transactions for Proflores nursery business",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,6 +14,7 @@ import { ContainerType } from "./ContainerType";
14
14
  import { Supplier } from "./Suppliers";
15
15
  import { InventoryImage } from "./InventoryImage";
16
16
  import { InventoryMovement } from "./InventoryMovement";
17
+ import { PlantTechnicalSheet } from "../models/technical-sheet/PlantTechnicalSheet";
17
18
 
18
19
  @Entity("inventory")
19
20
  export class Inventory implements ObjectLiteral {
@@ -28,6 +29,10 @@ export class Inventory implements ObjectLiteral {
28
29
  @JoinColumn({ name: "containerId" })
29
30
  container!: ContainerType | null;
30
31
 
32
+ @ManyToOne(() => PlantTechnicalSheet, { nullable: true })
33
+ @JoinColumn({ name: "idPlantTechnicalSheet" })
34
+ plantTechnicalSheet?: PlantTechnicalSheet;
35
+
31
36
  @Column("decimal", { nullable: false, default: 0 })
32
37
  quantity!: number;
33
38
 
@@ -0,0 +1 @@
1
+ const supabaseNames = ["agapanto"]