test-entity-library-asm 3.9.43 → 3.9.45

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,5 @@
1
1
  import { CodeRedemptionHistoryCompany } from "./CodeRedemptionHistoryCompany";
2
2
  import { Master } from "./Master";
3
- import { ServiceDiscountsPlan } from "./ServiceDiscountsPlan";
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
- service_discounts_plans: ServiceDiscountsPlan[];
20
18
  }
@@ -14,7 +14,7 @@ const typeorm_1 = require("typeorm");
14
14
  const jsonTransformer_1 = require("../transformers/jsonTransformer");
15
15
  const CodeRedemptionHistoryCompany_1 = require("./CodeRedemptionHistoryCompany");
16
16
  const Master_1 = require("./Master");
17
- const ServiceDiscountsPlan_1 = require("./ServiceDiscountsPlan");
17
+ // import { ServiceDiscountsPlan } from "./ServiceDiscountsPlan";
18
18
  let DiscountCodeCompany = class DiscountCodeCompany {
19
19
  };
20
20
  exports.DiscountCodeCompany = DiscountCodeCompany;
@@ -126,10 +126,6 @@ __decorate([
126
126
  (0, typeorm_1.OneToMany)(() => CodeRedemptionHistoryCompany_1.CodeRedemptionHistoryCompany, (codeRedemptionHistoryCompany) => codeRedemptionHistoryCompany.discount_code_company),
127
127
  __metadata("design:type", Array)
128
128
  ], DiscountCodeCompany.prototype, "code_redemptions_history_company", void 0);
