proflores-db-model 0.1.33 → 0.2.0

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.
Files changed (113) hide show
  1. package/dist/entities/Bank/BankAccount.js +2 -2
  2. package/dist/entities/Bank/TransactionBank.js +2 -2
  3. package/dist/entities/BranchImage.js +2 -2
  4. package/dist/entities/Branches.js +2 -2
  5. package/dist/entities/CategoryForCosting.js +2 -2
  6. package/dist/entities/CategoryForPlantType.js +2 -2
  7. package/dist/entities/ContainerType.js +2 -2
  8. package/dist/entities/ExpenseDetail.js +2 -2
  9. package/dist/entities/ExpenseTransaction.js +2 -2
  10. package/dist/entities/ExpenseType.js +2 -2
  11. package/dist/entities/Inventory.d.ts +2 -0
  12. package/dist/entities/Inventory.js +7 -2
  13. package/dist/entities/InventoryImage.js +2 -2
  14. package/dist/entities/InventoryItem.js +2 -2
  15. package/dist/entities/InventoryMovement.d.ts +15 -0
  16. package/dist/entities/InventoryMovement.js +67 -0
  17. package/dist/entities/ProductImage.js +2 -2
  18. package/dist/entities/Products.js +2 -2
  19. package/dist/entities/ProjectOrder.js +2 -2
  20. package/dist/entities/SupplierImage.js +2 -2
  21. package/dist/entities/Suppliers.js +2 -2
  22. package/dist/entities/UnitOfMesure.js +2 -2
  23. package/dist/entities/User.js +2 -2
  24. package/dist/index.d.ts +2 -0
  25. package/dist/index.js +4 -1
  26. package/dist/models/technical-sheet/CareInstructions.d.ts +16 -0
  27. package/dist/models/technical-sheet/CareInstructions.js +68 -0
  28. package/dist/models/technical-sheet/ClimateIdeal.d.ts +11 -0
  29. package/dist/models/technical-sheet/ClimateIdeal.js +48 -0
  30. package/dist/models/technical-sheet/FertilizationInfo.d.ts +20 -0
  31. package/dist/models/technical-sheet/FertilizationInfo.js +64 -0
  32. package/dist/models/technical-sheet/GrowthClassInfo.d.ts +15 -0
  33. package/dist/models/technical-sheet/GrowthClassInfo.js +49 -0
  34. package/dist/models/technical-sheet/HumidityInfo.d.ts +10 -0
  35. package/dist/models/technical-sheet/HumidityInfo.js +44 -0
  36. package/dist/models/technical-sheet/ImageInfo.d.ts +29 -0
  37. package/dist/models/technical-sheet/ImageInfo.js +134 -0
  38. package/dist/models/technical-sheet/LightInfo.d.ts +10 -0
  39. package/dist/models/technical-sheet/LightInfo.js +44 -0
  40. package/dist/models/technical-sheet/PestInfo.d.ts +18 -0
  41. package/dist/models/technical-sheet/PestInfo.js +76 -0
  42. package/dist/models/technical-sheet/PlantGrowthType.d.ts +15 -0
  43. package/dist/models/technical-sheet/PlantGrowthType.js +53 -0
  44. package/dist/models/technical-sheet/PlantSize.d.ts +14 -0
  45. package/dist/models/technical-sheet/PlantSize.js +62 -0
  46. package/dist/models/technical-sheet/PlantTechnicalSheet.d.ts +33 -0
  47. package/dist/models/technical-sheet/PlantTechnicalSheet.js +117 -0
  48. package/dist/models/technical-sheet/PropagationMethodInfo.d.ts +12 -0
  49. package/dist/models/technical-sheet/PropagationMethodInfo.js +52 -0
  50. package/dist/models/technical-sheet/SubstrateInfo.d.ts +13 -0
  51. package/dist/models/technical-sheet/SubstrateInfo.js +58 -0
  52. package/dist/models/technical-sheet/catalogs/climate-ideal.d.ts +11 -0
  53. package/dist/models/technical-sheet/catalogs/climate-ideal.js +14 -0
  54. package/dist/models/technical-sheet/catalogs/fertilization-info.d.ts +34 -0
  55. package/dist/models/technical-sheet/catalogs/fertilization-info.js +35 -0
  56. package/dist/models/technical-sheet/catalogs/growth-class.d.ts +10 -0
  57. package/dist/models/technical-sheet/catalogs/growth-class.js +14 -0
  58. package/dist/models/technical-sheet/catalogs/growth-type.d.ts +32 -0
  59. package/dist/models/technical-sheet/catalogs/growth-type.js +35 -0
  60. package/dist/models/technical-sheet/catalogs/humidity-info.d.ts +9 -0
  61. package/dist/models/technical-sheet/catalogs/humidity-info.js +12 -0
  62. package/dist/models/technical-sheet/catalogs/light-info.d.ts +9 -0
  63. package/dist/models/technical-sheet/catalogs/light-info.js +13 -0
  64. package/dist/models/technical-sheet/catalogs/pest-info.d.ts +32 -0
  65. package/dist/models/technical-sheet/catalogs/pest-info.js +33 -0
  66. package/dist/models/technical-sheet/catalogs/plant-size.d.ts +11 -0
  67. package/dist/models/technical-sheet/catalogs/plant-size.js +15 -0
  68. package/dist/models/technical-sheet/catalogs/propagation-method.d.ts +14 -0
  69. package/dist/models/technical-sheet/catalogs/propagation-method.js +18 -0
  70. package/dist/models/technical-sheet/catalogs/substrate-info.d.ts +17 -0
  71. package/dist/models/technical-sheet/catalogs/substrate-info.js +21 -0
  72. package/dist/models/technical-sheet/index.d.ts +13 -0
  73. package/dist/models/technical-sheet/index.js +29 -0
  74. package/dist/models/technical-sheet/utils/enumColumn.d.ts +6 -0
  75. package/dist/models/technical-sheet/utils/enumColumn.js +12 -0
  76. package/dist/models/technical-sheet/utils/makeCatalog.d.ts +8 -0
  77. package/dist/models/technical-sheet/utils/makeCatalog.js +19 -0
  78. package/dist/types/MovementType.d.ts +7 -0
  79. package/dist/types/MovementType.js +11 -0
  80. package/dist/types/index.d.ts +1 -0
  81. package/dist/types/index.js +3 -0
  82. package/package.json +5 -5
  83. package/src/entities/Inventory.ts +5 -0
  84. package/src/entities/InventoryMovement.ts +52 -0
  85. package/src/index.ts +2 -0
  86. package/src/models/technical-sheet/CareInstructions.ts +52 -0
  87. package/src/models/technical-sheet/ClimateIdeal.ts +34 -0
  88. package/src/models/technical-sheet/FertilizationInfo.ts +59 -0
  89. package/src/models/technical-sheet/GrowthClassInfo.ts +38 -0
  90. package/src/models/technical-sheet/HumidityInfo.ts +31 -0
  91. package/src/models/technical-sheet/ImageInfo.ts +111 -0
  92. package/src/models/technical-sheet/LightInfo.ts +31 -0
  93. package/src/models/technical-sheet/PestInfo.ts +65 -0
  94. package/src/models/technical-sheet/PlantGrowthType.ts +41 -0
  95. package/src/models/technical-sheet/PlantSize.ts +48 -0
  96. package/src/models/technical-sheet/PlantTechnicalSheet.ts +93 -0
  97. package/src/models/technical-sheet/PropagationMethodInfo.ts +37 -0
  98. package/src/models/technical-sheet/SubstrateInfo.ts +45 -0
  99. package/src/models/technical-sheet/catalogs/climate-ideal.ts +16 -0
  100. package/src/models/technical-sheet/catalogs/fertilization-info.ts +41 -0
  101. package/src/models/technical-sheet/catalogs/growth-class.ts +14 -0
  102. package/src/models/technical-sheet/catalogs/growth-type.ts +37 -0
  103. package/src/models/technical-sheet/catalogs/humidity-info.ts +12 -0
  104. package/src/models/technical-sheet/catalogs/light-info.ts +13 -0
  105. package/src/models/technical-sheet/catalogs/pest-info.ts +36 -0
  106. package/src/models/technical-sheet/catalogs/plant-size.ts +15 -0
  107. package/src/models/technical-sheet/catalogs/propagation-method.ts +18 -0
  108. package/src/models/technical-sheet/catalogs/substrate-info.ts +21 -0
  109. package/src/models/technical-sheet/index.ts +14 -0
  110. package/src/models/technical-sheet/utils/enumColumn.ts +17 -0
  111. package/src/models/technical-sheet/utils/makeCatalog.ts +17 -0
  112. package/src/types/MovementType.ts +7 -0
  113. package/src/types/index.ts +1 -0
