test-entity-library-asm 3.1.0 → 3.1.2

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.
@@ -3,7 +3,7 @@ export declare class ToppingImage {
3
3
  id: number;
4
4
  name: string;
5
5
  filter: string;
6
- image: string;
6
+ image: any;
7
7
  status: number;
8
8
  topping_images: ProductGroupComplement[];
9
9
  }
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ToppingImage = void 0;
13
13
  var typeorm_1 = require("typeorm");
14
14
  var __1 = require("..");
15
+ var jsonTransformer_1 = require("../transformers/jsonTransformer");
15
16
  var ToppingImage = /** @class */ (function () {
16
17
  function ToppingImage() {
17
18
  }
@@ -39,9 +40,10 @@ var ToppingImage = /** @class */ (function () {
39
40
  __decorate([
40
41
  (0, typeorm_1.Column)({
41
42
  type: "text",
43
+ transformer: jsonTransformer_1.jsonTransformer,
42
44
  comment: "Campo de tipo JSON para guardar la imagen.",
43
45
  }),
44
- __metadata("design:type", String)
46
+ __metadata("design:type", Object)
45
47
  ], ToppingImage.prototype, "image", void 0);
46
48
  __decorate([
47
49
  (0, typeorm_1.Column)({
@@ -1,6 +1,6 @@
1
+ import { ToppingImage } from "..";
1
2
  import { ProductGroup } from "./ProductGroup";
2
3
  import { RequestProductGroupComplement } from "./RequestProductGroupComplement";
3
- import { ToppingImage } from "..";
4
4
  export declare class ProductGroupComplement {
5
5
  id: number;
6
6
  group_id: ProductGroup;
@@ -11,6 +11,7 @@ export declare class ProductGroupComplement {
11
11
  position: number;
12
12
  current_values: any;
13
13
  status: number;
14
+ inactive_until: Date;
14
15
  status_review: number;
15
16
  review_comment: string;
16
17
  request_product_group_complements: RequestProductGroupComplement[];
@@ -11,10 +11,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ProductGroupComplement = void 0;
13
13
  var typeorm_1 = require("typeorm");
14
- var ProductGroup_1 = require("./ProductGroup");
15
- var RequestProductGroupComplement_1 = require("./RequestProductGroupComplement");
16
14
  var __1 = require("..");
17
15
  var jsonTransformer_1 = require("../transformers/jsonTransformer");
16
+ var ProductGroup_1 = require("./ProductGroup");
17
+ var RequestProductGroupComplement_1 = require("./RequestProductGroupComplement");
18
18
  var ProductGroupComplement = /** @class */ (function () {
19
19
  function ProductGroupComplement() {
20
20
  }
@@ -75,6 +75,14 @@ var ProductGroupComplement = /** @class */ (function () {
75
75
  }),
76
76
  __metadata("design:type", Number)
77
77
  ], ProductGroupComplement.prototype, "status", void 0);
78
+ __decorate([
79
+ (0, typeorm_1.Column)({
80
+ type: "date",
81
+ nullable: true,
82
+ comment: "Cuando un complemento se inactiva, existe la opción de hacerlo por:\r\n1. Un solo día: El elemento no estará disponible hasta las 00:00 del siguiente día (Se guarda un elemento de tipo fecha).\r\n2. Fecha personalizada: Se puede escoger la fecha en la que el elemento estará activo (Se guarda un elemento de tipo fecha).\r\n3. Indefinidamente: El elemento estará inactivo hasta que se vuelva a activar (El campo inactive_until estará vacío).",
83
+ }),
84
+ __metadata("design:type", Date)
85
+ ], ProductGroupComplement.prototype, "inactive_until", void 0);
78
86
  __decorate([
79
87
  (0, typeorm_1.Column)({
80
88
  default: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-entity-library-asm",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "description": "Entidades de ejemplo para una base de datos",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,6 +1,7 @@
1
1
  import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm";
2
2
  import { City } from "./City";
3
3
  import { ProductGroupComplement } from "..";
4
+ import { jsonTransformer } from "../transformers/jsonTransformer";
4
5
 
5
6
  @Entity("topping_image", {
6
7
  comment:
@@ -27,9 +28,10 @@ export class ToppingImage {
27
28
 
28
29
  @Column({
29
30
  type: "text",
31
+ transformer: jsonTransformer,
30
32
  comment: "Campo de tipo JSON para guardar la imagen.",
31
33
  })
32
- image: string;
34
+ image: any;
33
35
 
34
36
  @Column({
35
37
  default: 1,
@@ -1,16 +1,15 @@
1
1
  import {
2
- Entity,
3
2
  Column,
4
- PrimaryGeneratedColumn,
5
- ManyToOne,
3
+ Entity,
6
4
  JoinColumn,
7
- BaseEntity,
5
+ ManyToOne,
8
6
  OneToMany,
7
+ PrimaryGeneratedColumn,
9
8
  } from "typeorm";
10
- import { ProductGroup } from "./ProductGroup";
11
- import { RequestProductGroupComplement } from "./RequestProductGroupComplement";
12
9
  import { ToppingImage } from "..";
13
10
  import { jsonTransformer } from "../transformers/jsonTransformer";
11
+ import { ProductGroup } from "./ProductGroup";
12
+ import { RequestProductGroupComplement } from "./RequestProductGroupComplement";
14
13
 
15
14
  @Entity("product_group_complement", {
16
15
  comment:
@@ -76,6 +75,14 @@ export class ProductGroupComplement {
76
75
  })
77
76
  status: number;
78
77
 
78
+ @Column({
79
+ type: "date",
80
+ nullable: true,
81
+ comment:
82
+ "Cuando un complemento se inactiva, existe la opción de hacerlo por:\r\n1. Un solo día: El elemento no estará disponible hasta las 00:00 del siguiente día (Se guarda un elemento de tipo fecha).\r\n2. Fecha personalizada: Se puede escoger la fecha en la que el elemento estará activo (Se guarda un elemento de tipo fecha).\r\n3. Indefinidamente: El elemento estará inactivo hasta que se vuelva a activar (El campo inactive_until estará vacío).",
83
+ })
84
+ inactive_until: Date;
85
+
79
86
  @Column({
80
87
  default: 1,
81
88
  comment: