proflores-db-model 0.2.47 → 0.2.48

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.
@@ -2,6 +2,18 @@ import { ObjectLiteral } from "typeorm";
2
2
  import { UnitOfMeasure } from "../../entities/UnitOfMesure";
3
3
  import { Apu } from "./Apu";
4
4
  import { BudgetItem } from "./BudgetItem";
5
+ export declare enum ConceptCategory {
6
+ JARDINERIA = "JAR",
7
+ RIEGO = "RIE",
8
+ OBRAS_CIVILES = "OBR",
9
+ MOBILIARIO = "MOB",
10
+ TERRACERIAS = "TER",
11
+ MANTENIMIENTO = "MAN",
12
+ MATERIALES = "MAT",
13
+ MANO_DE_OBRA = "LAB",
14
+ HERRAMIENTAS = "TOOL",
15
+ FERTILIZACION = "FER"
16
+ }
5
17
  export declare class Concept implements ObjectLiteral {
6
18
  idConcept: number;
7
19
  code?: string | null;
@@ -10,7 +22,7 @@ export declare class Concept implements ObjectLiteral {
10
22
  unit: UnitOfMeasure;
11
23
  satClave?: string | null;
12
24
  satUnit?: string | null;
13
- category?: string | null;
25
+ category?: ConceptCategory | null;
14
26
  isActive: boolean;
15
27
  apus?: Apu[];
16
28
  budgetItems?: BudgetItem[];
@@ -9,12 +9,25 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.Concept = void 0;
12
+ exports.Concept = exports.ConceptCategory = void 0;
13
13
  // apu/entities/Concept.ts
14
14
  const typeorm_1 = require("typeorm");
15
15
  const UnitOfMesure_1 = require("../../entities/UnitOfMesure"); // <-- ajusta tu ruta real
16
16
  const Apu_1 = require("./Apu");
17
17
  const BudgetItem_1 = require("./BudgetItem");
18
+ var ConceptCategory;
19
+ (function (ConceptCategory) {
20
+ ConceptCategory["JARDINERIA"] = "JAR";
21
+ ConceptCategory["RIEGO"] = "RIE";
22
+ ConceptCategory["OBRAS_CIVILES"] = "OBR";
23
+ ConceptCategory["MOBILIARIO"] = "MOB";
24
+ ConceptCategory["TERRACERIAS"] = "TER";
25
+ ConceptCategory["MANTENIMIENTO"] = "MAN";
26
+ ConceptCategory["MATERIALES"] = "MAT";
27
+ ConceptCategory["MANO_DE_OBRA"] = "LAB";
28
+ ConceptCategory["HERRAMIENTAS"] = "TOOL";
29
+ ConceptCategory["FERTILIZACION"] = "FER";
30
+ })(ConceptCategory || (exports.ConceptCategory = ConceptCategory = {}));
18
31
  let Concept = class Concept {
19
32
  };
20
33
  exports.Concept = Concept;
@@ -48,7 +61,11 @@ __decorate([
48
61
  __metadata("design:type", Object)
49
62
  ], Concept.prototype, "satUnit", void 0);
50
63
  __decorate([
51
- (0, typeorm_1.Column)("varchar", { length: 64, nullable: true }),
64
+ (0, typeorm_1.Column)({
65
+ type: "enum",
66
+ enum: ConceptCategory,
67
+ nullable: true
68
+ }),
52
69
  __metadata("design:type", Object)
53
70
  ], Concept.prototype, "category", void 0);
54
71
  __decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proflores-db-model",
3
- "version": "0.2.47",
3
+ "version": "0.2.48",
4
4
  "description": "Data model for managing expenses and transactions for Proflores nursery business",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -6,6 +6,19 @@ import { UnitOfMeasure } from "../../entities/UnitOfMesure"; // <-- ajusta tu ru
6
6
  import { Apu } from "./Apu";
7
7
  import { BudgetItem } from "./BudgetItem";
8
8
 
9
+ export enum ConceptCategory {
10
+ JARDINERIA = "JAR",
11
+ RIEGO = "RIE",
12
+ OBRAS_CIVILES = "OBR",
13
+ MOBILIARIO = "MOB",
14
+ TERRACERIAS = "TER",
15
+ MANTENIMIENTO = "MAN",
16
+ MATERIALES = "MAT",
17
+ MANO_DE_OBRA = "LAB",
18
+ HERRAMIENTAS = "TOOL",
19
+ FERTILIZACION = "FER"
20
+ }
21
+
9
22
  @Entity("concepts")
10
23
  @Index(["code"], { unique: true })
11
24
  export class Concept implements ObjectLiteral {
@@ -31,8 +44,12 @@ export class Concept implements ObjectLiteral {
31
44
  @Column("varchar", { length: 64, nullable: true })
32
45
  satUnit?: string | null;
33
46
 
34
- @Column("varchar", { length: 64, nullable: true })
35
- category?: string | null;
47
+ @Column({
48
+ type: "enum",
49
+ enum: ConceptCategory,
50
+ nullable: true
51
+ })
52
+ category?: ConceptCategory | null;
36
53
 
37
54
  @Column({ type: "boolean", default: true })
38
55
  isActive!: boolean;