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.
- package/dist/entities/Bank/BankAccount.js +2 -2
- package/dist/entities/Bank/TransactionBank.js +2 -2
- package/dist/entities/BranchImage.js +2 -2
- package/dist/entities/Branches.js +2 -2
- package/dist/entities/CategoryForCosting.js +2 -2
- package/dist/entities/CategoryForPlantType.js +2 -2
- package/dist/entities/ContainerType.js +2 -2
- package/dist/entities/ExpenseDetail.js +2 -2
- package/dist/entities/ExpenseTransaction.js +2 -2
- package/dist/entities/ExpenseType.js +2 -2
- package/dist/entities/Inventory.d.ts +2 -0
- package/dist/entities/Inventory.js +7 -2
- package/dist/entities/InventoryImage.js +2 -2
- package/dist/entities/InventoryItem.js +2 -2
- package/dist/entities/InventoryMovement.d.ts +15 -0
- package/dist/entities/InventoryMovement.js +67 -0
- package/dist/entities/ProductImage.js +2 -2
- package/dist/entities/Products.js +2 -2
- package/dist/entities/ProjectOrder.js +2 -2
- package/dist/entities/SupplierImage.js +2 -2
- package/dist/entities/Suppliers.js +2 -2
- package/dist/entities/UnitOfMesure.js +2 -2
- package/dist/entities/User.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -1
- package/dist/models/technical-sheet/CareInstructions.d.ts +16 -0
- package/dist/models/technical-sheet/CareInstructions.js +68 -0
- package/dist/models/technical-sheet/ClimateIdeal.d.ts +11 -0
- package/dist/models/technical-sheet/ClimateIdeal.js +48 -0
- package/dist/models/technical-sheet/FertilizationInfo.d.ts +20 -0
- package/dist/models/technical-sheet/FertilizationInfo.js +64 -0
- package/dist/models/technical-sheet/GrowthClassInfo.d.ts +15 -0
- package/dist/models/technical-sheet/GrowthClassInfo.js +49 -0
- package/dist/models/technical-sheet/HumidityInfo.d.ts +10 -0
- package/dist/models/technical-sheet/HumidityInfo.js +44 -0
- package/dist/models/technical-sheet/ImageInfo.d.ts +29 -0
- package/dist/models/technical-sheet/ImageInfo.js +134 -0
- package/dist/models/technical-sheet/LightInfo.d.ts +10 -0
- package/dist/models/technical-sheet/LightInfo.js +44 -0
- package/dist/models/technical-sheet/PestInfo.d.ts +18 -0
- package/dist/models/technical-sheet/PestInfo.js +76 -0
- package/dist/models/technical-sheet/PlantGrowthType.d.ts +15 -0
- package/dist/models/technical-sheet/PlantGrowthType.js +53 -0
- package/dist/models/technical-sheet/PlantSize.d.ts +14 -0
- package/dist/models/technical-sheet/PlantSize.js +62 -0
- package/dist/models/technical-sheet/PlantTechnicalSheet.d.ts +33 -0
- package/dist/models/technical-sheet/PlantTechnicalSheet.js +117 -0
- package/dist/models/technical-sheet/PropagationMethodInfo.d.ts +12 -0
- package/dist/models/technical-sheet/PropagationMethodInfo.js +52 -0
- package/dist/models/technical-sheet/SubstrateInfo.d.ts +13 -0
- package/dist/models/technical-sheet/SubstrateInfo.js +58 -0
- package/dist/models/technical-sheet/catalogs/climate-ideal.d.ts +11 -0
- package/dist/models/technical-sheet/catalogs/climate-ideal.js +14 -0
- package/dist/models/technical-sheet/catalogs/fertilization-info.d.ts +34 -0
- package/dist/models/technical-sheet/catalogs/fertilization-info.js +35 -0
- package/dist/models/technical-sheet/catalogs/growth-class.d.ts +10 -0
- package/dist/models/technical-sheet/catalogs/growth-class.js +14 -0
- package/dist/models/technical-sheet/catalogs/growth-type.d.ts +32 -0
- package/dist/models/technical-sheet/catalogs/growth-type.js +35 -0
- package/dist/models/technical-sheet/catalogs/humidity-info.d.ts +9 -0
- package/dist/models/technical-sheet/catalogs/humidity-info.js +12 -0
- package/dist/models/technical-sheet/catalogs/light-info.d.ts +9 -0
- package/dist/models/technical-sheet/catalogs/light-info.js +13 -0
- package/dist/models/technical-sheet/catalogs/pest-info.d.ts +32 -0
- package/dist/models/technical-sheet/catalogs/pest-info.js +33 -0
- package/dist/models/technical-sheet/catalogs/plant-size.d.ts +11 -0
- package/dist/models/technical-sheet/catalogs/plant-size.js +15 -0
- package/dist/models/technical-sheet/catalogs/propagation-method.d.ts +14 -0
- package/dist/models/technical-sheet/catalogs/propagation-method.js +18 -0
- package/dist/models/technical-sheet/catalogs/substrate-info.d.ts +17 -0
- package/dist/models/technical-sheet/catalogs/substrate-info.js +21 -0
- package/dist/models/technical-sheet/index.d.ts +13 -0
- package/dist/models/technical-sheet/index.js +29 -0
- package/dist/models/technical-sheet/utils/enumColumn.d.ts +6 -0
- package/dist/models/technical-sheet/utils/enumColumn.js +12 -0
- package/dist/models/technical-sheet/utils/makeCatalog.d.ts +8 -0
- package/dist/models/technical-sheet/utils/makeCatalog.js +19 -0
- package/dist/types/MovementType.d.ts +7 -0
- package/dist/types/MovementType.js +11 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +3 -0
- package/package.json +5 -5
- package/src/entities/Inventory.ts +5 -0
- package/src/entities/InventoryMovement.ts +52 -0
- package/src/index.ts +2 -0
- package/src/models/technical-sheet/CareInstructions.ts +52 -0
- package/src/models/technical-sheet/ClimateIdeal.ts +34 -0
- package/src/models/technical-sheet/FertilizationInfo.ts +59 -0
- package/src/models/technical-sheet/GrowthClassInfo.ts +38 -0
- package/src/models/technical-sheet/HumidityInfo.ts +31 -0
- package/src/models/technical-sheet/ImageInfo.ts +111 -0
- package/src/models/technical-sheet/LightInfo.ts +31 -0
- package/src/models/technical-sheet/PestInfo.ts +65 -0
- package/src/models/technical-sheet/PlantGrowthType.ts +41 -0
- package/src/models/technical-sheet/PlantSize.ts +48 -0
- package/src/models/technical-sheet/PlantTechnicalSheet.ts +93 -0
- package/src/models/technical-sheet/PropagationMethodInfo.ts +37 -0
- package/src/models/technical-sheet/SubstrateInfo.ts +45 -0
- package/src/models/technical-sheet/catalogs/climate-ideal.ts +16 -0
- package/src/models/technical-sheet/catalogs/fertilization-info.ts +41 -0
- package/src/models/technical-sheet/catalogs/growth-class.ts +14 -0
- package/src/models/technical-sheet/catalogs/growth-type.ts +37 -0
- package/src/models/technical-sheet/catalogs/humidity-info.ts +12 -0
- package/src/models/technical-sheet/catalogs/light-info.ts +13 -0
- package/src/models/technical-sheet/catalogs/pest-info.ts +36 -0
- package/src/models/technical-sheet/catalogs/plant-size.ts +15 -0
- package/src/models/technical-sheet/catalogs/propagation-method.ts +18 -0
- package/src/models/technical-sheet/catalogs/substrate-info.ts +21 -0
- package/src/models/technical-sheet/index.ts +14 -0
- package/src/models/technical-sheet/utils/enumColumn.ts +17 -0
- package/src/models/technical-sheet/utils/makeCatalog.ts +17 -0
- package/src/types/MovementType.ts +7 -0
- package/src/types/index.ts +1 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/models/technical-sheet/catalogs/propagation-method.ts
|
|
2
|
+
import { makeCatalog } from '../utils/makeCatalog';
|
|
3
|
+
|
|
4
|
+
export const PROPAGATION = makeCatalog({
|
|
5
|
+
ESQUEJE_TALLO: 'Corte de tallo.',
|
|
6
|
+
ESQUEJE_HOJA: 'Esqueje de hoja.',
|
|
7
|
+
ESQUEJE_RAÍZ: 'Fragmento de raíz.',
|
|
8
|
+
SEMILLA: 'Propagación sexual.',
|
|
9
|
+
DIVISIÓN_MATA: 'División de mata.',
|
|
10
|
+
ACODO_SIMPLE: 'Acodo simple.',
|
|
11
|
+
ACODO_AÉREO: 'Acodo aéreo.',
|
|
12
|
+
IN_VITRO: 'Cultivo in vitro.',
|
|
13
|
+
BULBO_RIZOMA_TUBÉRCULO: 'Ãrgano subterráneo.',
|
|
14
|
+
HIJUELOS: 'Brotes basales.',
|
|
15
|
+
NO_APLICA: 'No aplicable.',
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export type PropagationMethod = keyof typeof PROPAGATION;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/models/technical-sheet/catalogs/substrate-info.ts
|
|
2
|
+
import { makeCatalog } from '../utils/makeCatalog';
|
|
3
|
+
|
|
4
|
+
export const SUBSTRATE = makeCatalog({
|
|
5
|
+
UNIVERSAL: 'Mezcla equilibrada.',
|
|
6
|
+
INTERIOR_LIGERO: 'Turba + perlita.',
|
|
7
|
+
CACTUS_SUCULENTAS: 'Arena + grava, baja materia orgánica.',
|
|
8
|
+
ORQUÍDEAS_EPÍFITAS: 'Corteza gruesa + carbón.',
|
|
9
|
+
BROMELIAS: 'Fibra coco + corteza.',
|
|
10
|
+
ACUÁTICO: 'Arcilla y arena sumergida.',
|
|
11
|
+
HELECHOS_HUMEDOS: 'Turba + musgo esfagno.',
|
|
12
|
+
SEMILLERO: 'Turba fina esterilizada.',
|
|
13
|
+
BONSAI: 'Akadama + kiryuzuna + grava.',
|
|
14
|
+
HIDROPONÍA: 'Sustrato inerte.',
|
|
15
|
+
ARENA_GRAVILLA: '100 % mineral.',
|
|
16
|
+
FIBRA_COCO_PURA: 'Coco hidratado.',
|
|
17
|
+
TURBA: 'Turba rubia o negra.',
|
|
18
|
+
COMPOST_HOJARASCA: 'Orgánico descompuesto.',
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export type SubstrateType = keyof typeof SUBSTRATE;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './PlantTechnicalSheet';
|
|
2
|
+
export * from './GrowthClassInfo';
|
|
3
|
+
export * from './CareInstructions';
|
|
4
|
+
export * from './ImageInfo';
|
|
5
|
+
export * from './LightInfo';
|
|
6
|
+
export * from './HumidityInfo';
|
|
7
|
+
export * from './PestInfo';
|
|
8
|
+
export * from './PlantGrowthType';
|
|
9
|
+
export * from './PlantSize';
|
|
10
|
+
export * from './SubstrateInfo';
|
|
11
|
+
export * from './ClimateIdeal';
|
|
12
|
+
export * from './FertilizationInfo';
|
|
13
|
+
export * from './PropagationMethodInfo';
|
|
14
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/models/technical-sheet/utils/enumColumn.ts
|
|
2
|
+
import { ColumnOptions, Column } from "typeorm";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Utilidad para columnas enum basadas en catálogos TypeScript.
|
|
6
|
+
* Permite usar `keyof typeof ENUM` como tipo en la entidad.
|
|
7
|
+
*/
|
|
8
|
+
export function EnumColumn<T extends string>(
|
|
9
|
+
values: readonly T[],
|
|
10
|
+
options: Omit<ColumnOptions, "type" | "enum"> = {}
|
|
11
|
+
): PropertyDecorator {
|
|
12
|
+
return Column({
|
|
13
|
+
type: "enum",
|
|
14
|
+
enum: values,
|
|
15
|
+
...options,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* =============================================================================
|
|
2
|
+
* UTILITY ───────────── makeCatalog
|
|
3
|
+
* ---------------------------------------------------------------------------
|
|
4
|
+
* Crea un Record<K, string> inmutable para catálogos
|
|
5
|
+
* y permite derivar tipos clave (keyof).
|
|
6
|
+
* ===========================================================================*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Define un catálogo estático e inmutable y devuelve el mismo objeto.
|
|
10
|
+
* TypeScript infiere correctamente los tipos de clave.
|
|
11
|
+
*
|
|
12
|
+
* @param c Objeto Record<string, string> que representa el catálogo
|
|
13
|
+
* @returns El mismo objeto `c`, como constante tipada
|
|
14
|
+
*/
|
|
15
|
+
export function makeCatalog<C extends Record<string, string>>(c: C): C {
|
|
16
|
+
return c;
|
|
17
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -2,3 +2,4 @@ export { ExpenseTransactionType } from "./ExpenseTransactionType";
|
|
|
2
2
|
export { ExpenseDetailType } from "./ExpenseDetailType";
|
|
3
3
|
export { ExpenseTypeType } from "./ExpenseTypeType";
|
|
4
4
|
export { ProjectOrderType } from "./ProjectOrderType";
|
|
5
|
+
export { MovementType } from "./MovementType";
|