test-entity-library-asm 2.5.4 → 2.5.6

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.
@@ -2,7 +2,7 @@ import { City } from './City';
2
2
  import { DiscountCodeCompany } from './DiscountCodeCompany';
3
3
  import { MasterRole } from './MasterRole';
4
4
  import { Plan } from './Plan';
5
- import { MasterNotification, VerifyLocal } from '..';
5
+ import { MasterNotification, ReassignReview, VerifyLocal } from '..';
6
6
  export declare class Master {
7
7
  id: number;
8
8
  code: string;
@@ -23,4 +23,6 @@ export declare class Master {
23
23
  plans: Plan[];
24
24
  verifyLocals: VerifyLocal[];
25
25
  master_notifications: MasterNotification[];
26
+ reassign_reviews: ReassignReview[];
27
+ reassign_review_news: ReassignReview[];
26
28
  }
@@ -146,6 +146,14 @@ var Master = /** @class */ (function () {
146
146
  (0, typeorm_1.OneToMany)(function () { return __1.MasterNotification; }, function (masterNotification) { return masterNotification.master; }),
147
147
  __metadata("design:type", Array)
148
148
  ], Master.prototype, "master_notifications", void 0);
149
+ __decorate([
150
+ (0, typeorm_1.OneToMany)(function () { return __1.ReassignReview; }, function (reassignReview) { return reassignReview.previous_master; }),
151
+ __metadata("design:type", Array)
152
+ ], Master.prototype, "reassign_reviews", void 0);
153
+ __decorate([
154
+ (0, typeorm_1.OneToMany)(function () { return __1.ReassignReview; }, function (reassignReview) { return reassignReview.new_user; }),
155
+ __metadata("design:type", Array)
156
+ ], Master.prototype, "reassign_review_news", void 0);
149
157
  Master = __decorate([
150
158
  (0, typeorm_1.Entity)({
151
159
  comment: 'Tabla agregada para los usuarios qué son administradores de la plataforma.',
@@ -0,0 +1,9 @@
1
+ import { Master } from '..';
2
+ export declare class ReassignReview {
3
+ id: number;
4
+ previous_master: Master;
5
+ new_user: Master;
6
+ settings: any;
7
+ created: Date;
8
+ status: number;
9
+ }
@@ -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.ReassignReview = void 0;
13
+ var typeorm_1 = require("typeorm");
14
+ var __1 = require("..");
15
+ var dateTransformer_1 = require("../transformers/dateTransformer");
16
+ var jsonTransformer_1 = require("../transformers/jsonTransformer");
17
+ var ReassignReview = /** @class */ (function () {
18
+ function ReassignReview() {
19
+ }
20
+ __decorate([
21
+ (0, typeorm_1.PrimaryGeneratedColumn)({
22
+ comment: 'Número de identificación (ID) único de cada registro.',
23
+ }),
24
+ __metadata("design:type", Number)
25
+ ], ReassignReview.prototype, "id", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.ManyToOne)(function () { return __1.Master; }, function (master) { return master.reassign_reviews; }, {
28
+ onDelete: 'CASCADE',
29
+ onUpdate: 'NO ACTION',
30
+ }),
31
+ (0, typeorm_1.JoinColumn)({ name: 'previous_master' }),
32
+ __metadata("design:type", __1.Master)
33
+ ], ReassignReview.prototype, "previous_master", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.ManyToOne)(function () { return __1.Master; }, function (master) { return master.reassign_review_news; }, {
36
+ onDelete: 'CASCADE',
37
+ onUpdate: 'NO ACTION',
38
+ }),
39
+ (0, typeorm_1.JoinColumn)({ name: 'new_user' }),
40
+ __metadata("design:type", __1.Master)
41
+ ], ReassignReview.prototype, "new_user", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({
44
+ type: 'text',
45
+ nullable: true,
46
+ transformer: jsonTransformer_1.jsonTransformer,
47
+ comment: 'Configuración de tipo JSON donde se guarda la información necesaria.',
48
+ }),
49
+ __metadata("design:type", Object)
50
+ ], ReassignReview.prototype, "settings", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({
53
+ type: 'datetime',
54
+ comment: 'Fecha creación del registro.',
55
+ transformer: new dateTransformer_1.DateTransformer(),
56
+ }),
57
+ __metadata("design:type", Date)
58
+ ], ReassignReview.prototype, "created", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({
61
+ default: 1,
62
+ comment: 'Estado del registro, es decir:\r\n\r\n1. Activo: El registro es visible.\r\n\r\n0. Inactivo: El registro no es visible.',
63
+ }),
64
+ __metadata("design:type", Number)
65
+ ], ReassignReview.prototype, "status", void 0);
66
+ ReassignReview = __decorate([
67
+ (0, typeorm_1.Entity)('reassign_review', {
68
+ comment: 'Tabla creada para almacenar las solicitudes de reasignar tareas.',
69
+ })
70
+ ], ReassignReview);
71
+ return ReassignReview;
72
+ }());
73
+ exports.ReassignReview = ReassignReview;
@@ -42,6 +42,7 @@ export { AuthenticationCredential } from './entities/AuthenticationCredential';
42
42
  export { PosSystem } from './entities/PosSystem';
