test-entity-library-asm 2.7.16 → 2.7.17

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.
@@ -1,6 +1,7 @@
1
1
  import { DiscountCodeCompany } from './DiscountCodeCompany';
2
2
  export declare class ServicePlan {
3
3
  id_service_plan: number;
4
+ name: string;
4
5
  code: string;
5
6
  description: string | null;
6
7
  price: number | null;
@@ -9,5 +10,6 @@ export declare class ServicePlan {
9
10
  type: number;
10
11
  time_periods: string | null;
11
12
  assigned_discount: number | null;
13
+ information_general: any;
12
14
  discount: DiscountCodeCompany | null;
13
15
  }
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ServicePlan = void 0;
13
13
  var typeorm_1 = require("typeorm");
14
14
  var DiscountCodeCompany_1 = require("./DiscountCodeCompany"); // Asegúrate de ajustar el path al modelo correspondiente
15
+ var jsonTransformer_1 = require("../transformers/jsonTransformer");
15
16
  var ServicePlan = /** @class */ (function () {
16
17
  function ServicePlan() {
17
18
  }
@@ -19,6 +20,10 @@ var ServicePlan = /** @class */ (function () {
19
20
  (0, typeorm_1.PrimaryGeneratedColumn)({ name: 'id_service_plan' }),
20
21
  __metadata("design:type", Number)
21
22
  ], ServicePlan.prototype, "id_service_plan", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100 }),
25
+ __metadata("design:type", String)
26
+ ], ServicePlan.prototype, "name", void 0);
22
27
  __decorate([
23
28
  (0, typeorm_1.Column)({ type: 'varchar', length: 100 }),
24
29
  __metadata("design:type", String)
@@ -51,6 +56,10 @@ var ServicePlan = /** @class */ (function () {
51
56
  (0, typeorm_1.Column)({ type: 'int', nullable: true }),
52
57
  __metadata("design:type", Object)
53
58
  ], ServicePlan.prototype, "assigned_discount", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({ type: 'longtext', nullable: true, transformer: jsonTransformer_1.jsonTransformer }),
61
+ __metadata("design:type", Object)
62
+ ], ServicePlan.prototype, "information_general", void 0);
54
63
  __decorate([
55
64
  (0, typeorm_1.ManyToOne)(function () { return DiscountCodeCompany_1.DiscountCodeCompany; }, function (discount) { return discount.servicePlans; }, {
56
65
  onDelete: 'CASCADE',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-entity-library-asm",
3
- "version": "2.7.16",
3
+ "version": "2.7.17",
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,39 +1,52 @@
1
- import { Entity, PrimaryGeneratedColumn, Column, Unique, ManyToOne } from 'typeorm';
2
- import { DiscountCodeCompany } from './DiscountCodeCompany'; // Asegúrate de ajustar el path al modelo correspondiente
1
+ import {
2
+ Entity,
3
+ PrimaryGeneratedColumn,
4
+ Column,
5
+ Unique,
6
+ ManyToOne,
7
+ } from 'typeorm'
8
+ import { DiscountCodeCompany } from './DiscountCodeCompany' // Asegúrate de ajustar el path al modelo correspondiente
9
+ import { jsonTransformer } from '../transformers/jsonTransformer'
3
10
 
4
11
  @Entity('service_plan')
5
12
  @Unique(['code'])
6
13
  export class ServicePlan {
7
14
  @PrimaryGeneratedColumn({ name: 'id_service_plan' })
8
- id_service_plan: number;
15
+ id_service_plan: number
9
16
 
10
17
  @Column({ type: 'varchar', length: 100 })
11
- code: string;
18
+ name: string
19
+
20
+ @Column({ type: 'varchar', length: 100 })
21
+ code: string
12
22
 
13
23
  @Column({ type: 'varchar', length: 450, nullable: true })
14
- description: string | null;
24
+ description: string | null
15
25
 
16
26
  @Column({ type: 'float', nullable: true })
17
- price: number | null;
27
+ price: number | null
18
28
 
19
29
  @Column({ type: 'varchar', length: 10, nullable: true })
20
- currency: string | null;
30
+ currency: string | null
21
31
 
22
32
  @Column({ type: 'int', default: 1 })
23
- status: number;
33
+ status: number
24
34
 
25
35
  @Column({ type: 'int' })
26
- type: number;
36
+ type: number
27
37
 
28
38
  @Column({ type: 'text', nullable: true })
29
- time_periods: string | null;
39
+ time_periods: string | null
30
40
 
31
41
  @Column({ type: 'int', nullable: true })
32
- assigned_discount: number | null;
42
+ assigned_discount: number | null
43
+
44
+ @Column({ type: 'longtext', nullable: true, transformer: jsonTransformer })
45
+ information_general: any
33
46
 
34
47
  @ManyToOne(() => DiscountCodeCompany, (discount) => discount.servicePlans, {
35
48
  onDelete: 'CASCADE',
36
49
  onUpdate: 'CASCADE',
37
50
  })
38
- discount: DiscountCodeCompany | null;
39
- }
51
+ discount: DiscountCodeCompany | null
52
+ }