proflores-db-model 0.2.46 → 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.
package/dist/index.d.ts CHANGED
@@ -19,6 +19,8 @@ export { Branch } from "./entities/Branches";
19
19
  export { BranchImage } from "./entities/BranchImage";
20
20
  export { SupplierImage } from "./entities/SupplierImage";
21
21
  export { InventoryImage } from "./entities/InventoryImage";
22
+ export { Payment } from "./entities/Payment";
23
+ export { PaymentCfdi } from "./entities/PaymentCfdi";
22
24
  export * from "./types";
23
25
  export * from "./models/technical-sheet";
24
26
  export * from "./models/apu";
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.InventoryImage = exports.SupplierImage = exports.BranchImage = exports.Branch = exports.InventoryMovement = exports.Inventory = exports.Product = exports.ProductImage = exports.TransactionBank = exports.BankAccount = exports.UnitOfMeasure = exports.CategoryForPlantType = exports.CategoryForCosting = exports.Supplier = exports.ContainerType = exports.InventoryItem = exports.ExpenseTransaction = exports.User = exports.ProjectOrder = exports.ExpenseType = exports.ExpenseDetail = void 0;
17
+ exports.PaymentCfdi = exports.Payment = exports.InventoryImage = exports.SupplierImage = exports.BranchImage = exports.Branch = exports.InventoryMovement = exports.Inventory = exports.Product = exports.ProductImage = exports.TransactionBank = exports.BankAccount = exports.UnitOfMeasure = exports.CategoryForPlantType = exports.CategoryForCosting = exports.Supplier = exports.ContainerType = exports.InventoryItem = exports.ExpenseTransaction = exports.User = exports.ProjectOrder = exports.ExpenseType = exports.ExpenseDetail = void 0;
18
18
  var ExpenseDetail_1 = require("./entities/ExpenseDetail");
19
19
  Object.defineProperty(exports, "ExpenseDetail", { enumerable: true, get: function () { return ExpenseDetail_1.ExpenseDetail; } });
20
20
  var ExpenseType_1 = require("./entities/ExpenseType");
@@ -57,6 +57,10 @@ var SupplierImage_1 = require("./entities/SupplierImage");
57
57
  Object.defineProperty(exports, "SupplierImage", { enumerable: true, get: function () { return SupplierImage_1.SupplierImage; } });
58
58
  var InventoryImage_1 = require("./entities/InventoryImage");
59
59
  Object.defineProperty(exports, "InventoryImage", { enumerable: true, get: function () { return InventoryImage_1.InventoryImage; } });
60
+ var Payment_1 = require("./entities/Payment");
61
+ Object.defineProperty(exports, "Payment", { enumerable: true, get: function () { return Payment_1.Payment; } });
62
+ var PaymentCfdi_1 = require("./entities/PaymentCfdi");
63
+ Object.defineProperty(exports, "PaymentCfdi", { enumerable: true, get: function () { return PaymentCfdi_1.PaymentCfdi; } });
60
64
  __exportStar(require("./types"), exports);
61
65
  __exportStar(require("./models/technical-sheet"), exports);
62
66
  __exportStar(require("./models/apu"), exports);
@@ -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.46",
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",
package/src/index.ts CHANGED
@@ -19,6 +19,8 @@ export { Branch } from "./entities/Branches";
19
19
  export { BranchImage } from "./entities/BranchImage";
20
20
  export { SupplierImage } from "./entities/SupplierImage";
21
21
  export { InventoryImage } from "./entities/InventoryImage";
22
+ export { Payment } from "./entities/Payment";
23
+ export { PaymentCfdi } from "./entities/PaymentCfdi";
22
24
 
23
25
  export * from "./types";
24
26
  export * from "./models/technical-sheet";
@@ -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;