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