proflores-db-model 0.2.7 → 0.2.9
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/ClimateIdeal.d.ts +2 -1
- package/dist/models/technical-sheet/FertilizationInfo.d.ts +4 -1
- package/dist/models/technical-sheet/GrowthClassInfo.d.ts +2 -1
- package/dist/models/technical-sheet/HumidityInfo.d.ts +2 -1
- package/dist/models/technical-sheet/LightInfo.d.ts +2 -1
- package/dist/models/technical-sheet/PestInfo.d.ts +7 -4
- package/dist/models/technical-sheet/PestInfo.js +10 -10
- package/dist/models/technical-sheet/PlantSize.d.ts +2 -1
- package/dist/models/technical-sheet/PropagationMethodInfo.d.ts +2 -1
- package/dist/models/technical-sheet/SubstrateInfo.d.ts +2 -1
- package/dist/models/technical-sheet/catalogs/climate-ideal.d.ts +0 -2
- package/dist/models/technical-sheet/catalogs/fertilization-info.d.ts +0 -3
- package/dist/models/technical-sheet/catalogs/growth-class.d.ts +0 -1
- package/dist/models/technical-sheet/catalogs/growth-type.d.ts +0 -2
- package/dist/models/technical-sheet/catalogs/humidity-info.d.ts +0 -1
- package/dist/models/technical-sheet/catalogs/index.d.ts +10 -0
- package/dist/models/technical-sheet/catalogs/index.js +26 -0
- package/dist/models/technical-sheet/catalogs/light-info.d.ts +0 -1
- package/dist/models/technical-sheet/catalogs/pest-info.d.ts +0 -3
- package/dist/models/technical-sheet/catalogs/plant-size.d.ts +0 -1
- package/dist/models/technical-sheet/catalogs/propagation-method.d.ts +0 -1
- package/dist/models/technical-sheet/catalogs/substrate-info.d.ts +0 -1
- package/dist/models/technical-sheet/index.d.ts +1 -0
- package/dist/models/technical-sheet/index.js +1 -0
- package/package.json +1 -1
- package/src/models/technical-sheet/ClimateIdeal.ts +3 -1
- package/src/models/technical-sheet/FertilizationInfo.ts +5 -6
- package/src/models/technical-sheet/GrowthClassInfo.ts +3 -2
- package/src/models/technical-sheet/HumidityInfo.ts +3 -1
- package/src/models/technical-sheet/LightInfo.ts +3 -1
- package/src/models/technical-sheet/PestInfo.ts +60 -64
- package/src/models/technical-sheet/PlantGrowthType.ts +0 -1
- package/src/models/technical-sheet/PlantSize.ts +3 -2
- package/src/models/technical-sheet/PropagationMethodInfo.ts +3 -1
- package/src/models/technical-sheet/SubstrateInfo.ts +3 -1
- package/src/models/technical-sheet/catalogs/climate-ideal.ts +0 -3
- package/src/models/technical-sheet/catalogs/fertilization-info.ts +0 -3
- package/src/models/technical-sheet/catalogs/growth-class.ts +0 -1
- package/src/models/technical-sheet/catalogs/growth-type.ts +0 -2
- package/src/models/technical-sheet/catalogs/humidity-info.ts +0 -1
- package/src/models/technical-sheet/catalogs/index.ts +10 -0
- package/src/models/technical-sheet/catalogs/light-info.ts +0 -1
- package/src/models/technical-sheet/catalogs/pest-info.ts +0 -3
- package/src/models/technical-sheet/catalogs/plant-size.ts +0 -1
- package/src/models/technical-sheet/catalogs/propagation-method.ts +0 -1
- package/src/models/technical-sheet/catalogs/substrate-info.ts +0 -1
- package/src/models/technical-sheet/index.ts +2 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ObjectLiteral } from 'typeorm';
|
|
2
|
-
import {
|
|
2
|
+
import { CLIMATE } from './catalogs/climate-ideal';
|
|
3
3
|
import { ImageInfo } from './ImageInfo';
|
|
4
|
+
export type ClimateType = keyof typeof CLIMATE;
|
|
4
5
|
export declare class ClimateIdeal implements ObjectLiteral {
|
|
5
6
|
idClimateIdeal: number;
|
|
6
7
|
type: ClimateType;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ObjectLiteral } from "typeorm";
|
|
2
|
-
import {
|
|
2
|
+
import { FERTILIZER_TYPE, FERTILIZER_FREQ, FERTILIZER_METHOD } from "./catalogs/fertilization-info";
|
|
3
3
|
import { ImageInfo } from "./ImageInfo";
|
|
4
|
+
export type FertilizerType = keyof typeof FERTILIZER_TYPE;
|
|
5
|
+
export type FertilizerFrequency = keyof typeof FERTILIZER_FREQ;
|
|
6
|
+
export type FertilizerMethod = keyof typeof FERTILIZER_METHOD;
|
|
4
7
|
export declare class FertilizationInfo implements ObjectLiteral {
|
|
5
8
|
idFertilizationInfo: number;
|
|
6
9
|
/** Tipo de fertilizante según catálogo */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ObjectLiteral } from 'typeorm';
|
|
2
|
-
import {
|
|
2
|
+
import { GROWTH_CLASS } from './catalogs/growth-class';
|
|
3
3
|
import { ImageInfo } from './ImageInfo';
|
|
4
|
+
export type GrowthClass = keyof typeof GROWTH_CLASS;
|
|
4
5
|
export declare class GrowthClassInfo implements ObjectLiteral {
|
|
5
6
|
idGrowthClassInfo: number;
|
|
6
7
|
/** Clase de crecimiento (catálogo) */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ObjectLiteral } from 'typeorm';
|
|
2
|
-
import {
|
|
2
|
+
import { HUMIDITY } from './catalogs/humidity-info';
|
|
3
3
|
import { ImageInfo } from './ImageInfo';
|
|
4
|
+
export type HumidityRequirement = keyof typeof HUMIDITY;
|
|
4
5
|
export declare class HumidityInfo implements ObjectLiteral {
|
|
5
6
|
idHumidityInfo: number;
|
|
6
7
|
type: HumidityRequirement;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ObjectLiteral } from 'typeorm';
|
|
2
|
-
import {
|
|
2
|
+
import { LIGHT } from './catalogs/light-info';
|
|
3
3
|
import { ImageInfo } from './ImageInfo';
|
|
4
|
+
export type LightRequirement = keyof typeof LIGHT;
|
|
4
5
|
export declare class LightInfo implements ObjectLiteral {
|
|
5
6
|
idLightInfo: number;
|
|
6
7
|
type: LightRequirement;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { ObjectLiteral } from
|
|
2
|
-
import { PlantTechnicalSheet } from
|
|
3
|
-
import { ImageInfo } from
|
|
4
|
-
import {
|
|
1
|
+
import { ObjectLiteral } from "typeorm";
|
|
2
|
+
import { PlantTechnicalSheet } from "./PlantTechnicalSheet";
|
|
3
|
+
import { ImageInfo } from "./ImageInfo";
|
|
4
|
+
import { PEST_TYPE, PLANT_PART, CONTROL_METHOD } from "./catalogs/pest-info";
|
|
5
|
+
export type PestType = keyof typeof PEST_TYPE;
|
|
6
|
+
export type PlantPart = keyof typeof PLANT_PART;
|
|
7
|
+
export type ControlMethod = keyof typeof CONTROL_METHOD;
|
|
5
8
|
export declare class PestInfo implements ObjectLiteral {
|
|
6
9
|
idPestInfo: number;
|
|
7
10
|
commonName: string;
|
|
@@ -19,15 +19,15 @@ let PestInfo = class PestInfo {
|
|
|
19
19
|
};
|
|
20
20
|
exports.PestInfo = PestInfo;
|
|
21
21
|
__decorate([
|
|
22
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("increment"),
|
|
23
23
|
__metadata("design:type", Number)
|
|
24
24
|
], PestInfo.prototype, "idPestInfo", void 0);
|
|
25
25
|
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)(
|
|
26
|
+
(0, typeorm_1.Column)("varchar", { length: 255 }),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], PestInfo.prototype, "commonName", void 0);
|
|
29
29
|
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)(
|
|
30
|
+
(0, typeorm_1.Column)("varchar", { nullable: true, length: 255 }),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
32
|
], PestInfo.prototype, "scientificName", void 0);
|
|
33
33
|
__decorate([
|
|
@@ -39,11 +39,11 @@ __decorate([
|
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], PestInfo.prototype, "affectedParts", void 0);
|
|
41
41
|
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)(
|
|
42
|
+
(0, typeorm_1.Column)("text"),
|
|
43
43
|
__metadata("design:type", String)
|
|
44
44
|
], PestInfo.prototype, "symptoms", void 0);
|
|
45
45
|
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)(
|
|
46
|
+
(0, typeorm_1.Column)("text", { nullable: true }),
|
|
47
47
|
__metadata("design:type", String)
|
|
48
48
|
], PestInfo.prototype, "appearanceConditions", void 0);
|
|
49
49
|
__decorate([
|
|
@@ -51,14 +51,14 @@ __decorate([
|
|
|
51
51
|
__metadata("design:type", String)
|
|
52
52
|
], PestInfo.prototype, "controlMethod", void 0);
|
|
53
53
|
__decorate([
|
|
54
|
-
(0, typeorm_1.Column)(
|
|
54
|
+
(0, typeorm_1.Column)("text", { nullable: true }),
|
|
55
55
|
__metadata("design:type", String)
|
|
56
56
|
], PestInfo.prototype, "controlNotes", void 0);
|
|
57
57
|
__decorate([
|
|
58
58
|
(0, typeorm_1.ManyToOne)(() => PlantTechnicalSheet_1.PlantTechnicalSheet, (sheet) => sheet.pests, {
|
|
59
|
-
onDelete:
|
|
59
|
+
onDelete: "CASCADE",
|
|
60
60
|
}),
|
|
61
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
61
|
+
(0, typeorm_1.JoinColumn)({ name: "technicalSheetId" }),
|
|
62
62
|
__metadata("design:type", PlantTechnicalSheet_1.PlantTechnicalSheet)
|
|
63
63
|
], PestInfo.prototype, "technicalSheet", void 0);
|
|
64
64
|
__decorate([
|
|
@@ -68,9 +68,9 @@ __decorate([
|
|
|
68
68
|
__metadata("design:type", Array)
|
|
69
69
|
], PestInfo.prototype, "images", void 0);
|
|
70
70
|
__decorate([
|
|
71
|
-
(0, typeorm_1.Column)({ type:
|
|
71
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
72
72
|
__metadata("design:type", Boolean)
|
|
73
73
|
], PestInfo.prototype, "isActive", void 0);
|
|
74
74
|
exports.PestInfo = PestInfo = __decorate([
|
|
75
|
-
(0, typeorm_1.Entity)(
|
|
75
|
+
(0, typeorm_1.Entity)("pests")
|
|
76
76
|
], PestInfo);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ObjectLiteral } from 'typeorm';
|
|
2
|
-
import {
|
|
2
|
+
import { GROWTH_HABIT_GEOM } from './catalogs/plant-size';
|
|
3
3
|
import { ImageInfo } from './ImageInfo';
|
|
4
|
+
export type GrowthHabit = keyof typeof GROWTH_HABIT_GEOM;
|
|
4
5
|
export declare class PlantSize implements ObjectLiteral {
|
|
5
6
|
idPlantSize: number;
|
|
6
7
|
heightCm: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ObjectLiteral } from "typeorm";
|
|
2
|
-
import {
|
|
2
|
+
import { PROPAGATION } from "./catalogs/propagation-method";
|
|
3
3
|
import { ImageInfo } from "./ImageInfo";
|
|
4
|
+
export type PropagationMethod = keyof typeof PROPAGATION;
|
|
4
5
|
export declare class PropagationMethodInfo implements ObjectLiteral {
|
|
5
6
|
idPropagationMethodInfo: number;
|
|
6
7
|
type: PropagationMethod | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ObjectLiteral } from 'typeorm';
|
|
2
|
-
import {
|
|
2
|
+
import { SUBSTRATE } from './catalogs/substrate-info';
|
|
3
3
|
import { ImageInfo } from './ImageInfo';
|
|
4
|
+
export type SubstrateType = keyof typeof SUBSTRATE;
|
|
4
5
|
export declare class SubstrateInfo implements ObjectLiteral {
|
|
5
6
|
idSubstrateInfo: number;
|
|
6
7
|
type: SubstrateType;
|
|
@@ -10,7 +10,6 @@ export declare const FERTILIZER_TYPE: {
|
|
|
10
10
|
ABONO_COMPLETO: string;
|
|
11
11
|
NINGUNO: string;
|
|
12
12
|
};
|
|
13
|
-
export type FertilizerType = keyof typeof FERTILIZER_TYPE;
|
|
14
13
|
export declare const FERTILIZER_FREQ: {
|
|
15
14
|
SEMANAL: string;
|
|
16
15
|
CADA_15_DÍAS: string;
|
|
@@ -21,7 +20,6 @@ export declare const FERTILIZER_FREQ: {
|
|
|
21
20
|
OCASIONAL: string;
|
|
22
21
|
NINGUNA: string;
|
|
23
22
|
};
|
|
24
|
-
export type FertilizerFrequency = keyof typeof FERTILIZER_FREQ;
|
|
25
23
|
export declare const FERTILIZER_METHOD: {
|
|
26
24
|
EN_EL_RIEGO: string;
|
|
27
25
|
DIRECTO_EN_SUSTRATO: string;
|
|
@@ -31,4 +29,3 @@ export declare const FERTILIZER_METHOD: {
|
|
|
31
29
|
HIDROPONÍA: string;
|
|
32
30
|
NO_APLICA: string;
|
|
33
31
|
};
|
|
34
|
-
export type FertilizerMethod = keyof typeof FERTILIZER_METHOD;
|
|
@@ -7,7 +7,6 @@ export declare const GROWTH_AREA: {
|
|
|
7
7
|
ACUÁTICA: string;
|
|
8
8
|
TERRARIO: string;
|
|
9
9
|
};
|
|
10
|
-
export type PlantGrowthArea = keyof typeof GROWTH_AREA;
|
|
11
10
|
export declare const GROWTH_HABIT: {
|
|
12
11
|
ERGIDA: string;
|
|
13
12
|
TREPADORA: string;
|
|
@@ -29,4 +28,3 @@ export declare const GROWTH_HABIT: {
|
|
|
29
28
|
MUSGO: string;
|
|
30
29
|
MINI_HELECHO: string;
|
|
31
30
|
};
|
|
32
|
-
export type PlantGrowthHabit = keyof typeof GROWTH_HABIT;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './climate-ideal';
|
|
2
|
+
export * from './fertilization-info';
|
|
3
|
+
export * from './growth-class';
|
|
4
|
+
export * from './growth-type';
|
|
5
|
+
export * from './humidity-info';
|
|
6
|
+
export * from './light-info';
|
|
7
|
+
export * from './pest-info';
|
|
8
|
+
export * from './plant-size';
|
|
9
|
+
export * from './substrate-info';
|
|
10
|
+
export * from './propagation-method';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./climate-ideal"), exports);
|
|
18
|
+
__exportStar(require("./fertilization-info"), exports);
|
|
19
|
+
__exportStar(require("./growth-class"), exports);
|
|
20
|
+
__exportStar(require("./growth-type"), exports);
|
|
21
|
+
__exportStar(require("./humidity-info"), exports);
|
|
22
|
+
__exportStar(require("./light-info"), exports);
|
|
23
|
+
__exportStar(require("./pest-info"), exports);
|
|
24
|
+
__exportStar(require("./plant-size"), exports);
|
|
25
|
+
__exportStar(require("./substrate-info"), exports);
|
|
26
|
+
__exportStar(require("./propagation-method"), exports);
|
|
@@ -6,7 +6,6 @@ export declare const PLANT_PART: {
|
|
|
6
6
|
FRUTOS: string;
|
|
7
7
|
TODA_LA_PLANTA: string;
|
|
8
8
|
};
|
|
9
|
-
export type PlantPart = keyof typeof PLANT_PART;
|
|
10
9
|
export declare const CONTROL_METHOD: {
|
|
11
10
|
JABÓN_POTÁSICO: string;
|
|
12
11
|
ACEITE_DE_NEEM: string;
|
|
@@ -19,7 +18,6 @@ export declare const CONTROL_METHOD: {
|
|
|
19
18
|
CONTROL_BIOLÓGICO: string;
|
|
20
19
|
OTRO: string;
|
|
21
20
|
};
|
|
22
|
-
export type ControlMethod = keyof typeof CONTROL_METHOD;
|
|
23
21
|
export declare const PEST_TYPE: {
|
|
24
22
|
INSECTO: string;
|
|
25
23
|
HONGO: string;
|
|
@@ -29,4 +27,3 @@ export declare const PEST_TYPE: {
|
|
|
29
27
|
NEMATODO: string;
|
|
30
28
|
OTRO: string;
|
|
31
29
|
};
|
|
32
|
-
export type PestType = keyof typeof PEST_TYPE;
|
|
@@ -27,3 +27,4 @@ __exportStar(require("./SubstrateInfo"), exports);
|
|
|
27
27
|
__exportStar(require("./ClimateIdeal"), exports);
|
|
28
28
|
__exportStar(require("./FertilizationInfo"), exports);
|
|
29
29
|
__exportStar(require("./PropagationMethodInfo"), exports);
|
|
30
|
+
__exportStar(require("./catalogs"), exports);
|
package/package.json
CHANGED
|
@@ -5,9 +5,11 @@ import {
|
|
|
5
5
|
OneToMany,
|
|
6
6
|
ObjectLiteral,
|
|
7
7
|
} from 'typeorm';
|
|
8
|
-
import { CLIMATE
|
|
8
|
+
import { CLIMATE } from './catalogs/climate-ideal';
|
|
9
9
|
import { ImageInfo } from './ImageInfo';
|
|
10
10
|
import { EnumColumn } from './utils/enumColumn';
|
|
11
|
+
|
|
12
|
+
export type ClimateType = keyof typeof CLIMATE;
|
|
11
13
|
|
|
12
14
|
@Entity('climate_ideal')
|
|
13
15
|
export class ClimateIdeal implements ObjectLiteral {
|
|
@@ -2,22 +2,21 @@ import {
|
|
|
2
2
|
Entity,
|
|
3
3
|
Column,
|
|
4
4
|
PrimaryGeneratedColumn,
|
|
5
|
-
ManyToOne,
|
|
6
5
|
OneToMany,
|
|
7
6
|
ObjectLiteral,
|
|
8
7
|
} from "typeorm";
|
|
9
8
|
import {
|
|
10
9
|
FERTILIZER_TYPE,
|
|
11
10
|
FERTILIZER_FREQ,
|
|
12
|
-
FERTILIZER_METHOD
|
|
13
|
-
FertilizerType,
|
|
14
|
-
FertilizerFrequency,
|
|
15
|
-
FertilizerMethod,
|
|
11
|
+
FERTILIZER_METHOD
|
|
16
12
|
} from "./catalogs/fertilization-info";
|
|
17
|
-
import { PlantTechnicalSheet } from "./PlantTechnicalSheet";
|
|
18
13
|
import { ImageInfo } from "./ImageInfo";
|
|
19
14
|
import { EnumColumn } from "./utils/enumColumn";
|
|
20
15
|
|
|
16
|
+
export type FertilizerType = keyof typeof FERTILIZER_TYPE;
|
|
17
|
+
export type FertilizerFrequency = keyof typeof FERTILIZER_FREQ;
|
|
18
|
+
export type FertilizerMethod = keyof typeof FERTILIZER_METHOD;
|
|
19
|
+
|
|
21
20
|
@Entity("fertilization_info")
|
|
22
21
|
export class FertilizationInfo implements ObjectLiteral {
|
|
23
22
|
@PrimaryGeneratedColumn("increment")
|
|
@@ -5,11 +5,12 @@ import {
|
|
|
5
5
|
OneToMany,
|
|
6
6
|
ObjectLiteral,
|
|
7
7
|
} from 'typeorm';
|
|
8
|
-
import { GROWTH_CLASS
|
|
9
|
-
import { PlantTechnicalSheet } from './PlantTechnicalSheet';
|
|
8
|
+
import { GROWTH_CLASS } from './catalogs/growth-class';
|
|
10
9
|
import { ImageInfo } from './ImageInfo';
|
|
11
10
|
import { EnumColumn } from './utils/enumColumn';
|
|
12
11
|
|
|
12
|
+
export type GrowthClass = keyof typeof GROWTH_CLASS;
|
|
13
|
+
|
|
13
14
|
@Entity('growth_class_info')
|
|
14
15
|
export class GrowthClassInfo implements ObjectLiteral {
|
|
15
16
|
@PrimaryGeneratedColumn('increment')
|
|
@@ -5,9 +5,11 @@ import {
|
|
|
5
5
|
OneToMany,
|
|
6
6
|
ObjectLiteral,
|
|
7
7
|
} from 'typeorm';
|
|
8
|
-
import { HUMIDITY
|
|
8
|
+
import { HUMIDITY } from './catalogs/humidity-info';
|
|
9
9
|
import { ImageInfo } from './ImageInfo';
|
|
10
10
|
import { EnumColumn } from './utils/enumColumn';
|
|
11
|
+
|
|
12
|
+
export type HumidityRequirement = keyof typeof HUMIDITY;
|
|
11
13
|
|
|
12
14
|
@Entity('humidity_info')
|
|
13
15
|
export class HumidityInfo implements ObjectLiteral {
|
|
@@ -5,9 +5,11 @@ import {
|
|
|
5
5
|
OneToMany,
|
|
6
6
|
ObjectLiteral,
|
|
7
7
|
} from 'typeorm';
|
|
8
|
-
import { LIGHT
|
|
8
|
+
import { LIGHT } from './catalogs/light-info';
|
|
9
9
|
import { ImageInfo } from './ImageInfo';
|
|
10
10
|
import { EnumColumn } from './utils/enumColumn';
|
|
11
|
+
|
|
12
|
+
export type LightRequirement = keyof typeof LIGHT;
|
|
11
13
|
|
|
12
14
|
@Entity('light_info')
|
|
13
15
|
export class LightInfo implements ObjectLiteral {
|
|
@@ -1,65 +1,61 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
@Column({ type: 'boolean', default: true })
|
|
63
|
-
isActive!: boolean;
|
|
64
|
-
}
|
|
65
|
-
|
|
2
|
+
Entity,
|
|
3
|
+
PrimaryGeneratedColumn,
|
|
4
|
+
Column,
|
|
5
|
+
ObjectLiteral,
|
|
6
|
+
ManyToOne,
|
|
7
|
+
JoinColumn,
|
|
8
|
+
OneToMany,
|
|
9
|
+
} from "typeorm";
|
|
10
|
+
import { PlantTechnicalSheet } from "./PlantTechnicalSheet";
|
|
11
|
+
import { ImageInfo } from "./ImageInfo";
|
|
12
|
+
import { PEST_TYPE, PLANT_PART, CONTROL_METHOD } from "./catalogs/pest-info";
|
|
13
|
+
import { EnumColumn } from "./utils/enumColumn";
|
|
14
|
+
|
|
15
|
+
export type PestType = keyof typeof PEST_TYPE;
|
|
16
|
+
export type PlantPart = keyof typeof PLANT_PART;
|
|
17
|
+
export type ControlMethod = keyof typeof CONTROL_METHOD;
|
|
18
|
+
|
|
19
|
+
@Entity("pests")
|
|
20
|
+
export class PestInfo implements ObjectLiteral {
|
|
21
|
+
@PrimaryGeneratedColumn("increment")
|
|
22
|
+
idPestInfo!: number;
|
|
23
|
+
|
|
24
|
+
@Column("varchar", { length: 255 })
|
|
25
|
+
commonName!: string;
|
|
26
|
+
|
|
27
|
+
@Column("varchar", { nullable: true, length: 255 })
|
|
28
|
+
scientificName?: string;
|
|
29
|
+
|
|
30
|
+
@EnumColumn(Object.keys(PEST_TYPE) as PestType[])
|
|
31
|
+
type!: PestType;
|
|
32
|
+
|
|
33
|
+
@EnumColumn(Object.keys(PLANT_PART) as PlantPart[])
|
|
34
|
+
affectedParts!: PlantPart;
|
|
35
|
+
|
|
36
|
+
@Column("text")
|
|
37
|
+
symptoms!: string;
|
|
38
|
+
|
|
39
|
+
@Column("text", { nullable: true })
|
|
40
|
+
appearanceConditions?: string;
|
|
41
|
+
|
|
42
|
+
@EnumColumn(Object.keys(CONTROL_METHOD) as ControlMethod[])
|
|
43
|
+
controlMethod!: ControlMethod;
|
|
44
|
+
|
|
45
|
+
@Column("text", { nullable: true })
|
|
46
|
+
controlNotes?: string;
|
|
47
|
+
|
|
48
|
+
@ManyToOne(() => PlantTechnicalSheet, (sheet) => sheet.pests, {
|
|
49
|
+
onDelete: "CASCADE",
|
|
50
|
+
})
|
|
51
|
+
@JoinColumn({ name: "technicalSheetId" })
|
|
52
|
+
technicalSheet!: PlantTechnicalSheet;
|
|
53
|
+
|
|
54
|
+
@OneToMany(() => ImageInfo, (image) => image.pest, {
|
|
55
|
+
cascade: true,
|
|
56
|
+
})
|
|
57
|
+
images?: ImageInfo[];
|
|
58
|
+
|
|
59
|
+
@Column({ type: "boolean", default: true })
|
|
60
|
+
isActive!: boolean;
|
|
61
|
+
}
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
} from 'typeorm';
|
|
8
8
|
import { EnumColumn } from './utils/enumColumn';
|
|
9
9
|
import { GROWTH_AREA, GROWTH_HABIT } from './catalogs/growth-type';
|
|
10
|
-
import { PlantTechnicalSheet } from './PlantTechnicalSheet';
|
|
11
10
|
import { ImageInfo } from './ImageInfo';
|
|
12
11
|
|
|
13
12
|
export type PlantGrowthArea = keyof typeof GROWTH_AREA;
|
|
@@ -7,11 +7,12 @@ import {
|
|
|
7
7
|
JoinColumn,
|
|
8
8
|
ObjectLiteral,
|
|
9
9
|
} from 'typeorm';
|
|
10
|
-
import { GROWTH_HABIT_GEOM
|
|
11
|
-
import { PlantTechnicalSheet } from './PlantTechnicalSheet';
|
|
10
|
+
import { GROWTH_HABIT_GEOM } from './catalogs/plant-size';
|
|
12
11
|
import { ImageInfo } from './ImageInfo';
|
|
13
12
|
import { EnumColumn } from './utils/enumColumn';
|
|
14
13
|
|
|
14
|
+
export type GrowthHabit = keyof typeof GROWTH_HABIT_GEOM;
|
|
15
|
+
|
|
15
16
|
@Entity('plant_size')
|
|
16
17
|
export class PlantSize implements ObjectLiteral {
|
|
17
18
|
@PrimaryGeneratedColumn('increment')
|
|
@@ -5,10 +5,12 @@ import {
|
|
|
5
5
|
OneToMany,
|
|
6
6
|
ObjectLiteral,
|
|
7
7
|
} from "typeorm";
|
|
8
|
-
import {
|
|
8
|
+
import { PROPAGATION } from "./catalogs/propagation-method";
|
|
9
9
|
import { ImageInfo } from "./ImageInfo";
|
|
10
10
|
import { EnumColumn } from "./utils/enumColumn";
|
|
11
11
|
|
|
12
|
+
export type PropagationMethod = keyof typeof PROPAGATION;
|
|
13
|
+
|
|
12
14
|
@Entity("propagation_method_info")
|
|
13
15
|
export class PropagationMethodInfo implements ObjectLiteral {
|
|
14
16
|
@PrimaryGeneratedColumn("increment")
|
|
@@ -5,11 +5,13 @@ import {
|
|
|
5
5
|
OneToMany,
|
|
6
6
|
ObjectLiteral,
|
|
7
7
|
} from 'typeorm';
|
|
8
|
-
import {
|
|
8
|
+
import { SUBSTRATE } from './catalogs/substrate-info';
|
|
9
9
|
import { ImageInfo } from './ImageInfo';
|
|
10
10
|
|
|
11
11
|
import { EnumColumn } from './utils/enumColumn';
|
|
12
12
|
|
|
13
|
+
export type SubstrateType = keyof typeof SUBSTRATE;
|
|
14
|
+
|
|
13
15
|
@Entity('substrate_info')
|
|
14
16
|
export class SubstrateInfo implements ObjectLiteral {
|
|
15
17
|
@PrimaryGeneratedColumn('increment')
|
|
@@ -13,7 +13,6 @@ export const FERTILIZER_TYPE = makeCatalog({
|
|
|
13
13
|
NINGUNO: 'No se fertiliza regularmente.',
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
export type FertilizerType = keyof typeof FERTILIZER_TYPE;
|
|
17
16
|
|
|
18
17
|
export const FERTILIZER_FREQ = makeCatalog({
|
|
19
18
|
SEMANAL: 'Cada semana.',
|
|
@@ -26,7 +25,6 @@ export const FERTILIZER_FREQ = makeCatalog({
|
|
|
26
25
|
NINGUNA: 'Nunca.',
|
|
27
26
|
});
|
|
28
27
|
|
|
29
|
-
export type FertilizerFrequency = keyof typeof FERTILIZER_FREQ;
|
|
30
28
|
|
|
31
29
|
export const FERTILIZER_METHOD = makeCatalog({
|
|
32
30
|
EN_EL_RIEGO: 'Disuelto en riego.',
|
|
@@ -38,4 +36,3 @@ export const FERTILIZER_METHOD = makeCatalog({
|
|
|
38
36
|
NO_APLICA: 'No corresponde.',
|
|
39
37
|
});
|
|
40
38
|
|
|
41
|
-
export type FertilizerMethod = keyof typeof FERTILIZER_METHOD;
|
|
@@ -11,7 +11,6 @@ export const GROWTH_AREA = makeCatalog({
|
|
|
11
11
|
ACUÁTICA: 'Raíces en agua o sustrato inundado.',
|
|
12
12
|
TERRARIO: 'Recinto cerrado, humedad muy alta.',
|
|
13
13
|
});
|
|
14
|
-
export type PlantGrowthArea = keyof typeof GROWTH_AREA;
|
|
15
14
|
|
|
16
15
|
export const GROWTH_HABIT = makeCatalog({
|
|
17
16
|
ERGIDA: 'Porte vertical.',
|
|
@@ -34,4 +33,3 @@ export const GROWTH_HABIT = makeCatalog({
|
|
|
34
33
|
MUSGO: 'Briofita sin raíces.',
|
|
35
34
|
MINI_HELECHO: 'Helecho pequeño.',
|
|
36
35
|
});
|
|
37
|
-
export type PlantGrowthHabit = keyof typeof GROWTH_HABIT;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './climate-ideal';
|
|
2
|
+
export * from './fertilization-info';
|
|
3
|
+
export * from './growth-class';
|
|
4
|
+
export * from './growth-type';
|
|
5
|
+
export * from './humidity-info';
|
|
6
|
+
export * from './light-info';
|
|
7
|
+
export * from './pest-info';
|
|
8
|
+
export * from './plant-size';
|
|
9
|
+
export * from './substrate-info';
|
|
10
|
+
export * from './propagation-method';
|
|
@@ -8,7 +8,6 @@ export const PLANT_PART = makeCatalog({
|
|
|
8
8
|
FRUTOS: 'Frutos.',
|
|
9
9
|
TODA_LA_PLANTA: 'Daño sistémico.',
|
|
10
10
|
});
|
|
11
|
-
export type PlantPart = keyof typeof PLANT_PART;
|
|
12
11
|
|
|
13
12
|
export const CONTROL_METHOD = makeCatalog({
|
|
14
13
|
JABÓN_POTÁSICO: 'Insecticida suave.',
|
|
@@ -22,7 +21,6 @@ export const CONTROL_METHOD = makeCatalog({
|
|
|
22
21
|
CONTROL_BIOLÓGICO: 'Depredadores benéficos.',
|
|
23
22
|
OTRO: 'Otro método.',
|
|
24
23
|
});
|
|
25
|
-
export type ControlMethod = keyof typeof CONTROL_METHOD;
|
|
26
24
|
|
|
27
25
|
export const PEST_TYPE = makeCatalog({
|
|
28
26
|
INSECTO: 'Insectos.',
|
|
@@ -33,4 +31,3 @@ export const PEST_TYPE = makeCatalog({
|
|
|
33
31
|
NEMATODO: 'Nematodos.',
|
|
34
32
|
OTRO: 'Otro.',
|
|
35
33
|
});
|
|
36
|
-
export type PestType = keyof typeof PEST_TYPE;
|