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,20 @@
1
+ import { ObjectLiteral } from "typeorm";
2
+ import { FertilizerType, FertilizerFrequency, FertilizerMethod } from "./catalogs/fertilization-info";
3
+ import { PlantTechnicalSheet } from "./PlantTechnicalSheet";
4
+ import { ImageInfo } from "./ImageInfo";
5
+ export declare class FertilizationInfo implements ObjectLiteral {
6
+ idFertilizationInfo: number;
7
+ /** Tipo de fertilizante según catálogo */
8
+ type: FertilizerType;
9
+ /** Frecuencia de aplicación según catálogo */
10
+ frequency: FertilizerFrequency;
11
+ /** Método de aplicación según catálogo */
12
+ method: FertilizerMethod;
13
+ formula?: string;
14
+ notes?: string;
15
+ /** Imágenes asociadas */
16
+ images?: ImageInfo[];
17
+ /** Ficha técnica a la que pertenece esta fertilización */
18
+ plant: PlantTechnicalSheet;
19
+ isActive: boolean;
20
+ }
@@ -0,0 +1,64 @@
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.FertilizationInfo = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const fertilization_info_1 = require("./catalogs/fertilization-info");
15
+ const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
16
+ const ImageInfo_1 = require("./ImageInfo");
17
+ const enumColumn_1 = require("./utils/enumColumn");
18
+ let FertilizationInfo = class FertilizationInfo {
19
+ };
20
+ exports.FertilizationInfo = FertilizationInfo;
21
+ __decorate([
22
+ (0, typeorm_1.PrimaryGeneratedColumn)("increment"),
23
+ __metadata("design:type", Number)
24
+ ], FertilizationInfo.prototype, "idFertilizationInfo", void 0);
25
+ __decorate([
26
+ (0, enumColumn_1.EnumColumn)(Object.keys(fertilization_info_1.FERTILIZER_TYPE)),
27
+ __metadata("design:type", String)
28
+ ], FertilizationInfo.prototype, "type", void 0);
29
+ __decorate([
30
+ (0, enumColumn_1.EnumColumn)(Object.keys(fertilization_info_1.FERTILIZER_FREQ)),
31
+ __metadata("design:type", String)
32
+ ], FertilizationInfo.prototype, "frequency", void 0);
33
+ __decorate([
34
+ (0, enumColumn_1.EnumColumn)(Object.keys(fertilization_info_1.FERTILIZER_METHOD)),
35
+ __metadata("design:type", String)
36
+ ], FertilizationInfo.prototype, "method", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)("text", { nullable: true }),
39
+ __metadata("design:type", String)
40
+ ], FertilizationInfo.prototype, "formula", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)("text", { nullable: true }),
43
+ __metadata("design:type", String)
44
+ ], FertilizationInfo.prototype, "notes", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.OneToMany)(() => ImageInfo_1.ImageInfo, (image) => image.fertilizationInfo, {
47
+ cascade: true,
48
+ }),
49
+ __metadata("design:type", Array)
50
+ ], FertilizationInfo.prototype, "images", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.ManyToOne)(() => PlantTechnicalSheet_1.PlantTechnicalSheet, (sheet) => sheet.fertilization, {
53
+ nullable: false,
54
+ onDelete: "CASCADE",
55
+ }),
56
+ __metadata("design:type", PlantTechnicalSheet_1.PlantTechnicalSheet)
57
+ ], FertilizationInfo.prototype, "plant", void 0);
58
+ __decorate([
59
+ (0, typeorm_1.Column)({ type: "boolean", default: true }),
60
+ __metadata("design:type", Boolean)
61
+ ], FertilizationInfo.prototype, "isActive", void 0);
62
+ exports.FertilizationInfo = FertilizationInfo = __decorate([
63
+ (0, typeorm_1.Entity)("fertilization_info")
64
+ ], FertilizationInfo);
@@ -0,0 +1,15 @@
1
+ import { ObjectLiteral } from 'typeorm';
2
+ import { GrowthClass } from './catalogs/growth-class';
3
+ import { PlantTechnicalSheet } from './PlantTechnicalSheet';
4
+ import { ImageInfo } from './ImageInfo';
5
+ export declare class GrowthClassInfo implements ObjectLiteral {
6
+ idGrowthClassInfo: number;
7
+ /** Clase de crecimiento (catálogo) */
8
+ type: GrowthClass;
9
+ description?: string;
10
+ /** Imágenes asociadas */
11
+ images?: ImageInfo[];
12
+ /** Fichas técnicas asociadas */
13
+ sheets: PlantTechnicalSheet[];
14
+ isActive: boolean;
15
+ }
@@ -0,0 +1,49 @@
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.GrowthClassInfo = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const growth_class_1 = require("./catalogs/growth-class");
15
+ const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
16
+ const ImageInfo_1 = require("./ImageInfo");
17
+ const enumColumn_1 = require("./utils/enumColumn");
18
+ let GrowthClassInfo = class GrowthClassInfo {
19
+ };
20
+ exports.GrowthClassInfo = GrowthClassInfo;
21
+ __decorate([
22
+ (0, typeorm_1.PrimaryGeneratedColumn)('increment'),
23
+ __metadata("design:type", Number)
24
+ ], GrowthClassInfo.prototype, "idGrowthClassInfo", void 0);
25
+ __decorate([
26
+ (0, enumColumn_1.EnumColumn)(Object.keys(growth_class_1.GROWTH_CLASS)),
27
+ __metadata("design:type", String)
28
+ ], GrowthClassInfo.prototype, "type", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)('text', { nullable: true }),
31
+ __metadata("design:type", String)
32
+ ], GrowthClassInfo.prototype, "description", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.OneToMany)(() => ImageInfo_1.ImageInfo, (image) => image.growthClassInfo, {
35
+ cascade: true,
36
+ }),
37
+ __metadata("design:type", Array)
38
+ ], GrowthClassInfo.prototype, "images", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.OneToMany)(() => PlantTechnicalSheet_1.PlantTechnicalSheet, (sheet) => sheet.growthClass),
41
+ __metadata("design:type", Array)
42
+ ], GrowthClassInfo.prototype, "sheets", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
45
+ __metadata("design:type", Boolean)
46
+ ], GrowthClassInfo.prototype, "isActive", void 0);
47
+ exports.GrowthClassInfo = GrowthClassInfo = __decorate([
48
+ (0, typeorm_1.Entity)('growth_class_info')
49
+ ], GrowthClassInfo);
@@ -0,0 +1,10 @@
1
+ import { ObjectLiteral } from 'typeorm';
2
+ import { HumidityRequirement } from './catalogs/humidity-info';
3
+ import { ImageInfo } from './ImageInfo';
4
+ export declare class HumidityInfo implements ObjectLiteral {
5
+ idHumidityInfo: number;
6
+ type: HumidityRequirement;
7
+ description?: string;
8
+ images?: ImageInfo[];
9
+ isActive: boolean;
10
+ }
@@ -0,0 +1,44 @@
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.HumidityInfo = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const humidity_info_1 = require("./catalogs/humidity-info");
15
+ const ImageInfo_1 = require("./ImageInfo");
16
+ const enumColumn_1 = require("./utils/enumColumn");
17
+ let HumidityInfo = class HumidityInfo {
18
+ };
19
+ exports.HumidityInfo = HumidityInfo;
20
+ __decorate([
21
+ (0, typeorm_1.PrimaryGeneratedColumn)('increment'),
22
+ __metadata("design:type", Number)
23
+ ], HumidityInfo.prototype, "idHumidityInfo", void 0);
24
+ __decorate([
25
+ (0, enumColumn_1.EnumColumn)(Object.keys(humidity_info_1.HUMIDITY)),
26
+ __metadata("design:type", String)
27
+ ], HumidityInfo.prototype, "type", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)('text', { nullable: true }),
30
+ __metadata("design:type", String)
31
+ ], HumidityInfo.prototype, "description", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.OneToMany)(() => ImageInfo_1.ImageInfo, (image) => image.humidityInfo, {
34
+ cascade: true,
35
+ }),
36
+ __metadata("design:type", Array)
37
+ ], HumidityInfo.prototype, "images", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
40
+ __metadata("design:type", Boolean)
41
+ ], HumidityInfo.prototype, "isActive", void 0);
42
+ exports.HumidityInfo = HumidityInfo = __decorate([
43
+ (0, typeorm_1.Entity)('humidity_info')
44
+ ], HumidityInfo);
@@ -0,0 +1,29 @@
1
+ import { ObjectLiteral } from "typeorm";
2
+ import { PlantTechnicalSheet } from "./PlantTechnicalSheet";
3
+ import { PlantGrowthType } from "./PlantGrowthType";
4
+ import { LightInfo } from "./LightInfo";
5
+ import { HumidityInfo } from "./HumidityInfo";
6
+ import { ClimateIdeal } from "./ClimateIdeal";
7
+ import { SubstrateInfo } from "./SubstrateInfo";
8
+ import { FertilizationInfo } from "./FertilizationInfo";
9
+ import { PestInfo } from "./PestInfo";
10
+ import { PropagationMethodInfo } from "./PropagationMethodInfo";
11
+ import { PlantSize } from "./PlantSize";
12
+ import { GrowthClassInfo } from "./GrowthClassInfo";
13
+ export declare class ImageInfo implements ObjectLiteral {
14
+ idImage: number;
15
+ url: string;
16
+ description?: string;
17
+ isActive: boolean;
18
+ plantTechnicalSheet?: PlantTechnicalSheet;
19
+ plantGrowthType?: PlantGrowthType;
20
+ lightInfo?: LightInfo;
21
+ humidityInfo?: HumidityInfo;
22
+ climateIdeal?: ClimateIdeal;
23
+ substrateInfo?: SubstrateInfo;
24
+ fertilizationInfo?: FertilizationInfo;
25
+ pest?: PestInfo;
26
+ propagationMethod?: PropagationMethodInfo;
27
+ plantSize?: PlantSize;
28
+ growthClassInfo?: GrowthClassInfo;
29
+ }
@@ -0,0 +1,134 @@
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.ImageInfo = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
15
+ const PlantGrowthType_1 = require("./PlantGrowthType");
16
+ const LightInfo_1 = require("./LightInfo");
17
+ const HumidityInfo_1 = require("./HumidityInfo");
18
+ const ClimateIdeal_1 = require("./ClimateIdeal");
19
+ const SubstrateInfo_1 = require("./SubstrateInfo");
20
+ const FertilizationInfo_1 = require("./FertilizationInfo");
21
+ const PestInfo_1 = require("./PestInfo");
22
+ const PropagationMethodInfo_1 = require("./PropagationMethodInfo");
23
+ const PlantSize_1 = require("./PlantSize");
24
+ const GrowthClassInfo_1 = require("./GrowthClassInfo");
25
+ let ImageInfo = class ImageInfo {
26
+ };
27
+ exports.ImageInfo = ImageInfo;
28
+ __decorate([
29
+ (0, typeorm_1.PrimaryGeneratedColumn)("increment"),
30
+ __metadata("design:type", Number)
31
+ ], ImageInfo.prototype, "idImage", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)("varchar", { length: 500 }),
34
+ __metadata("design:type", String)
35
+ ], ImageInfo.prototype, "url", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)("text", { nullable: true }),
38
+ __metadata("design:type", String)
39
+ ], ImageInfo.prototype, "description", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: "boolean", default: true }),
42
+ __metadata("design:type", Boolean)
43
+ ], ImageInfo.prototype, "isActive", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.ManyToOne)(() => PlantTechnicalSheet_1.PlantTechnicalSheet, (sheet) => sheet.images, {
46
+ nullable: true,
47
+ onDelete: "CASCADE",
48
+ }),
49
+ (0, typeorm_1.JoinColumn)({ name: "plantTechnicalSheetId" }),
50
+ __metadata("design:type", PlantTechnicalSheet_1.PlantTechnicalSheet)
51
+ ], ImageInfo.prototype, "plantTechnicalSheet", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.ManyToOne)(() => PlantGrowthType_1.PlantGrowthType, (growthType) => growthType.images, {
54
+ nullable: true,
55
+ onDelete: "CASCADE",
56
+ }),
57
+ (0, typeorm_1.JoinColumn)({ name: "plantGrowthTypeId" }),
58
+ __metadata("design:type", PlantGrowthType_1.PlantGrowthType)
59
+ ], ImageInfo.prototype, "plantGrowthType", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.ManyToOne)(() => LightInfo_1.LightInfo, (lightInfo) => lightInfo.images, {
62
+ nullable: true,
63
+ onDelete: "CASCADE",
64
+ }),
65
+ (0, typeorm_1.JoinColumn)({ name: "lightInfoId" }),
66
+ __metadata("design:type", LightInfo_1.LightInfo)
67
+ ], ImageInfo.prototype, "lightInfo", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.ManyToOne)(() => HumidityInfo_1.HumidityInfo, (humidityInfo) => humidityInfo.images, {
70
+ nullable: true,
71
+ onDelete: "CASCADE",
72
+ }),
73
+ (0, typeorm_1.JoinColumn)({ name: "humidityInfoId" }),
74
+ __metadata("design:type", HumidityInfo_1.HumidityInfo)
75
+ ], ImageInfo.prototype, "humidityInfo", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.ManyToOne)(() => ClimateIdeal_1.ClimateIdeal, (climate) => climate.images, {
78
+ nullable: true,
79
+ onDelete: "CASCADE",
80
+ }),
81
+ (0, typeorm_1.JoinColumn)({ name: "climateIdealId" }),
82
+ __metadata("design:type", ClimateIdeal_1.ClimateIdeal)
83
+ ], ImageInfo.prototype, "climateIdeal", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.ManyToOne)(() => SubstrateInfo_1.SubstrateInfo, (substrate) => substrate.images, {
86
+ nullable: true,
87
+ onDelete: "CASCADE",
88
+ }),
89
+ (0, typeorm_1.JoinColumn)({ name: "substrateInfoId" }),
90
+ __metadata("design:type", SubstrateInfo_1.SubstrateInfo)
91
+ ], ImageInfo.prototype, "substrateInfo", void 0);
92
+ __decorate([
93
+ (0, typeorm_1.ManyToOne)(() => FertilizationInfo_1.FertilizationInfo, (f) => f.images, {
94
+ nullable: true,
95
+ onDelete: "CASCADE",
96
+ }),
97
+ (0, typeorm_1.JoinColumn)({ name: "fertilizationInfoId" }),
98
+ __metadata("design:type", FertilizationInfo_1.FertilizationInfo)
99
+ ], ImageInfo.prototype, "fertilizationInfo", void 0);
100
+ __decorate([
101
+ (0, typeorm_1.ManyToOne)(() => PestInfo_1.PestInfo, (pest) => pest.images, {
102
+ nullable: true,
103
+ onDelete: "CASCADE",
104
+ }),
105
+ (0, typeorm_1.JoinColumn)({ name: "pestId" }),
106
+ __metadata("design:type", PestInfo_1.PestInfo)
107
+ ], ImageInfo.prototype, "pest", void 0);
108
+ __decorate([
109
+ (0, typeorm_1.ManyToOne)(() => PropagationMethodInfo_1.PropagationMethodInfo, (info) => info.images, {
110
+ nullable: true,
111
+ onDelete: "CASCADE",
112
+ }),
113
+ (0, typeorm_1.JoinColumn)({ name: "propagationMethodId" }),
114
+ __metadata("design:type", PropagationMethodInfo_1.PropagationMethodInfo)
115
+ ], ImageInfo.prototype, "propagationMethod", void 0);
116
+ __decorate([
117
+ (0, typeorm_1.ManyToOne)(() => PlantSize_1.PlantSize, (size) => size.images, {
118
+ nullable: true,
119
+ onDelete: "CASCADE",
120
+ }),
121
+ (0, typeorm_1.JoinColumn)({ name: "plantSizeId" }),
122
+ __metadata("design:type", PlantSize_1.PlantSize)
123
+ ], ImageInfo.prototype, "plantSize", void 0);
124
+ __decorate([
125
+ (0, typeorm_1.ManyToOne)(() => GrowthClassInfo_1.GrowthClassInfo, (growthClass) => growthClass.images, {
126
+ nullable: true,
127
+ onDelete: "CASCADE",
128
+ }),
129
+ (0, typeorm_1.JoinColumn)({ name: "growthClassInfoId" }),
130
+ __metadata("design:type", GrowthClassInfo_1.GrowthClassInfo)
131
+ ], ImageInfo.prototype, "growthClassInfo", void 0);
132
+ exports.ImageInfo = ImageInfo = __decorate([
133
+ (0, typeorm_1.Entity)("technical_sheet_images")
134
+ ], ImageInfo);
@@ -0,0 +1,10 @@
1
+ import { ObjectLiteral } from 'typeorm';
2
+ import { LightRequirement } from './catalogs/light-info';
3
+ import { ImageInfo } from './ImageInfo';
4
+ export declare class LightInfo implements ObjectLiteral {
5
+ idLightInfo: number;
6
+ type: LightRequirement;
7
+ description?: string;
8
+ images?: ImageInfo[];
9
+ isActive: boolean;
10
+ }
@@ -0,0 +1,44 @@
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.LightInfo = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const light_info_1 = require("./catalogs/light-info");
15
+ const ImageInfo_1 = require("./ImageInfo");
16
+ const enumColumn_1 = require("./utils/enumColumn");
17
+ let LightInfo = class LightInfo {
18
+ };
19
+ exports.LightInfo = LightInfo;
20
+ __decorate([
21
+ (0, typeorm_1.PrimaryGeneratedColumn)('increment'),
22
+ __metadata("design:type", Number)
23
+ ], LightInfo.prototype, "idLightInfo", void 0);
24
+ __decorate([
25
+ (0, enumColumn_1.EnumColumn)(Object.keys(light_info_1.LIGHT)),
26
+ __metadata("design:type", String)
27
+ ], LightInfo.prototype, "type", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)('text', { nullable: true }),
30
+ __metadata("design:type", String)
31
+ ], LightInfo.prototype, "description", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.OneToMany)(() => ImageInfo_1.ImageInfo, (image) => image.lightInfo, {
34
+ cascade: true,
35
+ }),
36
+ __metadata("design:type", Array)
37
+ ], LightInfo.prototype, "images", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
40
+ __metadata("design:type", Boolean)
41
+ ], LightInfo.prototype, "isActive", void 0);
42
+ exports.LightInfo = LightInfo = __decorate([
43
+ (0, typeorm_1.Entity)('light_info')
44
+ ], LightInfo);
@@ -0,0 +1,18 @@
1
+ import { ObjectLiteral } from 'typeorm';
2
+ import { PlantTechnicalSheet } from './PlantTechnicalSheet';
3
+ import { ImageInfo } from './ImageInfo';
4
+ import { PestType, PlantPart, ControlMethod } from './catalogs/pest-info';
5
+ export declare class PestInfo implements ObjectLiteral {
6
+ idPestInfo: number;
7
+ commonName: string;
8
+ scientificName?: string;
9
+ type: PestType;
10
+ affectedParts: PlantPart;
11
+ symptoms: string;
12
+ appearanceConditions?: string;
13
+ controlMethod: ControlMethod;
14
+ controlNotes?: string;
15
+ technicalSheet: PlantTechnicalSheet;
16
+ images?: ImageInfo[];
17
+ isActive: boolean;
18
+ }
@@ -0,0 +1,76 @@
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.PestInfo = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
15
+ const ImageInfo_1 = require("./ImageInfo");
16
+ const pest_info_1 = require("./catalogs/pest-info");
17
+ const enumColumn_1 = require("./utils/enumColumn");
18
+ let PestInfo = class PestInfo {
19
+ };
20
+ exports.PestInfo = PestInfo;
21
+ __decorate([
22
+ (0, typeorm_1.PrimaryGeneratedColumn)('increment'),
23
+ __metadata("design:type", Number)
24
+ ], PestInfo.prototype, "idPestInfo", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)('varchar', { length: 255 }),
27
+ __metadata("design:type", String)
28
+ ], PestInfo.prototype, "commonName", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)('varchar', { nullable: true, length: 255 }),
31
+ __metadata("design:type", String)
32
+ ], PestInfo.prototype, "scientificName", void 0);
33
+ __decorate([
34
+ (0, enumColumn_1.EnumColumn)(Object.keys(pest_info_1.PEST_TYPE)),
35
+ __metadata("design:type", String)
36
+ ], PestInfo.prototype, "type", void 0);
37
+ __decorate([
38
+ (0, enumColumn_1.EnumColumn)(Object.keys(pest_info_1.PLANT_PART)),
39
+ __metadata("design:type", String)
40
+ ], PestInfo.prototype, "affectedParts", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)('text'),
43
+ __metadata("design:type", String)
44
+ ], PestInfo.prototype, "symptoms", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)('text', { nullable: true }),
47
+ __metadata("design:type", String)
48
+ ], PestInfo.prototype, "appearanceConditions", void 0);
49
+ __decorate([
50
+ (0, enumColumn_1.EnumColumn)(Object.keys(pest_info_1.CONTROL_METHOD)),
51
+ __metadata("design:type", String)
52
+ ], PestInfo.prototype, "controlMethod", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)('text', { nullable: true }),
55
+ __metadata("design:type", String)
56
+ ], PestInfo.prototype, "controlNotes", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.ManyToOne)(() => PlantTechnicalSheet_1.PlantTechnicalSheet, (sheet) => sheet.pests, {
59
+ onDelete: 'CASCADE',
60
+ }),
61
+ (0, typeorm_1.JoinColumn)({ name: 'technicalSheetId' }),
62
+ __metadata("design:type", PlantTechnicalSheet_1.PlantTechnicalSheet)
63
+ ], PestInfo.prototype, "technicalSheet", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.OneToMany)(() => ImageInfo_1.ImageInfo, (image) => image.pest, {
66
+ cascade: true,
67
+ }),
68
+ __metadata("design:type", Array)
69
+ ], PestInfo.prototype, "images", void 0);
70
+ __decorate([
71
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
72
+ __metadata("design:type", Boolean)
73
+ ], PestInfo.prototype, "isActive", void 0);
74
+ exports.PestInfo = PestInfo = __decorate([
75
+ (0, typeorm_1.Entity)('pests')
76
+ ], PestInfo);
@@ -0,0 +1,15 @@
1
+ import { ObjectLiteral } from 'typeorm';
2
+ import { GROWTH_AREA, GROWTH_HABIT } from './catalogs/growth-type';
3
+ import { PlantTechnicalSheet } from './PlantTechnicalSheet';
4
+ import { ImageInfo } from './ImageInfo';
5
+ export type PlantGrowthArea = keyof typeof GROWTH_AREA;
6
+ export type PlantGrowthHabit = keyof typeof GROWTH_HABIT;
7
+ export declare class PlantGrowthType implements ObjectLiteral {
8
+ idPlantGrowthType: number;
9
+ area: PlantGrowthArea;
10
+ habit: PlantGrowthHabit;
11
+ description?: string;
12
+ images?: ImageInfo[];
13
+ sheets: PlantTechnicalSheet[];
14
+ isActive: boolean;
15
+ }
@@ -0,0 +1,53 @@
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.PlantGrowthType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const enumColumn_1 = require("./utils/enumColumn");
15
+ const growth_type_1 = require("./catalogs/growth-type");
16
+ const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
17
+ const ImageInfo_1 = require("./ImageInfo");
18
+ let PlantGrowthType = class PlantGrowthType {
19
+ };
20
+ exports.PlantGrowthType = PlantGrowthType;
21
+ __decorate([
22
+ (0, typeorm_1.PrimaryGeneratedColumn)('increment'),
23
+ __metadata("design:type", Number)
24
+ ], PlantGrowthType.prototype, "idPlantGrowthType", void 0);
25
+ __decorate([
26
+ (0, enumColumn_1.EnumColumn)(Object.keys(growth_type_1.GROWTH_AREA)),
27
+ __metadata("design:type", String)
28
+ ], PlantGrowthType.prototype, "area", void 0);
29
+ __decorate([
30
+ (0, enumColumn_1.EnumColumn)(Object.keys(growth_type_1.GROWTH_HABIT)),
31
+ __metadata("design:type", String)
32
+ ], PlantGrowthType.prototype, "habit", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)('text', { nullable: true }),
35
+ __metadata("design:type", String)
36
+ ], PlantGrowthType.prototype, "description", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.OneToMany)(() => ImageInfo_1.ImageInfo, (image) => image.plantGrowthType, {
39
+ cascade: true,
40
+ }),
41
+ __metadata("design:type", Array)
42
+ ], PlantGrowthType.prototype, "images", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.OneToMany)(() => PlantTechnicalSheet_1.PlantTechnicalSheet, (sheet) => sheet.plantType),
45
+ __metadata("design:type", Array)
46
+ ], PlantGrowthType.prototype, "sheets", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
49
+ __metadata("design:type", Boolean)
50
+ ], PlantGrowthType.prototype, "isActive", void 0);
51
+ exports.PlantGrowthType = PlantGrowthType = __decorate([
52
+ (0, typeorm_1.Entity)('plant_growth_types')
53
+ ], PlantGrowthType);
@@ -0,0 +1,14 @@
1
+ import { ObjectLiteral } from 'typeorm';
2
+ import { GrowthHabit } from './catalogs/plant-size';
3
+ import { PlantTechnicalSheet } from './PlantTechnicalSheet';
4
+ import { ImageInfo } from './ImageInfo';
5
+ export declare class PlantSize implements ObjectLiteral {
6
+ idPlantSize: number;
7
+ heightCm: number;
8
+ widthCm?: number | null;
9
+ habit?: GrowthHabit | undefined;
10
+ notes?: string | null;
11
+ images?: ImageInfo[] | undefined;
12
+ plantTechnicalSheet: PlantTechnicalSheet;
13
+ isActive: boolean;
14
+ }