test-entity-library-asm 2.6.22 → 2.6.24

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.
@@ -138,7 +138,7 @@ var Partner = /** @class */ (function () {
138
138
  __decorate([
139
139
  (0, typeorm_1.Column)({
140
140
  default: 1,
141
- comment: 'Es el estado para verificar si se envia en la papelara o no.',
141
+ comment: 'Es el estado para verificar si se envía en la papelera o no.',
142
142
  }),
143
143
  __metadata("design:type", Number)
144
144
  ], Partner.prototype, "visible", void 0);
@@ -4,6 +4,7 @@ export declare class PartnerPermission {
4
4
  code: string;
5
5
  name: string;
6
6
  description: string;
7
+ icon: string;
7
8
  status: number;
8
9
  roles_permissions: PartnerRole[];
9
10
  }
@@ -36,9 +36,18 @@ var PartnerPermission = /** @class */ (function () {
36
36
  (0, typeorm_1.Column)({
37
37
  length: 40,
38
38
  comment: 'Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.',
39
+ nullable: true,
39
40
  }),
40
41
  __metadata("design:type", String)
41
42
  ], PartnerPermission.prototype, "description", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({
45
+ length: 20,
46
+ comment: 'Icono de la sección para los permisos.',
47
+ nullable: true,
48
+ }),
49
+ __metadata("design:type", String)
50
+ ], PartnerPermission.prototype, "icon", void 0);
42
51
  __decorate([
43
52
  (0, typeorm_1.Column)({
44
53
  default: 1,
@@ -0,0 +1,10 @@
1
+ import { PartnerPlatform } from '..';
2
+ export declare class PartnerPermissionSection {
3
+ id: number;
4
+ code: string;
5
+ platform: PartnerPlatform;
6
+ name: string;
7
+ description: string;
8
+ icon: string;
9
+ status: number;
10
+ }
@@ -0,0 +1,73 @@
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.PartnerPermissionSection = void 0;
13
+ var typeorm_1 = require("typeorm");
14
+ var __1 = require("..");
15
+ var PartnerPermissionSection = /** @class */ (function () {
16
+ function PartnerPermissionSection() {
17
+ }
18
+ __decorate([
19
+ (0, typeorm_1.PrimaryGeneratedColumn)({
20
+ comment: 'Número de identificación (ID) único de cada registro.',
21
+ }),
22
+ __metadata("design:type", Number)
23
+ ], PartnerPermissionSection.prototype, "id", void 0);
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ length: 10, unique: true, comment: 'Código del permiso.' }),
26
+ __metadata("design:type", String)
27
+ ], PartnerPermissionSection.prototype, "code", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.ManyToOne)(function () { return __1.PartnerPlatform; }, function (partnerPlatform) { return partnerPlatform.partner_platform_sections; }, {
30
+ onDelete: 'RESTRICT',
31
+ onUpdate: 'NO ACTION',
32
+ }),
33
+ (0, typeorm_1.JoinColumn)({ name: 'company' }),
34
+ __metadata("design:type", __1.PartnerPlatform)
35
+ ], PartnerPermissionSection.prototype, "platform", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({
38
+ length: 40,
39
+ comment: 'Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.',
40
+ }),
41
+ __metadata("design:type", String)
42
+ ], PartnerPermissionSection.prototype, "name", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({
45
+ length: 40,
46
+ comment: 'Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.',
47
+ nullable: true,
48
+ }),
49
+ __metadata("design:type", String)
50
+ ], PartnerPermissionSection.prototype, "description", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({
53
+ length: 20,
54
+ comment: 'Icono de la sección para los permisos.',
55
+ nullable: true,
56
+ }),
57
+ __metadata("design:type", String)
58
+ ], PartnerPermissionSection.prototype, "icon", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({
61
+ default: 1,
62
+ comment: 'Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.',
63
+ }),
64
+ __metadata("design:type", Number)
65
+ ], PartnerPermissionSection.prototype, "status", void 0);
66
+ PartnerPermissionSection = __decorate([
67
+ (0, typeorm_1.Entity)('partner_permission_section', {
68
+ comment: 'Tabla creada para agregar las secciones para lo permisos del partner.',
69
+ })
70
+ ], PartnerPermissionSection);
71
+ return PartnerPermissionSection;
72
+ }());
73
+ exports.PartnerPermissionSection = PartnerPermissionSection;
@@ -0,0 +1,10 @@
1
+ import { PartnerPermissionSection } from '..';
2
+ export declare class PartnerPlatform {
3
+ id: number;
4
+ code: string;
5
+ name: string;
6
+ description: string;
7
+ icon: string;
8
+ status: number;
9
+ partner_platform_sections: PartnerPermissionSection[];
10
+ }
@@ -0,0 +1,69 @@
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.PartnerPlatform = void 0;
13
+ var typeorm_1 = require("typeorm");
14
+ var __1 = require("..");
15
+ var PartnerPlatform = /** @class */ (function () {
16
+ function PartnerPlatform() {
17
+ }
18
+ __decorate([
19
+ (0, typeorm_1.PrimaryGeneratedColumn)({
20
+ comment: 'Número de identificación (ID) único de cada registro.',
21
+ }),
22
+ __metadata("design:type", Number)
23
+ ], PartnerPlatform.prototype, "id", void 0);
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ length: 10, unique: true, comment: 'Código de la sección.' }),
26
+ __metadata("design:type", String)
27
+ ], PartnerPlatform.prototype, "code", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({
30
+ length: 40,
31
+ comment: 'Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.',
32
+ }),
33
+ __metadata("design:type", String)
34
+ ], PartnerPlatform.prototype, "name", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)({
37
+ length: 40,
38
+ comment: 'Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.',
39
+ nullable: true,
40
+ }),
41
+ __metadata("design:type", String)
42
+ ], PartnerPlatform.prototype, "description", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({
45
+ length: 20,
46
+ comment: 'Icono de la sección para los permisos.',
47
+ nullable: true,
48
+ }),
49
+ __metadata("design:type", String)
50
+ ], PartnerPlatform.prototype, "icon", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({
53
+ default: 1,
54
+ comment: 'Estado en el que se encuentra el registro:\r\n1. Activo: El partner tiene acceso.\r\n0. Inactivo: El partner no tiene acceso a la plataforma.',
55
+ }),
56
+ __metadata("design:type", Number)
57
+ ], PartnerPlatform.prototype, "status", void 0);
58
+ __decorate([
59
+ (0, typeorm_1.OneToMany)(function () { return __1.PartnerPermissionSection; }, function (partnerPermissionSection) { return partnerPermissionSection.platform; }),
60
+ __metadata("design:type", Array)
61
+ ], PartnerPlatform.prototype, "partner_platform_sections", void 0);
62
+ PartnerPlatform = __decorate([
63
+ (0, typeorm_1.Entity)('partner_platform', {
64
+ comment: 'Tabla creada para agregar las plataformas de los usuarios.',
65
+ })
66
+ ], PartnerPlatform);
67
+ return PartnerPlatform;
68
+ }());
69
+ exports.PartnerPlatform = PartnerPlatform;
@@ -44,6 +44,8 @@ export { VerifyLocal } from './entities/VerifyLocal';
44
44
  export { MasterNotification } from './entities/MasterNotification';
