proflores-db-model 0.2.0 → 0.2.1
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/models/technical-sheet/CareInstructions.d.ts +0 -3
- package/dist/models/technical-sheet/CareInstructions.js +0 -8
- package/dist/models/technical-sheet/ClimateIdeal.js +1 -3
- package/dist/models/technical-sheet/FertilizationInfo.d.ts +0 -3
- package/dist/models/technical-sheet/FertilizationInfo.js +1 -11
- package/dist/models/technical-sheet/GrowthClassInfo.d.ts +0 -3
- package/dist/models/technical-sheet/GrowthClassInfo.js +0 -5
- package/dist/models/technical-sheet/ImageInfo.js +0 -10
- package/dist/models/technical-sheet/PlantGrowthType.d.ts +0 -2
- package/dist/models/technical-sheet/PlantGrowthType.js +0 -5
- package/dist/models/technical-sheet/PlantSize.d.ts +0 -2
- package/dist/models/technical-sheet/PlantSize.js +0 -9
- package/dist/models/technical-sheet/PropagationMethodInfo.d.ts +0 -2
- package/dist/models/technical-sheet/PropagationMethodInfo.js +0 -5
- package/dist/models/technical-sheet/SubstrateInfo.d.ts +0 -2
- package/dist/models/technical-sheet/SubstrateInfo.js +0 -9
- package/package.json +1 -1
- package/src/models/technical-sheet/CareInstructions.ts +0 -7
- package/src/models/technical-sheet/ClimateIdeal.ts +1 -3
- package/src/models/technical-sheet/FertilizationInfo.ts +1 -10
- package/src/models/technical-sheet/GrowthClassInfo.ts +0 -3
- package/src/models/technical-sheet/ImageInfo.ts +1 -10
- package/src/models/technical-sheet/PlantGrowthType.ts +0 -3
- package/src/models/technical-sheet/PlantSize.ts +0 -7
- package/src/models/technical-sheet/PropagationMethodInfo.ts +0 -4
- package/src/models/technical-sheet/SubstrateInfo.ts +1 -10
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ObjectLiteral } from 'typeorm';
|
|
2
|
-
import { PlantTechnicalSheet } from './PlantTechnicalSheet';
|
|
3
2
|
export declare class CareInstructions implements ObjectLiteral {
|
|
4
3
|
idCareInstructions: number;
|
|
5
4
|
light: string;
|
|
@@ -10,7 +9,5 @@ export declare class CareInstructions implements ObjectLiteral {
|
|
|
10
9
|
fertilization: string;
|
|
11
10
|
pruning: string;
|
|
12
11
|
notes?: string;
|
|
13
|
-
/** Relación inversa con la ficha técnica */
|
|
14
|
-
plantTechnicalSheet?: PlantTechnicalSheet;
|
|
15
12
|
isActive: boolean;
|
|
16
13
|
}
|
|
@@ -12,7 +12,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.CareInstructions = void 0;
|
|
14
14
|
const typeorm_1 = require("typeorm");
|
|
15
|
-
const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
|
|
16
15
|
let CareInstructions = class CareInstructions {
|
|
17
16
|
};
|
|
18
17
|
exports.CareInstructions = CareInstructions;
|
|
@@ -52,13 +51,6 @@ __decorate([
|
|
|
52
51
|
(0, typeorm_1.Column)('text', { nullable: true }),
|
|
53
52
|
__metadata("design:type", String)
|
|
54
53
|
], CareInstructions.prototype, "notes", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, typeorm_1.OneToOne)(() => PlantTechnicalSheet_1.PlantTechnicalSheet, (sheet) => sheet.care, {
|
|
57
|
-
onDelete: 'CASCADE',
|
|
58
|
-
}),
|
|
59
|
-
(0, typeorm_1.JoinColumn)({ name: 'plantTechnicalSheetId' }),
|
|
60
|
-
__metadata("design:type", PlantTechnicalSheet_1.PlantTechnicalSheet)
|
|
61
|
-
], CareInstructions.prototype, "plantTechnicalSheet", void 0);
|
|
62
54
|
__decorate([
|
|
63
55
|
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
64
56
|
__metadata("design:type", Boolean)
|
|
@@ -34,9 +34,7 @@ __decorate([
|
|
|
34
34
|
__metadata("design:type", Array)
|
|
35
35
|
], ClimateIdeal.prototype, "temperatureRangeC", void 0);
|
|
36
36
|
__decorate([
|
|
37
|
-
(0, typeorm_1.OneToMany)(() => ImageInfo_1.ImageInfo, (image) => image.climateIdeal,
|
|
38
|
-
cascade: true,
|
|
39
|
-
}),
|
|
37
|
+
(0, typeorm_1.OneToMany)(() => ImageInfo_1.ImageInfo, (image) => image.climateIdeal),
|
|
40
38
|
__metadata("design:type", Array)
|
|
41
39
|
], ClimateIdeal.prototype, "images", void 0);
|
|
42
40
|
__decorate([
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ObjectLiteral } from "typeorm";
|
|
2
2
|
import { FertilizerType, FertilizerFrequency, FertilizerMethod } from "./catalogs/fertilization-info";
|
|
3
|
-
import { PlantTechnicalSheet } from "./PlantTechnicalSheet";
|
|
4
3
|
import { ImageInfo } from "./ImageInfo";
|
|
5
4
|
export declare class FertilizationInfo implements ObjectLiteral {
|
|
6
5
|
idFertilizationInfo: number;
|
|
@@ -14,7 +13,5 @@ export declare class FertilizationInfo implements ObjectLiteral {
|
|
|
14
13
|
notes?: string;
|
|
15
14
|
/** Imágenes asociadas */
|
|
16
15
|
images?: ImageInfo[];
|
|
17
|
-
/** Ficha técnica a la que pertenece esta fertilización */
|
|
18
|
-
plant: PlantTechnicalSheet;
|
|
19
16
|
isActive: boolean;
|
|
20
17
|
}
|
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.FertilizationInfo = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const fertilization_info_1 = require("./catalogs/fertilization-info");
|
|
15
|
-
const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
|
|
16
15
|
const ImageInfo_1 = require("./ImageInfo");
|
|
17
16
|
const enumColumn_1 = require("./utils/enumColumn");
|
|
18
17
|
let FertilizationInfo = class FertilizationInfo {
|
|
@@ -43,18 +42,9 @@ __decorate([
|
|
|
43
42
|
__metadata("design:type", String)
|
|
44
43
|
], FertilizationInfo.prototype, "notes", void 0);
|
|
45
44
|
__decorate([
|
|
46
|
-
(0, typeorm_1.OneToMany)(() => ImageInfo_1.ImageInfo, (image) => image.fertilizationInfo,
|
|
47
|
-
cascade: true,
|
|
48
|
-
}),
|
|
45
|
+
(0, typeorm_1.OneToMany)(() => ImageInfo_1.ImageInfo, (image) => image.fertilizationInfo),
|
|
49
46
|
__metadata("design:type", Array)
|
|
50
47
|
], 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
48
|
__decorate([
|
|
59
49
|
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
60
50
|
__metadata("design:type", Boolean)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ObjectLiteral } from 'typeorm';
|
|
2
2
|
import { GrowthClass } from './catalogs/growth-class';
|
|
3
|
-
import { PlantTechnicalSheet } from './PlantTechnicalSheet';
|
|
4
3
|
import { ImageInfo } from './ImageInfo';
|
|
5
4
|
export declare class GrowthClassInfo implements ObjectLiteral {
|
|
6
5
|
idGrowthClassInfo: number;
|
|
@@ -9,7 +8,5 @@ export declare class GrowthClassInfo implements ObjectLiteral {
|
|
|
9
8
|
description?: string;
|
|
10
9
|
/** Imágenes asociadas */
|
|
11
10
|
images?: ImageInfo[];
|
|
12
|
-
/** Fichas técnicas asociadas */
|
|
13
|
-
sheets: PlantTechnicalSheet[];
|
|
14
11
|
isActive: boolean;
|
|
15
12
|
}
|
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.GrowthClassInfo = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const growth_class_1 = require("./catalogs/growth-class");
|
|
15
|
-
const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
|
|
16
15
|
const ImageInfo_1 = require("./ImageInfo");
|
|
17
16
|
const enumColumn_1 = require("./utils/enumColumn");
|
|
18
17
|
let GrowthClassInfo = class GrowthClassInfo {
|
|
@@ -36,10 +35,6 @@ __decorate([
|
|
|
36
35
|
}),
|
|
37
36
|
__metadata("design:type", Array)
|
|
38
37
|
], 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
38
|
__decorate([
|
|
44
39
|
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
45
40
|
__metadata("design:type", Boolean)
|
|
@@ -52,7 +52,6 @@ __decorate([
|
|
|
52
52
|
__decorate([
|
|
53
53
|
(0, typeorm_1.ManyToOne)(() => PlantGrowthType_1.PlantGrowthType, (growthType) => growthType.images, {
|
|
54
54
|
nullable: true,
|
|
55
|
-
onDelete: "CASCADE",
|
|
56
55
|
}),
|
|
57
56
|
(0, typeorm_1.JoinColumn)({ name: "plantGrowthTypeId" }),
|
|
58
57
|
__metadata("design:type", PlantGrowthType_1.PlantGrowthType)
|
|
@@ -60,7 +59,6 @@ __decorate([
|
|
|
60
59
|
__decorate([
|
|
61
60
|
(0, typeorm_1.ManyToOne)(() => LightInfo_1.LightInfo, (lightInfo) => lightInfo.images, {
|
|
62
61
|
nullable: true,
|
|
63
|
-
onDelete: "CASCADE",
|
|
64
62
|
}),
|
|
65
63
|
(0, typeorm_1.JoinColumn)({ name: "lightInfoId" }),
|
|
66
64
|
__metadata("design:type", LightInfo_1.LightInfo)
|
|
@@ -68,7 +66,6 @@ __decorate([
|
|
|
68
66
|
__decorate([
|
|
69
67
|
(0, typeorm_1.ManyToOne)(() => HumidityInfo_1.HumidityInfo, (humidityInfo) => humidityInfo.images, {
|
|
70
68
|
nullable: true,
|
|
71
|
-
onDelete: "CASCADE",
|
|
72
69
|
}),
|
|
73
70
|
(0, typeorm_1.JoinColumn)({ name: "humidityInfoId" }),
|
|
74
71
|
__metadata("design:type", HumidityInfo_1.HumidityInfo)
|
|
@@ -76,7 +73,6 @@ __decorate([
|
|
|
76
73
|
__decorate([
|
|
77
74
|
(0, typeorm_1.ManyToOne)(() => ClimateIdeal_1.ClimateIdeal, (climate) => climate.images, {
|
|
78
75
|
nullable: true,
|
|
79
|
-
onDelete: "CASCADE",
|
|
80
76
|
}),
|
|
81
77
|
(0, typeorm_1.JoinColumn)({ name: "climateIdealId" }),
|
|
82
78
|
__metadata("design:type", ClimateIdeal_1.ClimateIdeal)
|
|
@@ -84,7 +80,6 @@ __decorate([
|
|
|
84
80
|
__decorate([
|
|
85
81
|
(0, typeorm_1.ManyToOne)(() => SubstrateInfo_1.SubstrateInfo, (substrate) => substrate.images, {
|
|
86
82
|
nullable: true,
|
|
87
|
-
onDelete: "CASCADE",
|
|
88
83
|
}),
|
|
89
84
|
(0, typeorm_1.JoinColumn)({ name: "substrateInfoId" }),
|
|
90
85
|
__metadata("design:type", SubstrateInfo_1.SubstrateInfo)
|
|
@@ -92,7 +87,6 @@ __decorate([
|
|
|
92
87
|
__decorate([
|
|
93
88
|
(0, typeorm_1.ManyToOne)(() => FertilizationInfo_1.FertilizationInfo, (f) => f.images, {
|
|
94
89
|
nullable: true,
|
|
95
|
-
onDelete: "CASCADE",
|
|
96
90
|
}),
|
|
97
91
|
(0, typeorm_1.JoinColumn)({ name: "fertilizationInfoId" }),
|
|
98
92
|
__metadata("design:type", FertilizationInfo_1.FertilizationInfo)
|
|
@@ -100,7 +94,6 @@ __decorate([
|
|
|
100
94
|
__decorate([
|
|
101
95
|
(0, typeorm_1.ManyToOne)(() => PestInfo_1.PestInfo, (pest) => pest.images, {
|
|
102
96
|
nullable: true,
|
|
103
|
-
onDelete: "CASCADE",
|
|
104
97
|
}),
|
|
105
98
|
(0, typeorm_1.JoinColumn)({ name: "pestId" }),
|
|
106
99
|
__metadata("design:type", PestInfo_1.PestInfo)
|
|
@@ -108,7 +101,6 @@ __decorate([
|
|
|
108
101
|
__decorate([
|
|
109
102
|
(0, typeorm_1.ManyToOne)(() => PropagationMethodInfo_1.PropagationMethodInfo, (info) => info.images, {
|
|
110
103
|
nullable: true,
|
|
111
|
-
onDelete: "CASCADE",
|
|
112
104
|
}),
|
|
113
105
|
(0, typeorm_1.JoinColumn)({ name: "propagationMethodId" }),
|
|
114
106
|
__metadata("design:type", PropagationMethodInfo_1.PropagationMethodInfo)
|
|
@@ -116,7 +108,6 @@ __decorate([
|
|
|
116
108
|
__decorate([
|
|
117
109
|
(0, typeorm_1.ManyToOne)(() => PlantSize_1.PlantSize, (size) => size.images, {
|
|
118
110
|
nullable: true,
|
|
119
|
-
onDelete: "CASCADE",
|
|
120
111
|
}),
|
|
121
112
|
(0, typeorm_1.JoinColumn)({ name: "plantSizeId" }),
|
|
122
113
|
__metadata("design:type", PlantSize_1.PlantSize)
|
|
@@ -124,7 +115,6 @@ __decorate([
|
|
|
124
115
|
__decorate([
|
|
125
116
|
(0, typeorm_1.ManyToOne)(() => GrowthClassInfo_1.GrowthClassInfo, (growthClass) => growthClass.images, {
|
|
126
117
|
nullable: true,
|
|
127
|
-
onDelete: "CASCADE",
|
|
128
118
|
}),
|
|
129
119
|
(0, typeorm_1.JoinColumn)({ name: "growthClassInfoId" }),
|
|
130
120
|
__metadata("design:type", GrowthClassInfo_1.GrowthClassInfo)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ObjectLiteral } from 'typeorm';
|
|
2
2
|
import { GROWTH_AREA, GROWTH_HABIT } from './catalogs/growth-type';
|
|
3
|
-
import { PlantTechnicalSheet } from './PlantTechnicalSheet';
|
|
4
3
|
import { ImageInfo } from './ImageInfo';
|
|
5
4
|
export type PlantGrowthArea = keyof typeof GROWTH_AREA;
|
|
6
5
|
export type PlantGrowthHabit = keyof typeof GROWTH_HABIT;
|
|
@@ -10,6 +9,5 @@ export declare class PlantGrowthType implements ObjectLiteral {
|
|
|
10
9
|
habit: PlantGrowthHabit;
|
|
11
10
|
description?: string;
|
|
12
11
|
images?: ImageInfo[];
|
|
13
|
-
sheets: PlantTechnicalSheet[];
|
|
14
12
|
isActive: boolean;
|
|
15
13
|
}
|
|
@@ -13,7 +13,6 @@ exports.PlantGrowthType = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const enumColumn_1 = require("./utils/enumColumn");
|
|
15
15
|
const growth_type_1 = require("./catalogs/growth-type");
|
|
16
|
-
const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
|
|
17
16
|
const ImageInfo_1 = require("./ImageInfo");
|
|
18
17
|
let PlantGrowthType = class PlantGrowthType {
|
|
19
18
|
};
|
|
@@ -40,10 +39,6 @@ __decorate([
|
|
|
40
39
|
}),
|
|
41
40
|
__metadata("design:type", Array)
|
|
42
41
|
], 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
42
|
__decorate([
|
|
48
43
|
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
49
44
|
__metadata("design:type", Boolean)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ObjectLiteral } from 'typeorm';
|
|
2
2
|
import { GrowthHabit } from './catalogs/plant-size';
|
|
3
|
-
import { PlantTechnicalSheet } from './PlantTechnicalSheet';
|
|
4
3
|
import { ImageInfo } from './ImageInfo';
|
|
5
4
|
export declare class PlantSize implements ObjectLiteral {
|
|
6
5
|
idPlantSize: number;
|
|
@@ -9,6 +8,5 @@ export declare class PlantSize implements ObjectLiteral {
|
|
|
9
8
|
habit?: GrowthHabit | undefined;
|
|
10
9
|
notes?: string | null;
|
|
11
10
|
images?: ImageInfo[] | undefined;
|
|
12
|
-
plantTechnicalSheet: PlantTechnicalSheet;
|
|
13
11
|
isActive: boolean;
|
|
14
12
|
}
|
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.PlantSize = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const plant_size_1 = require("./catalogs/plant-size");
|
|
15
|
-
const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
|
|
16
15
|
const ImageInfo_1 = require("./ImageInfo");
|
|
17
16
|
const enumColumn_1 = require("./utils/enumColumn");
|
|
18
17
|
let PlantSize = class PlantSize {
|
|
@@ -45,14 +44,6 @@ __decorate([
|
|
|
45
44
|
}),
|
|
46
45
|
__metadata("design:type", Object)
|
|
47
46
|
], 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
47
|
__decorate([
|
|
57
48
|
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
58
49
|
__metadata("design:type", Boolean)
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ObjectLiteral } from "typeorm";
|
|
2
2
|
import { PropagationMethod } from "./catalogs/propagation-method";
|
|
3
3
|
import { ImageInfo } from "./ImageInfo";
|
|
4
|
-
import { PlantTechnicalSheet } from "./PlantTechnicalSheet";
|
|
5
4
|
export declare class PropagationMethodInfo implements ObjectLiteral {
|
|
6
5
|
idPropagationMethodInfo: number;
|
|
7
6
|
type: PropagationMethod | undefined;
|
|
8
7
|
description?: string | null;
|
|
9
8
|
images?: ImageInfo[] | undefined;
|
|
10
|
-
plantTechnicalSheets: PlantTechnicalSheet[];
|
|
11
9
|
isActive?: boolean | undefined;
|
|
12
10
|
}
|
|
@@ -13,7 +13,6 @@ exports.PropagationMethodInfo = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const propagation_method_1 = require("./catalogs/propagation-method");
|
|
15
15
|
const ImageInfo_1 = require("./ImageInfo");
|
|
16
|
-
const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
|
|
17
16
|
const enumColumn_1 = require("./utils/enumColumn");
|
|
18
17
|
let PropagationMethodInfo = class PropagationMethodInfo {
|
|
19
18
|
};
|
|
@@ -39,10 +38,6 @@ __decorate([
|
|
|
39
38
|
}),
|
|
40
39
|
__metadata("design:type", Object)
|
|
41
40
|
], 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
41
|
__decorate([
|
|
47
42
|
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
48
43
|
__metadata("design:type", Object)
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { ObjectLiteral } from 'typeorm';
|
|
2
2
|
import { SubstrateType } from './catalogs/substrate-info';
|
|
3
3
|
import { ImageInfo } from './ImageInfo';
|
|
4
|
-
import { PlantTechnicalSheet } from './PlantTechnicalSheet';
|
|
5
4
|
export declare class SubstrateInfo implements ObjectLiteral {
|
|
6
5
|
idSubstrateInfo: number;
|
|
7
6
|
type: SubstrateType;
|
|
8
7
|
recipe?: string;
|
|
9
8
|
notes?: string;
|
|
10
9
|
images?: ImageInfo[];
|
|
11
|
-
plantTechnicalSheet: PlantTechnicalSheet;
|
|
12
10
|
isActive: boolean;
|
|
13
11
|
}
|
|
@@ -13,7 +13,6 @@ exports.SubstrateInfo = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const substrate_info_1 = require("./catalogs/substrate-info");
|
|
15
15
|
const ImageInfo_1 = require("./ImageInfo");
|
|
16
|
-
const PlantTechnicalSheet_1 = require("./PlantTechnicalSheet");
|
|
17
16
|
const enumColumn_1 = require("./utils/enumColumn");
|
|
18
17
|
let SubstrateInfo = class SubstrateInfo {
|
|
19
18
|
};
|
|
@@ -41,14 +40,6 @@ __decorate([
|
|
|
41
40
|
}),
|
|
42
41
|
__metadata("design:type", Array)
|
|
43
42
|
], 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
43
|
__decorate([
|
|
53
44
|
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
54
45
|
__metadata("design:type", Boolean)
|
package/package.json
CHANGED
|
@@ -39,13 +39,6 @@ import {
|
|
|
39
39
|
@Column('text', { nullable: true })
|
|
40
40
|
notes?: string;
|
|
41
41
|
|
|
42
|
-
/** Relación inversa con la ficha técnica */
|
|
43
|
-
@OneToOne(() => PlantTechnicalSheet, (sheet) => sheet.care, {
|
|
44
|
-
onDelete: 'CASCADE',
|
|
45
|
-
})
|
|
46
|
-
@JoinColumn({ name: 'plantTechnicalSheetId' })
|
|
47
|
-
plantTechnicalSheet?: PlantTechnicalSheet;
|
|
48
|
-
|
|
49
42
|
@Column({ type: 'boolean', default: true })
|
|
50
43
|
isActive!: boolean;
|
|
51
44
|
}
|
|
@@ -23,9 +23,7 @@ import {
|
|
|
23
23
|
@Column('simple-json', { nullable: true })
|
|
24
24
|
temperatureRangeC?: [number, number];
|
|
25
25
|
|
|
26
|
-
@OneToMany(() => ImageInfo, (image) => image.climateIdeal
|
|
27
|
-
cascade: true,
|
|
28
|
-
})
|
|
26
|
+
@OneToMany(() => ImageInfo, (image) => image.climateIdeal)
|
|
29
27
|
images?: ImageInfo[];
|
|
30
28
|
|
|
31
29
|
@Column({ type: 'boolean', default: true })
|
|
@@ -42,18 +42,9 @@ export class FertilizationInfo implements ObjectLiteral {
|
|
|
42
42
|
notes?: string;
|
|
43
43
|
|
|
44
44
|
/** Imágenes asociadas */
|
|
45
|
-
@OneToMany(() => ImageInfo, (image) => image.fertilizationInfo
|
|
46
|
-
cascade: true,
|
|
47
|
-
})
|
|
45
|
+
@OneToMany(() => ImageInfo, (image) => image.fertilizationInfo)
|
|
48
46
|
images?: ImageInfo[];
|
|
49
47
|
|
|
50
|
-
/** Ficha técnica a la que pertenece esta fertilización */
|
|
51
|
-
@ManyToOne(() => PlantTechnicalSheet, (sheet) => sheet.fertilization, {
|
|
52
|
-
nullable: false,
|
|
53
|
-
onDelete: "CASCADE",
|
|
54
|
-
})
|
|
55
|
-
plant!: PlantTechnicalSheet;
|
|
56
|
-
|
|
57
48
|
@Column({ type: "boolean", default: true })
|
|
58
49
|
isActive!: boolean;
|
|
59
50
|
}
|
|
@@ -41,71 +41,62 @@ export class ImageInfo implements ObjectLiteral {
|
|
|
41
41
|
|
|
42
42
|
@ManyToOne(() => PlantGrowthType, (growthType) => growthType.images, {
|
|
43
43
|
nullable: true,
|
|
44
|
-
onDelete: "CASCADE",
|
|
45
44
|
})
|
|
46
45
|
@JoinColumn({ name: "plantGrowthTypeId" })
|
|
47
46
|
plantGrowthType?: PlantGrowthType;
|
|
48
47
|
|
|
49
48
|
@ManyToOne(() => LightInfo, (lightInfo) => lightInfo.images, {
|
|
50
49
|
nullable: true,
|
|
51
|
-
onDelete: "CASCADE",
|
|
52
50
|
})
|
|
53
51
|
@JoinColumn({ name: "lightInfoId" })
|
|
54
52
|
lightInfo?: LightInfo;
|
|
55
53
|
|
|
56
54
|
@ManyToOne(() => HumidityInfo, (humidityInfo) => humidityInfo.images, {
|
|
57
55
|
nullable: true,
|
|
58
|
-
onDelete: "CASCADE",
|
|
59
56
|
})
|
|
60
57
|
@JoinColumn({ name: "humidityInfoId" })
|
|
61
58
|
humidityInfo?: HumidityInfo;
|
|
62
59
|
|
|
63
60
|
@ManyToOne(() => ClimateIdeal, (climate) => climate.images, {
|
|
64
61
|
nullable: true,
|
|
65
|
-
onDelete: "CASCADE",
|
|
66
62
|
})
|
|
67
63
|
@JoinColumn({ name: "climateIdealId" })
|
|
68
64
|
climateIdeal?: ClimateIdeal;
|
|
69
65
|
|
|
70
66
|
@ManyToOne(() => SubstrateInfo, (substrate) => substrate.images, {
|
|
71
67
|
nullable: true,
|
|
72
|
-
onDelete: "CASCADE",
|
|
73
68
|
})
|
|
74
69
|
@JoinColumn({ name: "substrateInfoId" })
|
|
75
70
|
substrateInfo?: SubstrateInfo;
|
|
76
71
|
|
|
77
72
|
@ManyToOne(() => FertilizationInfo, (f) => f.images, {
|
|
78
73
|
nullable: true,
|
|
79
|
-
onDelete: "CASCADE",
|
|
80
74
|
})
|
|
81
75
|
@JoinColumn({ name: "fertilizationInfoId" })
|
|
82
76
|
fertilizationInfo?: FertilizationInfo;
|
|
83
77
|
|
|
84
78
|
@ManyToOne(() => PestInfo, (pest) => pest.images, {
|
|
85
79
|
nullable: true,
|
|
86
|
-
onDelete: "CASCADE",
|
|
87
80
|
})
|
|
88
81
|
@JoinColumn({ name: "pestId" })
|
|
89
82
|
pest?: PestInfo;
|
|
90
83
|
|
|
91
84
|
@ManyToOne(() => PropagationMethodInfo, (info) => info.images, {
|
|
92
85
|
nullable: true,
|
|
93
|
-
onDelete: "CASCADE",
|
|
94
86
|
})
|
|
95
87
|
@JoinColumn({ name: "propagationMethodId" })
|
|
96
88
|
propagationMethod?: PropagationMethodInfo;
|
|
97
89
|
|
|
98
90
|
@ManyToOne(() => PlantSize, (size) => size.images, {
|
|
99
91
|
nullable: true,
|
|
100
|
-
onDelete: "CASCADE",
|
|
101
92
|
})
|
|
102
93
|
@JoinColumn({ name: "plantSizeId" })
|
|
103
94
|
plantSize?: PlantSize;
|
|
104
95
|
|
|
105
96
|
@ManyToOne(() => GrowthClassInfo, (growthClass) => growthClass.images, {
|
|
106
97
|
nullable: true,
|
|
107
|
-
onDelete: "CASCADE",
|
|
108
98
|
})
|
|
109
99
|
@JoinColumn({ name: "growthClassInfoId" })
|
|
110
100
|
growthClassInfo?: GrowthClassInfo;
|
|
111
101
|
}
|
|
102
|
+
|
|
@@ -35,13 +35,6 @@ import {
|
|
|
35
35
|
})
|
|
36
36
|
images?: ImageInfo[] | undefined;
|
|
37
37
|
|
|
38
|
-
@ManyToOne(() => PlantTechnicalSheet, (sheet) => sheet.size, {
|
|
39
|
-
nullable: false,
|
|
40
|
-
onDelete: 'CASCADE',
|
|
41
|
-
})
|
|
42
|
-
@JoinColumn({ name: 'plantTechnicalSheetId' })
|
|
43
|
-
plantTechnicalSheet!: PlantTechnicalSheet;
|
|
44
|
-
|
|
45
38
|
@Column({ type: 'boolean', default: true })
|
|
46
39
|
isActive!: boolean;
|
|
47
40
|
}
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
} from "typeorm";
|
|
8
8
|
import { PropagationMethod, PROPAGATION } from "./catalogs/propagation-method";
|
|
9
9
|
import { ImageInfo } from "./ImageInfo";
|
|
10
|
-
import { PlantTechnicalSheet } from "./PlantTechnicalSheet";
|
|
11
10
|
import { EnumColumn } from "./utils/enumColumn";
|
|
12
11
|
|
|
13
12
|
@Entity("propagation_method_info")
|
|
@@ -29,9 +28,6 @@ export class PropagationMethodInfo implements ObjectLiteral {
|
|
|
29
28
|
})
|
|
30
29
|
images?: ImageInfo[] | undefined;
|
|
31
30
|
|
|
32
|
-
@OneToMany(() => PlantTechnicalSheet, (sheet) => sheet.propagation)
|
|
33
|
-
plantTechnicalSheets!: PlantTechnicalSheet[];
|
|
34
|
-
|
|
35
31
|
@Column({ type: "boolean", default: true })
|
|
36
32
|
isActive?: boolean | undefined;
|
|
37
33
|
}
|
|
@@ -2,14 +2,12 @@ import {
|
|
|
2
2
|
Entity,
|
|
3
3
|
Column,
|
|
4
4
|
PrimaryGeneratedColumn,
|
|
5
|
-
ManyToOne,
|
|
6
5
|
OneToMany,
|
|
7
|
-
JoinColumn,
|
|
8
6
|
ObjectLiteral,
|
|
9
7
|
} from 'typeorm';
|
|
10
8
|
import { SubstrateType, SUBSTRATE } from './catalogs/substrate-info';
|
|
11
9
|
import { ImageInfo } from './ImageInfo';
|
|
12
|
-
|
|
10
|
+
|
|
13
11
|
import { EnumColumn } from './utils/enumColumn';
|
|
14
12
|
|
|
15
13
|
@Entity('substrate_info')
|
|
@@ -32,13 +30,6 @@ import { EnumColumn } from './utils/enumColumn';
|
|
|
32
30
|
})
|
|
33
31
|
images?: ImageInfo[];
|
|
34
32
|
|
|
35
|
-
@ManyToOne(() => PlantTechnicalSheet, (sheet) => sheet.substrate, {
|
|
36
|
-
nullable: false,
|
|
37
|
-
onDelete: 'CASCADE',
|
|
38
|
-
})
|
|
39
|
-
@JoinColumn({ name: 'plantTechnicalSheetId' })
|
|
40
|
-
plantTechnicalSheet!: PlantTechnicalSheet;
|
|
41
|
-
|
|
42
33
|
@Column({ type: 'boolean', default: true })
|
|
43
34
|
isActive!: boolean;
|
|
44
35
|
}
|