43
43
  export { VerifyLocal } from './entities/VerifyLocal';
44
44
  export { MasterNotification } from './entities/MasterNotification';
45
+ export { ReassignReview } from './entities/ReassignReview';
45
46
  export { LocalsCompany } from './views/LocalsCompany';
46
47
  export { VerifyLocals } from './views/VerifyLocals';
47
48
  export { CustomRepository } from './CustomRepository';
@@ -14,7 +14,7 @@ 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.CustomRepository = exports.VerifyLocals = exports.LocalsCompany = 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;
17
+ exports.CustomRepository = exports.VerifyLocals = exports.LocalsCompany = 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
18
  var BusinessTypeProduct_1 = require("./entities/BusinessTypeProduct");
19
19
  Object.defineProperty(exports, "BusinessTypeProduct", { enumerable: true, get: function () { return BusinessTypeProduct_1.BusinessTypeProduct; } });
20
20
  var Category_1 = require("./entities/Category");
@@ -103,6 +103,8 @@ var VerifyLocal_1 = require("./entities/VerifyLocal");
103
103
  Object.defineProperty(exports, "VerifyLocal", { enumerable: true, get: function () { return VerifyLocal_1.VerifyLocal; } });
104
104
  var MasterNotification_1 = require("./entities/MasterNotification");
105
105
  Object.defineProperty(exports, "MasterNotification", { enumerable: true, get: function () { return MasterNotification_1.MasterNotification; } });
106
+ var ReassignReview_1 = require("./entities/ReassignReview");
107
+ Object.defineProperty(exports, "ReassignReview", { enumerable: true, get: function () { return ReassignReview_1.ReassignReview; } });
106
108
  var LocalsCompany_1 = require("./views/LocalsCompany");
107
109
  Object.defineProperty(exports, "LocalsCompany", { enumerable: true, get: function () { return LocalsCompany_1.LocalsCompany; } });
108
110
  var VerifyLocals_1 = require("./views/VerifyLocals");
@@ -17,4 +17,6 @@ export declare class VerifyLocals {
17
17
  master_notification_settings: any;
18
18
  partner_notification_id: number;
19
19
  partner_notification_settings: any;
20
+ reassign_review_id: number;
21
+ reassign_review_settings: any;
20
22
  }