45
45
  export { ReassignReview } from './entities/ReassignReview';
46
46
  export { LocalPlan } from './entities/LocalPlan';
47
+ export { PartnerPermissionSection } from './entities/PartnerPermissionSection';
48
+ export { PartnerPlatform } from './entities/PartnerPlatform';
47
49
  export { LocalsCompany } from './views/LocalsCompany';
48
50
  export { VerifyLocals } from './views/VerifyLocals';
49
51
  export { MasterNotifications } from './views/MasterNotifications';
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Partners = exports.MasterNotifications = exports.VerifyLocals = exports.LocalsCompany = exports.LocalPlan = exports.ReassignReview = exports.MasterNotification = exports.VerifyLocal = exports.PosSystem = exports.AuthenticationCredential = exports.BusinessType = exports.UserAddress = exports.User = exports.TypeMeasureIngredient = exports.TerminalSession = exports.Terminal = exports.Square = exports.RequestStatus = exports.RequestProductGroupComplement = exports.RequestProduct = exports.Request = exports.Region = exports.ProductTopping = exports.ProductIngredient = exports.ProductGroupComplement = exports.ProductGroup = exports.Product = exports.Plan = exports.PaymentMethod = exports.PartnerRole = exports.PartnerPermission = exports.PartnerNotification = exports.Partner = exports.MasterRole = exports.MasterPermission = exports.Master = exports.LocalQualification = exports.Local = exports.DiscountCodeUser = exports.DiscountCodeCompany = exports.Day = exports.Country = exports.Configuration = exports.Company = exports.CodeRedemptionHistoryUser = exports.CodeRedemptionHistoryCompany = exports.City = exports.ScheduleCategory = exports.Category = exports.BusinessTypeProduct = void 0;
18
- exports.CustomRepository = exports.DiscountsCodeUser = void 0;
17
+ exports.VerifyLocals = exports.LocalsCompany = exports.PartnerPlatform = exports.PartnerPermissionSection = exports.LocalPlan = exports.ReassignReview = exports.MasterNotification = exports.VerifyLocal = exports.PosSystem = exports.AuthenticationCredential = exports.BusinessType = exports.UserAddress = exports.User = exports.TypeMeasureIngredient = exports.TerminalSession = exports.Terminal = exports.Square = exports.RequestStatus = exports.RequestProductGroupComplement = exports.RequestProduct = exports.Request = exports.Region = exports.ProductTopping = exports.ProductIngredient = exports.ProductGroupComplement = exports.ProductGroup = exports.Product = exports.Plan = exports.PaymentMethod = exports.PartnerRole = exports.PartnerPermission = exports.PartnerNotification = exports.Partner = exports.MasterRole = exports.MasterPermission = exports.Master = exports.LocalQualification = exports.Local = exports.DiscountCodeUser = exports.DiscountCodeCompany = exports.Day = exports.Country = exports.Configuration = exports.Company = exports.CodeRedemptionHistoryUser = exports.CodeRedemptionHistoryCompany = exports.City = exports.ScheduleCategory = exports.Category = exports.BusinessTypeProduct = void 0;
18
+ exports.CustomRepository = exports.DiscountsCodeUser = exports.Partners = exports.MasterNotifications = void 0;
19
19
  var BusinessTypeProduct_1 = require("./entities/BusinessTypeProduct");
