test-entity-library-asm 2.8.2 → 2.8.4

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.
@@ -6,6 +6,7 @@ import { Partner } from './Partner';
6
6
  import { PartnerRole } from './PartnerRole';
7
7
  import { Plan } from './Plan';
8
8
  import { ProductTopping } from './ProductTopping';
9
+ import { IPropsContactDetails } from '../interfaces';
9
10
  export declare class Company {
10
11
  id: number;
11
12
  code: string;
@@ -13,6 +14,7 @@ export declare class Company {
13
14
  city: City;
14
15
  partner: Partner;
15
16
  profile: any;
17
+ contact_details: IPropsContactDetails;
16
18
  legal_information: any;
17
19
  legal_agent: any;
18
20
  created: Date;
@@ -63,6 +63,15 @@ var Company = /** @class */ (function () {
63
63
  }),
64
64
  __metadata("design:type", Object)
65
65
  ], Company.prototype, "profile", void 0);
66
+ __decorate([
67
+ (0, typeorm_1.Column)({
68
+ type: 'text',
69
+ nullable: true,
70
+ transformer: jsonTransformer_1.jsonTransformer,
71
+ comment: 'Campo de tipo JSON donde se guarda información para guardar el teléfono y el correo electrónico, también los nuevos valores qué tengan esos 2 campos.',
72
+ }),
73
+ __metadata("design:type", Object)
74
+ ], Company.prototype, "contact_details", void 0);
66
75
  __decorate([
67
76
  (0, typeorm_1.Column)({
68
77
  type: 'longtext',
@@ -1,5 +1,6 @@
1
1
  import { CodeRedemptionHistoryCompany } from './CodeRedemptionHistoryCompany';
2
2
  import { Master } from './Master';
3
+ import { ServiceDiscountsPlan } from './ServiceDiscountsPlan';
3
4
  export declare class DiscountCodeCompany {
4
5
  id: number;
5
6
  code: string;
@@ -15,4 +16,5 @@ export declare class DiscountCodeCompany {
15
16
  status: number;
16
17
  updated_by: Master;
17
18
  code_redemptions_history_company: CodeRedemptionHistoryCompany[];
19
+ service_discounts_plans: ServiceDiscountsPlan[];
18
20
  }
@@ -15,6 +15,7 @@ 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 ServiceDiscountsPlan_1 = require("./ServiceDiscountsPlan");
18
19
  var DiscountCodeCompany = /** @class */ (function () {
19
20
  function DiscountCodeCompany() {
20
21
  }
@@ -115,6 +116,10 @@ var DiscountCodeCompany = /** @class */ (function () {
115
116
  }),
116
117
  __metadata("design:type", Array)
117
118
  ], DiscountCodeCompany.prototype, "code_redemptions_history_company", void 0);
119
+ __decorate([
120
+ (0, typeorm_1.OneToMany)(function () { return ServiceDiscountsPlan_1.ServiceDiscountsPlan; }, function (serviceDiscountsPlan) { return serviceDiscountsPlan.discount; }),
121
+ __metadata("design:type", Array)
122
+ ], DiscountCodeCompany.prototype, "service_discounts_plans", void 0);
118
123
  DiscountCodeCompany = __decorate([
119
124
  (0, typeorm_1.Entity)('discount_code_company', {
120
125
  comment: 'Códigos de descuento para las empresas.',
@@ -44,4 +44,10 @@ export interface IPropsDiscountUserOrCompany extends IBasicLazyEvent {
44
44
  company: number | null;
45
45
  status: number | null;
46
46
  }
47
+ export interface IPropsContactDetails {
48
+ phone: string;
49
+ email: string;
50
+ new_phone: string;
51
+ new_email: string;
52
+ }
47
53
  export type IType = 'mysql' | 'mariadb';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-entity-library-asm",
3
- "version": "2.8.2",
3
+ "version": "2.8.4",
4
4
  "description": "Entidades de ejemplo para una base de datos",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,6 +16,7 @@ import { Plan } from './Plan'
16
16
  import { ProductTopping } from './ProductTopping'
17
17
  import { jsonTransformer } from '../transformers/jsonTransformer'
18
18
  import { DateTransformer } from '../transformers/dateTransformer'
19
+ import { IPropsContactDetails } from '../interfaces'
19
20
 
20
21
  @Entity({
21
22
  comment:
@@ -56,6 +57,15 @@ export class Company {
56
57
  })
57
58
  profile: any
58
59
 
60
+ @Column({
61
+ type: 'text',
62
+ nullable: true,
63
+ transformer: jsonTransformer,
64
+ comment:
65
+ 'Campo de tipo JSON donde se guarda información para guardar el teléfono y el correo electrónico, también los nuevos valores qué tengan esos 2 campos.',
66
+ })
67
+ contact_details: IPropsContactDetails
68
+
59
69
  @Column({
60
70
  type: 'longtext',
61
71
  nullable: true,
@@ -11,6 +11,7 @@ import { jsonTransformer } from '../transformers/jsonTransformer'
11
11
  import { CodeRedemptionHistoryCompany } from './CodeRedemptionHistoryCompany'
12
12
  import { Master } from './Master'
13
13
  import { ServicePlan } from './ServicePlan'
14
+ import { ServiceDiscountsPlan } from './ServiceDiscountsPlan'
14
15
 
15
16
  @Entity('discount_code_company', {
16
17
  comment: 'Códigos de descuento para las empresas.',
@@ -105,4 +106,10 @@ export class DiscountCodeCompany {
105
106
  codeRedemptionHistoryCompany.discount_code_company
106
107
  )
107
108
  code_redemptions_history_company: CodeRedemptionHistoryCompany[]
109
+
110
+ @OneToMany(
111
+ () => ServiceDiscountsPlan,
112
+ (serviceDiscountsPlan) => serviceDiscountsPlan.discount,
113
+ )
114
+ service_discounts_plans: ServiceDiscountsPlan[];
108
115
  }
package/src/interfaces.ts CHANGED
@@ -51,4 +51,11 @@ export interface IPropsDiscountUserOrCompany extends IBasicLazyEvent {
51
51
  status: number | null
52
52
  }
53
53
 
54
+ export interface IPropsContactDetails {
55
+ phone: string
56
+ email: string
57
+ new_phone: string
58
+ new_email: string
59
+ }
60
+
54
61
  export type IType = 'mysql' | 'mariadb'