@@ -101,6 +101,14 @@ var VerifyLocals = /** @class */ (function () {
101
101
  (0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
102
102
  __metadata("design:type", Object)
103
103
  ], VerifyLocals.prototype, "partner_notification_settings", void 0);
104
+ __decorate([
105
+ (0, typeorm_1.ViewColumn)(),
106
+ __metadata("design:type", Number)
107
+ ], VerifyLocals.prototype, "reassign_review_id", void 0);
108
+ __decorate([
109
+ (0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
110
+ __metadata("design:type", Object)
111
+ ], VerifyLocals.prototype, "reassign_review_settings", void 0);
104
112
  VerifyLocals = __decorate([
105
113
  (0, typeorm_1.ViewEntity)({
106
114
  name: 'verify_locals',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-entity-library-asm",
3
- "version": "2.5.4",
3
+ "version": "2.5.6",
4
4
  "description": "Entidades de ejemplo para una base de datos",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,7 +14,7 @@ import { MasterRole } from './MasterRole'
14
14
  import { Plan } from './Plan'
15
15
  import { jsonTransformer } from '../transformers/jsonTransformer'
16
16
  import { DateTransformer } from '../transformers/dateTransformer'
17
- import { MasterNotification, VerifyLocal } from '..'
17
+ import { MasterNotification, ReassignReview, VerifyLocal } from '..'
18
18
 
19
19
  @Entity({
20
20
  comment:
@@ -134,4 +134,13 @@ export class Master {
134
134
  (masterNotification) => masterNotification.master
135
135
  )
136
136
  master_notifications: MasterNotification[]
137
+
138
+ @OneToMany(
139
+ () => ReassignReview,
140
+ (reassignReview) => reassignReview.previous_master
141
+ )
142
+ reassign_reviews: ReassignReview[]
143
+
144
+ @OneToMany(() => ReassignReview, (reassignReview) => reassignReview.new_user)
145
+ reassign_review_news: ReassignReview[]
137
146
  }
@@ -0,0 +1,59 @@
1
+ import {
2
+ Column,
3
+ Entity,
4
+ JoinColumn,
5
+ ManyToOne,
6
+ OneToMany,
7
+ PrimaryGeneratedColumn,
8
+ } from 'typeorm'
9
+ import { Master } from '..'
10
+ import { DateTransformer } from '../transformers/dateTransformer'
11
+ import { jsonTransformer } from '../transformers/jsonTransformer'
12
+ import { ProductGroup } from './ProductGroup'
13
+
14
+ @Entity('reassign_review', {
15
+ comment: 'Tabla creada para almacenar las solicitudes de reasignar tareas.',
16
+ })
17
+ export class ReassignReview {
18
+ @PrimaryGeneratedColumn({
19
+ comment: 'Número de identificación (ID) único de cada registro.',
20
+ })
21
+ id: number
22
+
23
+ @ManyToOne(() => Master, (master) => master.reassign_reviews, {
24
+ onDelete: 'CASCADE',
25
+ onUpdate: 'NO ACTION',
26
+ })
27
+ @JoinColumn({ name: 'previous_master' })
28
+ previous_master: Master
29
+
30
+ @ManyToOne(() => Master, (master) => master.reassign_review_news, {
31
+ onDelete: 'CASCADE',
32
+ onUpdate: 'NO ACTION',
33
+ })
34
+ @JoinColumn({ name: 'new_user' })
35
+ new_user: Master
36
+
37
+ @Column({
38
+ type: 'text',
39
+ nullable: true,
40
+ transformer: jsonTransformer,
41
+ comment:
42
+ 'Configuración de tipo JSON donde se guarda la información necesaria.',
43
+ })
44
+ settings: any
45
+
46
+ @Column({
47
+ type: 'datetime',
48
+ comment: 'Fecha creación del registro.',
49
+ transformer: new DateTransformer(),
50
+ })
51
+ created: Date
52
+
53
+ @Column({
54
+ default: 1,
55
+ comment:
56
+ 'Estado del registro, es decir:\r\n\r\n1. Activo: El registro es visible.\r\n\r\n0. Inactivo: El registro no es visible.',
57
+ })
58
+ status: number
59
+ }
@@ -42,6 +42,7 @@ export { AuthenticationCredential } from './entities/AuthenticationCredential'
42
42
  export { PosSystem } from './entities/PosSystem'
43
43
  export { VerifyLocal } from './entities/VerifyLocal'
44
44
  export { MasterNotification } from './entities/MasterNotification'
45
+ export { ReassignReview } from './entities/ReassignReview'
45
46
 
46
47
  export { LocalsCompany } from './views/LocalsCompany'
47
48
  export { VerifyLocals } from './views/VerifyLocals'
@@ -74,4 +74,10 @@ export class VerifyLocals {
74
74
 
75
75
  @ViewColumn({ transformer: jsonTransformer })
76
76
  partner_notification_settings: any
77
+
78
+ @ViewColumn()
79
+ reassign_review_id: number
80
+
81
+ @ViewColumn({ transformer: jsonTransformer })
82
+ reassign_review_settings: any
77
83
  }