20
20
  Object.defineProperty(exports, "BusinessTypeProduct", { enumerable: true, get: function () { return BusinessTypeProduct_1.BusinessTypeProduct; } });
21
21
  var Category_1 = require("./entities/Category");
@@ -108,6 +108,10 @@ var ReassignReview_1 = require("./entities/ReassignReview");
108
108
  Object.defineProperty(exports, "ReassignReview", { enumerable: true, get: function () { return ReassignReview_1.ReassignReview; } });
109
109
  var LocalPlan_1 = require("./entities/LocalPlan");
110
110
  Object.defineProperty(exports, "LocalPlan", { enumerable: true, get: function () { return LocalPlan_1.LocalPlan; } });
111
+ var PartnerPermissionSection_1 = require("./entities/PartnerPermissionSection");
112
+ Object.defineProperty(exports, "PartnerPermissionSection", { enumerable: true, get: function () { return PartnerPermissionSection_1.PartnerPermissionSection; } });
113
+ var PartnerPlatform_1 = require("./entities/PartnerPlatform");
114
+ Object.defineProperty(exports, "PartnerPlatform", { enumerable: true, get: function () { return PartnerPlatform_1.PartnerPlatform; } });
111
115
  var LocalsCompany_1 = require("./views/LocalsCompany");
112
116
  Object.defineProperty(exports, "LocalsCompany", { enumerable: true, get: function () { return LocalsCompany_1.LocalsCompany; } });
113
117
  var VerifyLocals_1 = require("./views/VerifyLocals");
