test-entity-library-asm 2.7.19 → 2.7.20

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.
@@ -0,0 +1,7 @@
1
+ import { ServicePlan } from './ServicePlan';
2
+ import { DiscountCodeCompany } from './DiscountCodeCompany';
3
+ export declare class ServiceDiscountsPlan {
4
+ id: number;
5
+ servicePlan: ServicePlan | null;
6
+ discount: DiscountCodeCompany | null;
7
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ServiceDiscountsPlan = void 0;
13
+ var typeorm_1 = require("typeorm");
14
+ var ServicePlan_1 = require("./ServicePlan");
15
+ var DiscountCodeCompany_1 = require("./DiscountCodeCompany");
16
+ var ServiceDiscountsPlan = /** @class */ (function () {
17
+ function ServiceDiscountsPlan() {
18
+ }
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
21
+ __metadata("design:type", Number)
22
+ ], ServiceDiscountsPlan.prototype, "id", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.ManyToOne)(function () { return ServicePlan_1.ServicePlan; }, function (servicePlan) { return servicePlan.id_service_plan; }, {
25
+ onDelete: 'CASCADE',
26
+ onUpdate: 'CASCADE',
27
+ }),
28
+ (0, typeorm_1.JoinColumn)({ name: 'id_service_plan' }),
29
+ __metadata("design:type", Object)
30
+ ], ServiceDiscountsPlan.prototype, "servicePlan", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.ManyToOne)(function () { return DiscountCodeCompany_1.DiscountCodeCompany; }, function (discountCodeCompany) { return discountCodeCompany.discount; }, {
33
+ onDelete: 'CASCADE',
34
+ onUpdate: 'CASCADE',
35
+ }),
36
+ (0, typeorm_1.JoinColumn)({ name: 'id_discount' }),
37
+ __metadata("design:type", Object)
38
+ ], ServiceDiscountsPlan.prototype, "discount", void 0);
39
+ ServiceDiscountsPlan = __decorate([
40
+ (0, typeorm_1.Entity)('service_discounts_plan', {
41
+ comment: 'Entidad que enlaza un plan de servicio con un código de descuento de una empresa',
42
+ })
43
+ ], ServiceDiscountsPlan);
44
+ return ServiceDiscountsPlan;
45
+ }());
46
+ exports.ServiceDiscountsPlan = ServiceDiscountsPlan;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-entity-library-asm",
3
- "version": "2.7.19",
3
+ "version": "2.7.20",
4
4
  "description": "Entidades de ejemplo para una base de datos",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,25 @@
1
+ import { Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
2
+ import { ServicePlan } from './ServicePlan';
3
+ import { DiscountCodeCompany } from './DiscountCodeCompany';
4
+
5
+ @Entity('service_discounts_plan', {
6
+ comment: 'Entidad que enlaza un plan de servicio con un código de descuento de una empresa',
7
+ })
8
+ export class ServiceDiscountsPlan {
9
+ @PrimaryGeneratedColumn()
10
+ id: number;
11
+
12
+ @ManyToOne(() => ServicePlan, (servicePlan) => servicePlan.id_service_plan, {
13
+ onDelete: 'CASCADE',
14
+ onUpdate: 'CASCADE',
15
+ })
16
+ @JoinColumn({ name: 'id_service_plan' })
17
+ servicePlan: ServicePlan | null;
18
+
19
+ @ManyToOne(() => DiscountCodeCompany, (discountCodeCompany) => discountCodeCompany.discount, {
20
+ onDelete: 'CASCADE',
21
+ onUpdate: 'CASCADE',
22
+ })
23
+ @JoinColumn({ name: 'id_discount' })
24
+ discount: DiscountCodeCompany | null;
25
+ }