129
- __decorate([
130
- (0, typeorm_1.OneToMany)(() => ServiceDiscountsPlan_1.ServiceDiscountsPlan, (serviceDiscountsPlan) => serviceDiscountsPlan.discount),
131
- __metadata("design:type", Array)
132
- ], DiscountCodeCompany.prototype, "service_discounts_plans", void 0);
133
129
  exports.DiscountCodeCompany = DiscountCodeCompany = __decorate([
134
130
  (0, typeorm_1.Entity)("discount_code_company", {
135
131
  comment: "Códigos de descuento para las empresas.",
@@ -1,5 +1,4 @@
1
1
  import { Master } from "./Master";
2
- import { ServiceDiscountsPlan } from "./ServiceDiscountsPlan";
3
2
  export declare class ServicePlan {
4
3
  id_service_plan: number;
5
4
  name: string;
@@ -15,5 +14,4 @@ export declare class ServicePlan {
15
14
  created: Date;
16
15
  updated: Date | null;
17
16
  updated_by: Master | null;
18
- service_discounts_plan: ServiceDiscountsPlan[];
19
17
  }
@@ -13,7 +13,7 @@ exports.ServicePlan = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const jsonTransformer_1 = require("../transformers/jsonTransformer");
15
15
  const Master_1 = require("./Master");
16
- const ServiceDiscountsPlan_1 = require("./ServiceDiscountsPlan");
16
+ // import { ServiceDiscountsPlan } from "./ServiceDiscountsPlan";
17
17
  let ServicePlan = class ServicePlan {
18
18
  };
19
19
  exports.ServicePlan = ServicePlan;
@@ -88,10 +88,6 @@ __decorate([
88
88
  (0, typeorm_1.JoinColumn)({ name: "updated_by" }),
89
89
  __metadata("design:type", Object)
90
90
  ], ServicePlan.prototype, "updated_by", void 0);
91
- __decorate([
92
- (0, typeorm_1.OneToMany)(() => ServiceDiscountsPlan_1.ServiceDiscountsPlan, (serviceDiscountsPlan) => serviceDiscountsPlan.servicePlan),
93
- __metadata("design:type", Array)
94
- ], ServicePlan.prototype, "service_discounts_plan", void 0);
95
91
  exports.ServicePlan = ServicePlan = __decorate([
96
92
  (0, typeorm_1.Entity)("service_plan"),
97
93
  (0, typeorm_1.Unique)(["code"])
package/dist/index.js CHANGED
@@ -50,6 +50,8 @@ function createDataBaseSource() {
50
50
  port: process.env.DB_PORT,
51
51
  username: process.env.DB_USERNAME,
52
52
  database: process.env.DB_DATABASE,
53
+ password: process.env.DB_PASSWORD,
54
+ synchronize: process.env.DB_SYNCHRONIZE,
53
55
  });
54
56
  connection = new typeorm_1.DataSource({
55
57
  type: process.env.DB_TYPE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-entity-library-asm",
3
- "version": "3.9.43",
3
+ "version": "3.9.45",
4
4
  "description": "Entidades de ejemplo para una base de datos",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,7 +9,7 @@ import {
9
9
  import { jsonTransformer } from "../transformers/jsonTransformer";
10
10
  import { CodeRedemptionHistoryCompany } from "./CodeRedemptionHistoryCompany";
11
11
  import { Master } from "./Master";
12
- import { ServiceDiscountsPlan } from "./ServiceDiscountsPlan";
12
+ // import { ServiceDiscountsPlan } from "./ServiceDiscountsPlan";
13
13
 
14
14
  @Entity("discount_code_company", {
15
15
  comment: "Códigos de descuento para las empresas.",
@@ -118,9 +118,9 @@ export class DiscountCodeCompany {
118
118
  )
119
119
  code_redemptions_history_company: CodeRedemptionHistoryCompany[];
120
120
 
121
- @OneToMany(
122
- () => ServiceDiscountsPlan,
123
- (serviceDiscountsPlan) => serviceDiscountsPlan.discount,
124
- )
125
- service_discounts_plans: ServiceDiscountsPlan[];
121
+ // @OneToMany(
122
+ // () => ServiceDiscountsPlan,
123
+ // (serviceDiscountsPlan) => serviceDiscountsPlan.discount,
124
+ // )
125
+ // service_discounts_plans: ServiceDiscountsPlan[];
126
126
  }
@@ -9,7 +9,7 @@ import {
9
9
  } from "typeorm";
10
10
  import { jsonTransformer } from "../transformers/jsonTransformer";
11
11
  import { Master } from "./Master";
12
- import { ServiceDiscountsPlan } from "./ServiceDiscountsPlan";
12
+ // import { ServiceDiscountsPlan } from "./ServiceDiscountsPlan";
13
13
 
14
14
  @Entity("service_plan")
15
15
  @Unique(["code"])
@@ -71,9 +71,9 @@ export class ServicePlan {
71
71
  @JoinColumn({ name: "updated_by" })
72
72
  updated_by: Master | null;
73
73
 
74
- @OneToMany(
75
- () => ServiceDiscountsPlan,
76
- (serviceDiscountsPlan) => serviceDiscountsPlan.servicePlan,
77
- )
78
- service_discounts_plan: ServiceDiscountsPlan[];
74
+ // @OneToMany(
75
+ // () => ServiceDiscountsPlan,
76
+ // (serviceDiscountsPlan) => serviceDiscountsPlan.servicePlan,
77
+ // )
78
+ // service_discounts_plan: ServiceDiscountsPlan[];
79
79
  }
package/src/index.ts CHANGED
@@ -28,6 +28,8 @@ export function createDataBaseSource(): DataSource {
28
28
  port: process.env.DB_PORT,
29
29
  username: process.env.DB_USERNAME,
30
30
  database: process.env.DB_DATABASE,
31
+ password: process.env.DB_PASSWORD,
32
+ synchronize: process.env.DB_SYNCHRONIZE,
31
33
  });
32
34
 
33
35
  connection = new DataSource({
@@ -1,7 +0,0 @@
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
- }
@@ -1,43 +0,0 @@
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
- const typeorm_1 = require("typeorm");
14
- const ServicePlan_1 = require("./ServicePlan");
15
- const DiscountCodeCompany_1 = require("./DiscountCodeCompany");
16
- let ServiceDiscountsPlan = class ServiceDiscountsPlan {
17
- };
18
- exports.ServiceDiscountsPlan = ServiceDiscountsPlan;
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)(() => ServicePlan_1.ServicePlan, (servicePlan) => servicePlan.service_discounts_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)(() => DiscountCodeCompany_1.DiscountCodeCompany, (discountCodeCompany) => 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
- exports.ServiceDiscountsPlan = 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);
@@ -1,25 +0,0 @@
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.service_discounts_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
- }