@@ -0,0 +1,62 @@
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.PlantSize = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const plant_size_1 = require("./catalogs/plant-size");
15
+ const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
16
+ const ImageInfo_1 = require("./ImageInfo");
17
+ const enumColumn_1 = require("./utils/enumColumn");
18
+ let PlantSize = class PlantSize {
19
+ };
20
+ exports.PlantSize = PlantSize;
21
+ __decorate([
22
+ (0, typeorm_1.PrimaryGeneratedColumn)('increment'),
23
+ __metadata("design:type", Number)
24
+ ], PlantSize.prototype, "idPlantSize", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)('int'),
27
+ __metadata("design:type", Number)
28
+ ], PlantSize.prototype, "heightCm", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)('int', { nullable: true }),
31
+ __metadata("design:type", Object)
32
+ ], PlantSize.prototype, "widthCm", void 0);
33
+ __decorate([
34
+ (0, enumColumn_1.EnumColumn)(Object.keys(plant_size_1.GROWTH_HABIT_GEOM), { nullable: true }),
35
+ __metadata("design:type", Object)
36
+ ], PlantSize.prototype, "habit", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)('text', { nullable: true }),
39
+ __metadata("design:type", Object)
40
+ ], PlantSize.prototype, "notes", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.OneToMany)(() => ImageInfo_1.ImageInfo, (image) => image.plantSize, {
43
+ cascade: true,
44
+ nullable: true,
45
+ }),
46
+ __metadata("design:type", Object)
47
+ ], PlantSize.prototype, "images", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.ManyToOne)(() => PlantTechnicalSheet_1.PlantTechnicalSheet, (sheet) => sheet.size, {
50
+ nullable: false,
51
+ onDelete: 'CASCADE',
52
+ }),
53
+ (0, typeorm_1.JoinColumn)({ name: 'plantTechnicalSheetId' }),
54
+ __metadata("design:type", PlantTechnicalSheet_1.PlantTechnicalSheet)
55
+ ], PlantSize.prototype, "plantTechnicalSheet", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
58
+ __metadata("design:type", Boolean)
59
+ ], PlantSize.prototype, "isActive", void 0);
60
+ exports.PlantSize = PlantSize = __decorate([
61
+ (0, typeorm_1.Entity)('plant_size')
62
+ ], PlantSize);
@@ -0,0 +1,33 @@
1
+ import { ObjectLiteral } from "typeorm";
2
+ import { PlantGrowthType } from "./PlantGrowthType";
3
+ import { LightInfo } from "./LightInfo";
4
+ import { HumidityInfo } from "./HumidityInfo";
5
+ import { ClimateIdeal } from "./ClimateIdeal";
6
+ import { SubstrateInfo } from "./SubstrateInfo";
7
+ import { FertilizationInfo } from "./FertilizationInfo";
8
+ import { PestInfo } from "./PestInfo";
9
+ import { CareInstructions } from "./CareInstructions";
10
+ import { PropagationMethodInfo } from "./PropagationMethodInfo";
11
+ import { PlantSize } from "./PlantSize";
12
+ import { GrowthClassInfo } from "./GrowthClassInfo";
13
+ import { ImageInfo } from "./ImageInfo";
14
+ export declare class PlantTechnicalSheet implements ObjectLiteral {
15
+ idPlantTechnicalSheet: number;
16
+ commonName: string;
17
+ scientificName: string;
18
+ origin: string;
19
+ plantType: PlantGrowthType;
20
+ light: LightInfo;
21
+ humidity: HumidityInfo;
22
+ climate: ClimateIdeal;
23
+ substrate: SubstrateInfo;
24
+ fertilization: FertilizationInfo;
25
+ pests: PestInfo[];
26
+ care: CareInstructions;
27
+ propagation: PropagationMethodInfo;
28
+ size: PlantSize;
29
+ growthClass: GrowthClassInfo;
30
+ images?: ImageInfo[];
31
+ notes?: string;
32
+ isActive: boolean;
33
+ }
@@ -0,0 +1,117 @@
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.PlantTechnicalSheet = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const PlantGrowthType_1 = require("./PlantGrowthType");
15
+ const LightInfo_1 = require("./LightInfo");
16
+ const HumidityInfo_1 = require("./HumidityInfo");
17
+ const ClimateIdeal_1 = require("./ClimateIdeal");
18
+ const SubstrateInfo_1 = require("./SubstrateInfo");
19
+ const FertilizationInfo_1 = require("./FertilizationInfo");
20
+ const PestInfo_1 = require("./PestInfo");
21
+ const CareInstructions_1 = require("./CareInstructions");
22
+ const PropagationMethodInfo_1 = require("./PropagationMethodInfo");
23
+ const PlantSize_1 = require("./PlantSize");
24
+ const GrowthClassInfo_1 = require("./GrowthClassInfo");
25
+ const ImageInfo_1 = require("./ImageInfo");
26
+ let PlantTechnicalSheet = class PlantTechnicalSheet {
27
+ };
28
+ exports.PlantTechnicalSheet = PlantTechnicalSheet;
29
+ __decorate([
30
+ (0, typeorm_1.PrimaryGeneratedColumn)("increment"),
31
+ __metadata("design:type", Number)
32
+ ], PlantTechnicalSheet.prototype, "idPlantTechnicalSheet", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)("varchar", { length: 255 }),
35
+ __metadata("design:type", String)
36
+ ], PlantTechnicalSheet.prototype, "commonName", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)("varchar", { length: 255 }),
39
+ __metadata("design:type", String)
40
+ ], PlantTechnicalSheet.prototype, "scientificName", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)("varchar", { length: 255 }),
43
+ __metadata("design:type", String)
44
+ ], PlantTechnicalSheet.prototype, "origin", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.OneToOne)(() => PlantGrowthType_1.PlantGrowthType, { cascade: true }),
47
+ (0, typeorm_1.JoinColumn)({ name: "plantGrowthTypeId" }),
48
+ __metadata("design:type", PlantGrowthType_1.PlantGrowthType)
49
+ ], PlantTechnicalSheet.prototype, "plantType", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.OneToOne)(() => LightInfo_1.LightInfo, { cascade: true }),
52
+ (0, typeorm_1.JoinColumn)({ name: "lightInfoId" }),
53
+ __metadata("design:type", LightInfo_1.LightInfo)
54
+ ], PlantTechnicalSheet.prototype, "light", void 0);
55
+ __decorate([
56
+ (0, typeorm_1.OneToOne)(() => HumidityInfo_1.HumidityInfo, { cascade: true }),
57
+ (0, typeorm_1.JoinColumn)({ name: "humidityInfoId" }),
58
+ __metadata("design:type", HumidityInfo_1.HumidityInfo)
59
+ ], PlantTechnicalSheet.prototype, "humidity", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.OneToOne)(() => ClimateIdeal_1.ClimateIdeal, { cascade: true }),
62
+ (0, typeorm_1.JoinColumn)({ name: "climateIdealId" }),
63
+ __metadata("design:type", ClimateIdeal_1.ClimateIdeal)
64
+ ], PlantTechnicalSheet.prototype, "climate", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.OneToOne)(() => SubstrateInfo_1.SubstrateInfo, { cascade: true }),
67
+ (0, typeorm_1.JoinColumn)({ name: "substrateInfoId" }),
68
+ __metadata("design:type", SubstrateInfo_1.SubstrateInfo)
69
+ ], PlantTechnicalSheet.prototype, "substrate", void 0);
70
+ __decorate([
71
+ (0, typeorm_1.OneToOne)(() => FertilizationInfo_1.FertilizationInfo, { cascade: true }),
72
+ (0, typeorm_1.JoinColumn)({ name: "fertilizationInfoId" }),
73
+ __metadata("design:type", FertilizationInfo_1.FertilizationInfo)
74
+ ], PlantTechnicalSheet.prototype, "fertilization", void 0);
75
+ __decorate([
76
+ (0, typeorm_1.OneToMany)(() => PestInfo_1.PestInfo, (pest) => pest.technicalSheet, {
77
+ cascade: true,
78
+ }),
79
+ __metadata("design:type", Array)
80
+ ], PlantTechnicalSheet.prototype, "pests", void 0);
81
+ __decorate([
82
+ (0, typeorm_1.OneToOne)(() => CareInstructions_1.CareInstructions, { cascade: true }),
83
+ (0, typeorm_1.JoinColumn)({ name: "careInstructionsId" }),
84
+ __metadata("design:type", CareInstructions_1.CareInstructions)
85
+ ], PlantTechnicalSheet.prototype, "care", void 0);
86
+ __decorate([
87
+ (0, typeorm_1.OneToOne)(() => PropagationMethodInfo_1.PropagationMethodInfo, { cascade: true }),
88
+ (0, typeorm_1.JoinColumn)({ name: "propagationMethodId" }),
89
+ __metadata("design:type", PropagationMethodInfo_1.PropagationMethodInfo)
90
+ ], PlantTechnicalSheet.prototype, "propagation", void 0);
91
+ __decorate([
92
+ (0, typeorm_1.OneToOne)(() => PlantSize_1.PlantSize, { cascade: true }),
93
+ (0, typeorm_1.JoinColumn)({ name: "plantSizeId" }),
94
+ __metadata("design:type", PlantSize_1.PlantSize)
95
+ ], PlantTechnicalSheet.prototype, "size", void 0);
96
+ __decorate([
97
+ (0, typeorm_1.OneToOne)(() => GrowthClassInfo_1.GrowthClassInfo, { cascade: true }),
98
+ (0, typeorm_1.JoinColumn)({ name: "growthClassInfoId" }),
99
+ __metadata("design:type", GrowthClassInfo_1.GrowthClassInfo)
100
+ ], PlantTechnicalSheet.prototype, "growthClass", void 0);
101
+ __decorate([
102
+ (0, typeorm_1.OneToMany)(() => ImageInfo_1.ImageInfo, (img) => img.plantTechnicalSheet, {
103
+ cascade: true,
104
+ }),
105
+ __metadata("design:type", Array)
106
+ ], PlantTechnicalSheet.prototype, "images", void 0);
107
+ __decorate([
108
+ (0, typeorm_1.Column)("text", { nullable: true }),
109
+ __metadata("design:type", String)
110
+ ], PlantTechnicalSheet.prototype, "notes", void 0);
111
+ __decorate([
112
+ (0, typeorm_1.Column)({ type: "boolean", default: true }),
113
+ __metadata("design:type", Boolean)
114
+ ], PlantTechnicalSheet.prototype, "isActive", void 0);
115
+ exports.PlantTechnicalSheet = PlantTechnicalSheet = __decorate([
116
+ (0, typeorm_1.Entity)("plant_technical_sheets")
117
+ ], PlantTechnicalSheet);
@@ -0,0 +1,12 @@
1
+ import { ObjectLiteral } from "typeorm";
2
+ import { PropagationMethod } from "./catalogs/propagation-method";
3
+ import { ImageInfo } from "./ImageInfo";
4
+ import { PlantTechnicalSheet } from "./PlantTechnicalSheet";
5
+ export declare class PropagationMethodInfo implements ObjectLiteral {
6
+ idPropagationMethodInfo: number;
7
+ type: PropagationMethod | undefined;
8
+ description?: string | null;
9
+ images?: ImageInfo[] | undefined;
10
+ plantTechnicalSheets: PlantTechnicalSheet[];
11
+ isActive?: boolean | undefined;
12
+ }
@@ -0,0 +1,52 @@
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.PropagationMethodInfo = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const propagation_method_1 = require("./catalogs/propagation-method");
15
+ const ImageInfo_1 = require("./ImageInfo");
16
+ const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
17
+ const enumColumn_1 = require("./utils/enumColumn");
18
+ let PropagationMethodInfo = class PropagationMethodInfo {
19
+ };
20
+ exports.PropagationMethodInfo = PropagationMethodInfo;
21
+ __decorate([
22
+ (0, typeorm_1.PrimaryGeneratedColumn)("increment"),
23
+ __metadata("design:type", Number)
24
+ ], PropagationMethodInfo.prototype, "idPropagationMethodInfo", void 0);
25
+ __decorate([
26
+ (0, enumColumn_1.EnumColumn)(Object.keys(propagation_method_1.PROPAGATION), {
27
+ nullable: false,
28
+ }),
29
+ __metadata("design:type", Object)
30
+ ], PropagationMethodInfo.prototype, "type", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.Column)("text", { nullable: true }),
33
+ __metadata("design:type", Object)
34
+ ], PropagationMethodInfo.prototype, "description", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.OneToMany)(() => ImageInfo_1.ImageInfo, (image) => image.propagationMethod, {
37
+ cascade: true,
38
+ nullable: true,
39
+ }),
40
+ __metadata("design:type", Object)
41
+ ], PropagationMethodInfo.prototype, "images", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.OneToMany)(() => PlantTechnicalSheet_1.PlantTechnicalSheet, (sheet) => sheet.propagation),
44
+ __metadata("design:type", Array)
45
+ ], PropagationMethodInfo.prototype, "plantTechnicalSheets", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ type: "boolean", default: true }),
48
+ __metadata("design:type", Object)
49
+ ], PropagationMethodInfo.prototype, "isActive", void 0);
50
+ exports.PropagationMethodInfo = PropagationMethodInfo = __decorate([
51
+ (0, typeorm_1.Entity)("propagation_method_info")
52
+ ], PropagationMethodInfo);
@@ -0,0 +1,13 @@
1
+ import { ObjectLiteral } from 'typeorm';
2
+ import { SubstrateType } from './catalogs/substrate-info';
3
+ import { ImageInfo } from './ImageInfo';
4
+ import { PlantTechnicalSheet } from './PlantTechnicalSheet';
5
+ export declare class SubstrateInfo implements ObjectLiteral {
6
+ idSubstrateInfo: number;
7
+ type: SubstrateType;
8
+ recipe?: string;
9
+ notes?: string;
10
+ images?: ImageInfo[];
11
+ plantTechnicalSheet: PlantTechnicalSheet;
12
+ isActive: boolean;
13
+ }
@@ -0,0 +1,58 @@
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.SubstrateInfo = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const substrate_info_1 = require("./catalogs/substrate-info");
15
+ const ImageInfo_1 = require("./ImageInfo");
16
+ const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
17
+ const enumColumn_1 = require("./utils/enumColumn");
18
+ let SubstrateInfo = class SubstrateInfo {
19
+ };
20
+ exports.SubstrateInfo = SubstrateInfo;
21
+ __decorate([
22
+ (0, typeorm_1.PrimaryGeneratedColumn)('increment'),
23
+ __metadata("design:type", Number)
24
+ ], SubstrateInfo.prototype, "idSubstrateInfo", void 0);
25
+ __decorate([
26
+ (0, enumColumn_1.EnumColumn)(Object.keys(substrate_info_1.SUBSTRATE)),
27
+ __metadata("design:type", String)
28
+ ], SubstrateInfo.prototype, "type", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)('text', { nullable: true }),
31
+ __metadata("design:type", String)
32
+ ], SubstrateInfo.prototype, "recipe", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)('text', { nullable: true }),
35
+ __metadata("design:type", String)
36
+ ], SubstrateInfo.prototype, "notes", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.OneToMany)(() => ImageInfo_1.ImageInfo, (image) => image.substrateInfo, {
39
+ cascade: true,
40
+ nullable: true,
41
+ }),
42
+ __metadata("design:type", Array)
43
+ ], SubstrateInfo.prototype, "images", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.ManyToOne)(() => PlantTechnicalSheet_1.PlantTechnicalSheet, (sheet) => sheet.substrate, {
46
+ nullable: false,
47
+ onDelete: 'CASCADE',
48
+ }),
49
+ (0, typeorm_1.JoinColumn)({ name: 'plantTechnicalSheetId' }),
50
+ __metadata("design:type", PlantTechnicalSheet_1.PlantTechnicalSheet)
51
+ ], SubstrateInfo.prototype, "plantTechnicalSheet", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
54
+ __metadata("design:type", Boolean)
55
+ ], SubstrateInfo.prototype, "isActive", void 0);
56
+ exports.SubstrateInfo = SubstrateInfo = __decorate([
57
+ (0, typeorm_1.Entity)('substrate_info')
58
+ ], SubstrateInfo);
@@ -0,0 +1,11 @@
1
+ export declare const CLIMATE: {
2
+ TROPICAL: string;
3
+ SUBTROPICAL: string;
4
+ TEMPLADO: string;
5
+ MEDITERRÁNEO: string;
6
+ DESÉRTICO: string;
7
+ FRÍO_MONTANO: string;
8
+ UNIVERSAL: string;
9
+ };
10
+ export type ClimateType = keyof typeof CLIMATE;
11
+ export type TemperatureRangeC = [min: number, max: number];
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CLIMATE = void 0;
4
+ // src/models/technical-sheet/catalogs/climate-ideal.ts
5
+ const makeCatalog_1 = require("../utils/makeCatalog");
6
+ exports.CLIMATE = (0, makeCatalog_1.makeCatalog)({
7
+ TROPICAL: '18–35 °C, sin heladas.',
8
+ SUBTROPICAL: '12–30 °C, invierno suave.',
9
+ TEMPLADO: '5–28 °C, estaciones marcadas.',
10
+ MEDITERRÁNEO: 'Invierno templado, verano seco.',
11
+ DESÉRTICO: '5–45 °C, muy seco.',
12
+ FRÍO_MONTANO: '–5–20 °C, heladas frecuentes.',
13
+ UNIVERSAL: 'Amplio rango 5–35 °C.',
14
+ });
@@ -0,0 +1,34 @@
1
+ export declare const FERTILIZER_TYPE: {
2
+ ORGÁNICO: string;
3
+ MINERAL: string;
4
+ LIBERACIÓN_LENTA: string;
5
+ LÍQUIDO: string;
6
+ FOLIAR: string;
7
+ ESPECÍFICO_PARA_FLORACIÓN: string;
8
+ ESPECÍFICO_PARA_HOJAS: string;
9
+ ENRAIZANTE: string;
10
+ ABONO_COMPLETO: string;
11
+ NINGUNO: string;
12
+ };
13
+ export type FertilizerType = keyof typeof FERTILIZER_TYPE;
14
+ export declare const FERTILIZER_FREQ: {
15
+ SEMANAL: string;
16
+ CADA_15_DÍAS: string;
17
+ MENSUAL: string;
18
+ CADA_3_MESES: string;
19
+ EN_PRIMAVERA_VERANO: string;
20
+ EN_PERÍODOS_ACTIVOS: string;
21
+ OCASIONAL: string;
22
+ NINGUNA: string;
23
+ };
24
+ export type FertilizerFrequency = keyof typeof FERTILIZER_FREQ;
25
+ export declare const FERTILIZER_METHOD: {
26
+ EN_EL_RIEGO: string;
27
+ DIRECTO_EN_SUSTRATO: string;
28
+ FOLIAR: string;
29
+ GRANULADO: string;
30
+ EN_TABLETAS: string;
31
+ HIDROPONÍA: string;
32
+ NO_APLICA: string;
33
+ };
34
+ export type FertilizerMethod = keyof typeof FERTILIZER_METHOD;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FERTILIZER_METHOD = exports.FERTILIZER_FREQ = exports.FERTILIZER_TYPE = void 0;
4
+ const makeCatalog_1 = require("../utils/makeCatalog");
5
+ exports.FERTILIZER_TYPE = (0, makeCatalog_1.makeCatalog)({
6
+ ORGÁNICO: 'Humus, compost, estiércol.',
7
+ MINERAL: 'Sales NPK solubles.',
8
+ LIBERACIÓN_LENTA: 'Gránulos 3–6 meses.',
9
+ LÍQUIDO: 'Soluble para riego.',
10
+ FOLIAR: 'Aplicación foliar.',
11
+ ESPECÍFICO_PARA_FLORACIÓN: 'Alto P y K.',
12
+ ESPECÍFICO_PARA_HOJAS: 'Alto N.',
13
+ ENRAIZANTE: 'Auxinas para raíces.',
14
+ ABONO_COMPLETO: 'NPK balanceado + micro.',
15
+ NINGUNO: 'No se fertiliza regularmente.',
16
+ });
17
+ exports.FERTILIZER_FREQ = (0, makeCatalog_1.makeCatalog)({
18
+ SEMANAL: 'Cada semana.',
19
+ CADA_15_DÍAS: 'Cada 15 días.',
20
+ MENSUAL: 'Mensual.',
21
+ CADA_3_MESES: 'Trimestral.',
22
+ EN_PRIMAVERA_VERANO: 'Solo temporada activa.',
23
+ EN_PERÍODOS_ACTIVOS: 'Cuando la planta crece.',
24
+ OCASIONAL: 'Ante carencias.',
25
+ NINGUNA: 'Nunca.',
26
+ });
27
+ exports.FERTILIZER_METHOD = (0, makeCatalog_1.makeCatalog)({
28
+ EN_EL_RIEGO: 'Disuelto en riego.',
29
+ DIRECTO_EN_SUSTRATO: 'Espolvoreado en sustrato.',
30
+ FOLIAR: 'Pulverizado en hojas.',
31
+ GRANULADO: 'Gránulos superficiales.',
32
+ EN_TABLETAS: 'Tabletas enterradas.',
33
+ HIDROPONÍA: 'En solución nutritiva.',
34
+ NO_APLICA: 'No corresponde.',
35
+ });
@@ -0,0 +1,10 @@
1
+ export declare const GROWTH_CLASS: {
2
+ EFÍMERA_ANUAL: string;
3
+ HEMIANUAL_ESTACIONAL: string;
4
+ PERENNE_CRECIMIENTO_CONTINUO: string;
5
+ LEÑOSA_LENTA: string;
6
+ HERBÁCEA_MODERADA: string;
7
+ TREPADORA_RÁPIDA: string;
8
+ ESTOLONIFERA_EXPANSIVA: string;
9
+ };
10
+ export type GrowthClass = keyof typeof GROWTH_CLASS;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GROWTH_CLASS = void 0;
4
+ // src/models/technical-sheet/catalogs/growth-class.ts
5
+ const makeCatalog_1 = require("../utils/makeCatalog");
6
+ exports.GROWTH_CLASS = (0, makeCatalog_1.makeCatalog)({
7
+ EFÍMERA_ANUAL: 'Ciclo <1 año.',
8
+ HEMIANUAL_ESTACIONAL: 'Activa 1–2 estaciones/año.',
9
+ PERENNE_CRECIMIENTO_CONTINUO: 'Activa todo el año.',
10
+ LEÑOSA_LENTA: '<20 cm/año.',
11
+ HERBÁCEA_MODERADA: '30–80 cm/año.',
12
+ TREPADORA_RÁPIDA: '>1.5 m/año.',
13
+ ESTOLONIFERA_EXPANSIVA: 'Expansión horizontal veloz.',
14
+ });
@@ -0,0 +1,32 @@
1
+ export declare const GROWTH_AREA: {
2
+ INTERIOR: string;
3
+ EXTERIOR_SOMBRA: string;
4
+ EXTERIOR_MEDIA_SOMBRA: string;
5
+ EXTERIOR_SOL_DIRECTO: string;
6
+ INVERNADERO: string;
7
+ ACUÁTICA: string;
8
+ TERRARIO: string;
9
+ };
10
+ export type PlantGrowthArea = keyof typeof GROWTH_AREA;
11
+ export declare const GROWTH_HABIT: {
12
+ ERGIDA: string;
13
+ TREPADORA: string;
14
+ COLGANTE: string;
15
+ HELECHO: string;
16
+ SUCULENTA: string;
17
+ CACTUS: string;
18
+ BROMELIA: string;
19
+ ORQUÍDEA_EPÍFITA: string;
20
+ ARBUSTO: string;
21
+ COBERTORA: string;
22
+ ENREDADERA: string;
23
+ FLOR_PERENNE: string;
24
+ ÁRBOL: string;
25
+ PALMERA: string;
26
+ PASTO_ORNAMENTAL: string;
27
+ FLOTANTE: string;
28
+ EMERGENTE: string;
29
+ MUSGO: string;
30
+ MINI_HELECHO: string;
31
+ };
32
+ export type PlantGrowthHabit = keyof typeof GROWTH_HABIT;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ // src/models/technical-sheet/catalogs.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.GROWTH_HABIT = exports.GROWTH_AREA = void 0;
5
+ const makeCatalog_1 = require("../utils/makeCatalog");
6
+ exports.GROWTH_AREA = (0, makeCatalog_1.makeCatalog)({
7
+ INTERIOR: 'Dentro de edificaciones; temperatura controlada.',
8
+ EXTERIOR_SOMBRA: '<2 h de sol directo.',
9
+ EXTERIOR_MEDIA_SOMBRA: '2–4 h de sol suave.',
10
+ EXTERIOR_SOL_DIRECTO: '>6 h de sol pleno.',
11
+ INVERNADERO: 'Estructura con temp. y HR controladas.',
12
+ ACUÁTICA: 'Raíces en agua o sustrato inundado.',
13
+ TERRARIO: 'Recinto cerrado, humedad muy alta.',
14
+ });
15
+ exports.GROWTH_HABIT = (0, makeCatalog_1.makeCatalog)({
16
+ ERGIDA: 'Porte vertical.',
17
+ TREPADORA: 'Escala tutores o cuelga.',
18
+ COLGANTE: 'Tallos péndulos.',
19
+ HELECHO: 'Frondas divididas.',
20
+ SUCULENTA: 'Tejidos carnosos con agua.',
21
+ CACTUS: 'Tallo suculento con espinas.',
22
+ BROMELIA: 'Epífita de copa.',
23
+ ORQUÍDEA_EPÍFITA: 'Raíces aéreas.',
24
+ ARBUSTO: 'Leñoso <5 m.',
25
+ COBERTORA: 'Cubre el suelo.',
26
+ ENREDADERA: 'Tallo que se enrosca.',
27
+ FLOR_PERENNE: 'Herbácea plurianual.',
28
+ ÁRBOL: 'Leñoso ≥5 m.',
29
+ PALMERA: 'Tronco no ramificado.',
30
+ PASTO_ORNAMENTAL: 'Gramínea decorativa.',
31
+ FLOTANTE: 'Flota sobre el agua.',
32
+ EMERGENTE: 'Sobresale del agua.',
33
+ MUSGO: 'Briofita sin raíces.',
34
+ MINI_HELECHO: 'Helecho pequeño.',
35
+ });
@@ -0,0 +1,9 @@
1
+ export declare const HUMIDITY: {
2
+ XERICO: string;
3
+ SECO: string;
4
+ MESICO: string;
5
+ HUMEDO: string;
6
+ HUMEDO_CONSTANTE: string;
7
+ ACUATICO: string;
8
+ };
9
+ export type HumidityRequirement = keyof typeof HUMIDITY;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HUMIDITY = void 0;
4
+ const makeCatalog_1 = require("../utils/makeCatalog");
5
+ exports.HUMIDITY = (0, makeCatalog_1.makeCatalog)({
6
+ XERICO: 'Sequía extrema (<10 % HR).',
7
+ SECO: 'Riego escaso (sustrato seco).',
8
+ MESICO: 'Sustrato ligeramente húmedo.',
9
+ HUMEDO: 'HR 60–80 %; riego frecuente.',
10
+ HUMEDO_CONSTANTE: 'Sustrato siempre húmedo.',
11
+ ACUATICO: 'Raíces permanentemente sumergidas.',
12
+ });
@@ -0,0 +1,9 @@
1
+ export declare const LIGHT: {
2
+ SOMBRA_PROFUNDA: string;
3
+ SOMBRA_PARCIAL: string;
4
+ LUZ_INDIRECTA_BRILLANTE: string;
5
+ SOL_SUAVE: string;
6
+ SOL_PARCIAL: string;
7
+ SOL_PLENO: string;
8
+ };
9
+ export type LightRequirement = keyof typeof LIGHT;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LIGHT = void 0;
4
+ // src/models/technical-sheet/catalogs/light-info.ts
5
+ const makeCatalog_1 = require("../utils/makeCatalog");
6
+ exports.LIGHT = (0, makeCatalog_1.makeCatalog)({
7
+ SOMBRA_PROFUNDA: '<2 h luz directa (100–200 lux).',
8
+ SOMBRA_PARCIAL: '2–4 h luz filtrada (200–500 lux).',
9
+ LUZ_INDIRECTA_BRILLANTE: 'Junto a ventana (500–1500 lux).',
10
+ SOL_SUAVE: 'Sol suave 2–4 h.',
11
+ SOL_PARCIAL: 'Sol 4–6 h.',
12
+ SOL_PLENO: 'Sol >6 h; >30 klux.',
13
+ });
@@ -0,0 +1,32 @@
1
+ export declare const PLANT_PART: {
2
+ HOJAS: string;
3
+ TALLOS: string;
4
+ RAÍCES: string;
5
+ FLORES: string;
6
+ FRUTOS: string;
7
+ TODA_LA_PLANTA: string;
8
+ };
9
+ export type PlantPart = keyof typeof PLANT_PART;
10
+ export declare const CONTROL_METHOD: {
11
+ JABÓN_POTÁSICO: string;
12
+ ACEITE_DE_NEEM: string;
13
+ INSECTICIDA_SISTÉMICO: string;
14
+ INSECTICIDA_CONTACTO: string;
15
+ FUNGICIDA_SISTÉMICO: string;
16
+ FUNGICIDA_CONTACTO: string;
17
+ TRAMPAS: string;
18
+ PODA_SANITARIA: string;
19
+ CONTROL_BIOLÓGICO: string;
20
+ OTRO: string;
21
+ };
22
+ export type ControlMethod = keyof typeof CONTROL_METHOD;
23
+ export declare const PEST_TYPE: {
24
+ INSECTO: string;
25
+ HONGO: string;
26
+ ÁCARO: string;
27
+ BACTERIA: string;
28
+ VIRUS: string;
29
+ NEMATODO: string;
30
+ OTRO: string;
31
+ };
32
+ export type PestType = keyof typeof PEST_TYPE;