@@ -7,12 +7,12 @@ export declare class DiscountsCodeUser {
7
7
  type: number;
8
8
  single_use: number;
9
9
  use_limit: number;
10
- created: string;
10
+ created: any;
11
11
  start: string;
12
12
  expiration: string;
13
13
  repeat_days: any;
14
14
  updated_by: number;
15
- updated: string;
15
+ updated: any;
16
16
  status: number;
17
17
  local_id: number;
18
18
  local_name: string;
@@ -71,7 +71,7 @@ var DiscountsCodeUser = /** @class */ (function () {
71
71
  ], DiscountsCodeUser.prototype, "use_limit", void 0);
72
72
  __decorate([
73
73
  (0, typeorm_1.ViewColumn)({ transformer: DateTransformer }),
74
- __metadata("design:type", String)
74
+ __metadata("design:type", Object)
75
75
  ], DiscountsCodeUser.prototype, "created", void 0);
76
76
  __decorate([
77
77
  (0, typeorm_1.ViewColumn)(),
@@ -91,7 +91,7 @@ var DiscountsCodeUser = /** @class */ (function () {
91
91
  ], DiscountsCodeUser.prototype, "updated_by", void 0);
92
92
  __decorate([
93
93
  (0, typeorm_1.ViewColumn)({ transformer: DateTransformer }),
94
- __metadata("design:type", String)
94
+ __metadata("design:type", Object)
95
95
  ], DiscountsCodeUser.prototype, "updated", void 0);
96
96
  __decorate([
97
97
  (0, typeorm_1.ViewColumn)(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-entity-library-asm",
3
- "version": "2.6.22",
3
+ "version": "2.6.24",
4
4
  "description": "Entidades de ejemplo para una base de datos",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -126,7 +126,7 @@ export class Partner {
126
126
  @Column({
127
127
  default: 1,
128
128
  comment:
129
- 'Es el estado para verificar si se envia en la papelara o no.',
129
+ 'Es el estado para verificar si se envía en la papelera o no.',
130
130
  })
131
131
  visible: number
132
132
 
@@ -31,9 +31,17 @@ export class PartnerPermission {
31
31
  length: 40,
32
32
  comment:
33
33
  'Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.',
34
+ nullable: true,
34
35
  })
35
36
  description: string
36
37
 
38
+ @Column({
39
+ length: 20,
40
+ comment: 'Icono de la sección para los permisos.',
41
+ nullable: true,
42
+ })
43
+ icon: string
44
+
37
45
  @Column({
38
46
  default: 1,
39
47
  comment:
@@ -41,11 +49,6 @@ export class PartnerPermission {
41
49
  })
42
50
  status: number
43
51
 
44
- // @ManyToMany(() => PartnerRole, (partnerRole) => partnerRole.roles_permissions)
45
- // @JoinTable({
46
- // name: 'partner_role_permission',
47
- // })
48
- // roles_permissions: PartnerRole[]
49
52
  @ManyToMany(() => PartnerRole, (partnerRole) => partnerRole.roles_permissions)
50
53
  @JoinTable({
51
54
  name: 'partner_role_permission',
@@ -0,0 +1,62 @@
1
+ import {
2
+ Column,
3
+ Entity,
4
+ JoinColumn,
5
+ ManyToOne,
6
+ PrimaryGeneratedColumn,
7
+ } from 'typeorm'
8
+ import { PartnerPlatform } from '..'
9
+
10
+ @Entity('partner_permission_section', {
11
+ comment:
12
+ 'Tabla creada para agregar las secciones para lo permisos del partner.',
13
+ })
14
+ export class PartnerPermissionSection {
15
+ @PrimaryGeneratedColumn({
16
+ comment: 'Número de identificación (ID) único de cada registro.',
17
+ })
18
+ id: number
19
+
20
+ @Column({ length: 10, unique: true, comment: 'Código del permiso.' })
21
+ code: string
22
+
23
+ @ManyToOne(
24
+ () => PartnerPlatform,
25
+ (partnerPlatform) => partnerPlatform.partner_platform_sections,
26
+ {
27
+ onDelete: 'RESTRICT',
28
+ onUpdate: 'NO ACTION',
29
+ }
30
+ )
31
+ @JoinColumn({ name: 'company' })
32
+ platform: PartnerPlatform
33
+
34
+ @Column({
35
+ length: 40,
36
+ comment:
37
+ 'Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.',
38
+ })
39
+ name: string
40
+
41
+ @Column({
42
+ length: 40,
43
+ comment:
44
+ 'Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.',
45
+ nullable: true,
46
+ })
47
+ description: string
48
+
49
+ @Column({
50
+ length: 20,
51
+ comment: 'Icono de la sección para los permisos.',
52
+ nullable: true,
53
+ })
54
+ icon: string
55
+
56
+ @Column({
57
+ default: 1,
58
+ comment:
59
+ 'Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.',
60
+ })
61
+ status: number
62
+ }
@@ -0,0 +1,50 @@
1
+ import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm'
2
+ import { PartnerPermissionSection } from '..'
3
+
4
+ @Entity('partner_platform', {
5
+ comment: 'Tabla creada para agregar las plataformas de los usuarios.',
6
+ })
7
+ export class PartnerPlatform {
8
+ @PrimaryGeneratedColumn({
9
+ comment: 'Número de identificación (ID) único de cada registro.',
10
+ })
11
+ id: number
12
+
13
+ @Column({ length: 10, unique: true, comment: 'Código de la sección.' })
14
+ code: string
15
+
16
+ @Column({
17
+ length: 40,
18
+ comment:
19
+ 'Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.',
20
+ })
21
+ name: string
22
+
23
+ @Column({
24
+ length: 40,
25
+ comment:
26
+ 'Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.',
27
+ nullable: true,
28
+ })
29
+ description: string
30
+
31
+ @Column({
32
+ length: 20,
33
+ comment: 'Icono de la sección para los permisos.',
34
+ nullable: true,
35
+ })
36
+ icon: string
37
+
38
+ @Column({
39
+ default: 1,
40
+ comment:
41
+ 'Estado en el que se encuentra el registro:\r\n1. Activo: El partner tiene acceso.\r\n0. Inactivo: El partner no tiene acceso a la plataforma.',
42
+ })
43
+ status: number
44
+
45
+ @OneToMany(
46
+ () => PartnerPermissionSection,
47
+ (partnerPermissionSection) => partnerPermissionSection.platform
48
+ )
49
+ partner_platform_sections: PartnerPermissionSection[]
50
+ }
@@ -44,12 +44,14 @@ export { VerifyLocal } from './entities/VerifyLocal'
44
44
  export { MasterNotification } from './entities/MasterNotification'
45
45
  export { ReassignReview } from './entities/ReassignReview'
46
46
  export { LocalPlan } from './entities/LocalPlan'
47
+ export { PartnerPermissionSection } from './entities/PartnerPermissionSection'
48
+ export { PartnerPlatform } from './entities/PartnerPlatform'
47
49
 
48
50
  export { LocalsCompany } from './views/LocalsCompany'
49
51
  export { VerifyLocals } from './views/VerifyLocals'
50
52
  export { MasterNotifications } from './views/MasterNotifications'
51
- export { Partners } from './views/Partners';
52
- export { DiscountsCodeUser } from './views/DiscountsCodeUser';
53
+ export { Partners } from './views/Partners'
54
+ export { DiscountsCodeUser } from './views/DiscountsCodeUser'
53
55
 
54
56
  export { CustomRepository } from './CustomRepository'
55
57
  export * from './utils'
@@ -54,7 +54,7 @@ export class DiscountsCodeUser {
54
54
  use_limit: number
55
55
 
56
56
  @ViewColumn({ transformer: DateTransformer })
57
- created: string
57
+ created: any
58
58
 
59
59
  @ViewColumn()
60
60
  start: string
@@ -69,7 +69,7 @@ export class DiscountsCodeUser {
69
69
  updated_by: number
70
70
 
71
71
  @ViewColumn({ transformer: DateTransformer })
72
- updated: string
72
+ updated: any
73
73
 
74
74
  @ViewColumn()
75
75
  status: number