test-entity-library-asm 2.7.20 → 2.8.0
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/entities/DiscountCodeCompany.d.ts +0 -2
- package/dist/entities/DiscountCodeCompany.js +0 -5
- package/dist/entities/ServicePlan.d.ts +0 -2
- package/dist/entities/ServicePlan.js +1 -10
- package/package.json +1 -1
- package/src/entities/DiscountCodeCompany.ts +0 -3
- package/src/entities/ServicePlan.ts +1 -9
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CodeRedemptionHistoryCompany } from './CodeRedemptionHistoryCompany';
|
|
2
2
|
import { Master } from './Master';
|
|
3
|
-
import { ServicePlan } from './ServicePlan';
|
|
4
3
|
export declare class DiscountCodeCompany {
|
|
5
4
|
id: number;
|
|
6
5
|
code: string;
|
|
@@ -16,5 +15,4 @@ export declare class DiscountCodeCompany {
|
|
|
16
15
|
status: number;
|
|
17
16
|
updated_by: Master;
|
|
18
17
|
code_redemptions_history_company: CodeRedemptionHistoryCompany[];
|
|
19
|
-
servicePlans: ServicePlan[];
|
|
20
18
|
}
|
|
@@ -15,7 +15,6 @@ var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
|
15
15
|
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
16
16
|
var CodeRedemptionHistoryCompany_1 = require("./CodeRedemptionHistoryCompany");
|
|
17
17
|
var Master_1 = require("./Master");
|
|
18
|
-
var ServicePlan_1 = require("./ServicePlan");
|
|
19
18
|
var DiscountCodeCompany = /** @class */ (function () {
|
|
20
19
|
function DiscountCodeCompany() {
|
|
21
20
|
}
|
|
@@ -116,10 +115,6 @@ var DiscountCodeCompany = /** @class */ (function () {
|
|
|
116
115
|
}),
|
|
117
116
|
__metadata("design:type", Array)
|
|
118
117
|
], DiscountCodeCompany.prototype, "code_redemptions_history_company", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
(0, typeorm_1.OneToMany)(function () { return ServicePlan_1.ServicePlan; }, function (servicePlan) { return servicePlan.discount; }),
|
|
121
|
-
__metadata("design:type", Array)
|
|
122
|
-
], DiscountCodeCompany.prototype, "servicePlans", void 0);
|
|
123
118
|
DiscountCodeCompany = __decorate([
|
|
124
119
|
(0, typeorm_1.Entity)('discount_code_company', {
|
|
125
120
|
comment: 'Códigos de descuento para las empresas.',
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DiscountCodeCompany } from './DiscountCodeCompany';
|
|
2
1
|
import { Master } from './Master';
|
|
3
2
|
export declare class ServicePlan {
|
|
4
3
|
id_service_plan: number;
|
|
@@ -14,6 +13,5 @@ export declare class ServicePlan {
|
|
|
14
13
|
information_general: any;
|
|
15
14
|
created: Date;
|
|
16
15
|
updated: Date;
|
|
17
|
-
discount: DiscountCodeCompany | null;
|
|
18
16
|
updated_by: Master;
|
|
19
17
|
}
|
|
@@ -11,7 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ServicePlan = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
|
-
var DiscountCodeCompany_1 = require("./DiscountCodeCompany"); // Asegúrate de ajustar el path al modelo correspondiente
|
|
15
14
|
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
16
15
|
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
17
16
|
var Master_1 = require("./Master");
|
|
@@ -55,7 +54,7 @@ var ServicePlan = /** @class */ (function () {
|
|
|
55
54
|
__metadata("design:type", Object)
|
|
56
55
|
], ServicePlan.prototype, "time_periods", void 0);
|
|
57
56
|
__decorate([
|
|
58
|
-
(0, typeorm_1.Column)({ type: '
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'float', nullable: true }),
|
|
59
58
|
__metadata("design:type", Object)
|
|
60
59
|
], ServicePlan.prototype, "assigned_discount", void 0);
|
|
61
60
|
__decorate([
|
|
@@ -78,14 +77,6 @@ var ServicePlan = /** @class */ (function () {
|
|
|
78
77
|
}),
|
|
79
78
|
__metadata("design:type", Date)
|
|
80
79
|
], ServicePlan.prototype, "updated", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
(0, typeorm_1.ManyToOne)(function () { return DiscountCodeCompany_1.DiscountCodeCompany; }, function (discount) { return discount.servicePlans; }, {
|
|
83
|
-
onDelete: 'CASCADE',
|
|
84
|
-
onUpdate: 'CASCADE',
|
|
85
|
-
}),
|
|
86
|
-
(0, typeorm_1.JoinColumn)({ name: 'assigned_discount' }),
|
|
87
|
-
__metadata("design:type", Object)
|
|
88
|
-
], ServicePlan.prototype, "discount", void 0);
|
|
89
80
|
__decorate([
|
|
90
81
|
(0, typeorm_1.ManyToOne)(function () { return Master_1.Master; }, function (master) { return master.id; }, {
|
|
91
82
|
onDelete: 'SET NULL',
|
package/package.json
CHANGED
|
@@ -105,7 +105,4 @@ export class DiscountCodeCompany {
|
|
|
105
105
|
codeRedemptionHistoryCompany.discount_code_company
|
|
106
106
|
)
|
|
107
107
|
code_redemptions_history_company: CodeRedemptionHistoryCompany[]
|
|
108
|
-
|
|
109
|
-
@OneToMany(() => ServicePlan, (servicePlan) => servicePlan.discount)
|
|
110
|
-
servicePlans: ServicePlan[];
|
|
111
108
|
}
|
|
@@ -41,7 +41,7 @@ export class ServicePlan {
|
|
|
41
41
|
@Column({ type: 'text', nullable: true })
|
|
42
42
|
time_periods: string | null
|
|
43
43
|
|
|
44
|
-
@Column({ type: '
|
|
44
|
+
@Column({ type: 'float', nullable: true })
|
|
45
45
|
assigned_discount: number | null
|
|
46
46
|
|
|
47
47
|
@Column({ type: 'longtext', nullable: true, transformer: jsonTransformer })
|
|
@@ -61,14 +61,6 @@ export class ServicePlan {
|
|
|
61
61
|
})
|
|
62
62
|
updated: Date
|
|
63
63
|
|
|
64
|
-
@ManyToOne(() => DiscountCodeCompany, (discount) => discount.servicePlans, {
|
|
65
|
-
onDelete: 'CASCADE',
|
|
66
|
-
onUpdate: 'CASCADE',
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
@JoinColumn({ name: 'assigned_discount' })
|
|
70
|
-
discount: DiscountCodeCompany | null;
|
|
71
|
-
|
|
72
64
|
@ManyToOne(() => Master, (master) => master.id, {
|
|
73
65
|
onDelete: 'SET NULL',
|
|
74
66
|
onUpdate: 'CASCADE',
|