test-entity-library-asm 2.4.6 → 2.4.8
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.
- package/dist/entities/Master.d.ts +2 -1
- package/dist/entities/Master.js +4 -0
- package/dist/entities/MasterNotification.d.ts +11 -0
- package/dist/entities/MasterNotification.js +87 -0
- package/dist/entities/PartnerNotification.d.ts +1 -2
- package/dist/entities/PartnerNotification.js +5 -7
- package/dist/entities.views.routes.d.ts +1 -0
- package/dist/entities.views.routes.js +3 -1
- package/package.json +1 -1
- package/src/entities/Master.ts +7 -1
- package/src/entities/MasterNotification.ts +72 -0
- package/src/entities/PartnerNotification.ts +5 -6
- package/src/entities.views.routes.ts +1 -0
|
@@ -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 { VerifyLocal } from '..';
|
|
5
|
+
import { MasterNotification, VerifyLocal } from '..';
|
|
6
6
|
export declare class Master {
|
|
7
7
|
id: number;
|
|
8
8
|
code: string;
|
|
@@ -22,4 +22,5 @@ export declare class Master {
|
|
|
22
22
|
masters_roles: MasterRole[];
|
|
23
23
|
plans: Plan[];
|
|
24
24
|
verifyLocals: VerifyLocal[];
|
|
25
|
+
master_notifications: MasterNotification[];
|
|
25
26
|
}
|
package/dist/entities/Master.js
CHANGED
|
@@ -142,6 +142,10 @@ var Master = /** @class */ (function () {
|
|
|
142
142
|
(0, typeorm_1.OneToMany)(function () { return __1.VerifyLocal; }, function (verifyLocal) { return verifyLocal.partner; }),
|
|
143
143
|
__metadata("design:type", Array)
|
|
144
144
|
], Master.prototype, "verifyLocals", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
(0, typeorm_1.OneToMany)(function () { return __1.MasterNotification; }, function (masterNotification) { return masterNotification.master; }),
|
|
147
|
+
__metadata("design:type", Array)
|
|
148
|
+
], Master.prototype, "master_notifications", void 0);
|
|
145
149
|
Master = __decorate([
|
|
146
150
|
(0, typeorm_1.Entity)({
|
|
147
151
|
comment: 'Tabla agregada para los usuarios qué son administradores de la plataforma.',
|
|
@@ -0,0 +1,87 @@
|
|
|
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.MasterNotification = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
15
|
+
var __1 = require("..");
|
|
16
|
+
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
17
|
+
var MasterNotification = /** @class */ (function () {
|
|
18
|
+
function MasterNotification() {
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
22
|
+
comment: 'ID único para cada notificación',
|
|
23
|
+
}),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], MasterNotification.prototype, "id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Master; }, function (master) { return master.master_notifications; }, {
|
|
28
|
+
onDelete: 'CASCADE',
|
|
29
|
+
onUpdate: 'NO ACTION',
|
|
30
|
+
}),
|
|
31
|
+
(0, typeorm_1.JoinColumn)({ name: 'master' }),
|
|
32
|
+
__metadata("design:type", __1.Master)
|
|
33
|
+
], MasterNotification.prototype, "master", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({
|
|
36
|
+
length: 200,
|
|
37
|
+
comment: 'Nombre de la notificación.',
|
|
38
|
+
}),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], MasterNotification.prototype, "name", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({
|
|
43
|
+
length: 400,
|
|
44
|
+
nullable: true,
|
|
45
|
+
comment: 'Descripción de la notificación.',
|
|
46
|
+
}),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], MasterNotification.prototype, "description", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({
|
|
51
|
+
type: 'json',
|
|
52
|
+
nullable: true,
|
|
53
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
54
|
+
comment: 'Configuración adicional de la notificación, como enlaces, qué hace después de darle click...',
|
|
55
|
+
}),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], MasterNotification.prototype, "settings", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({
|
|
60
|
+
default: 1,
|
|
61
|
+
comment: 'Si la notificación está pendiente o leída:\r\n1. Pendiente.\r\n2. Leída.',
|
|
62
|
+
}),
|
|
63
|
+
__metadata("design:type", Number)
|
|
64
|
+
], MasterNotification.prototype, "type", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({
|
|
67
|
+
default: 1,
|
|
68
|
+
comment: 'Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.',
|
|
69
|
+
}),
|
|
70
|
+
__metadata("design:type", Number)
|
|
71
|
+
], MasterNotification.prototype, "status", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({
|
|
74
|
+
type: 'datetime',
|
|
75
|
+
comment: 'Fecha de creación de la notificación.',
|
|
76
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
77
|
+
}),
|
|
78
|
+
__metadata("design:type", Date)
|
|
79
|
+
], MasterNotification.prototype, "created", void 0);
|
|
80
|
+
MasterNotification = __decorate([
|
|
81
|
+
(0, typeorm_1.Entity)('master_notification', {
|
|
82
|
+
comment: 'Tabla creada para las notificaciones del master (administrador) de la plataforma.',
|
|
83
|
+
})
|
|
84
|
+
], MasterNotification);
|
|
85
|
+
return MasterNotification;
|
|
86
|
+
}());
|
|
87
|
+
exports.MasterNotification = MasterNotification;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Partner } from './Partner';
|
|
2
2
|
export declare class PartnerNotification {
|
|
3
3
|
id: number;
|
|
4
|
-
code: string;
|
|
5
4
|
partner: Partner;
|
|
6
5
|
name: string;
|
|
7
6
|
description: string;
|
|
8
|
-
settings:
|
|
7
|
+
settings: any;
|
|
9
8
|
type: number;
|
|
10
9
|
status: number;
|
|
11
10
|
created: Date;
|
|
@@ -13,6 +13,7 @@ exports.PartnerNotification = void 0;
|
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
14
|
var Partner_1 = require("./Partner");
|
|
15
15
|
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
16
17
|
var PartnerNotification = /** @class */ (function () {
|
|
17
18
|
function PartnerNotification() {
|
|
18
19
|
}
|
|
@@ -22,10 +23,6 @@ var PartnerNotification = /** @class */ (function () {
|
|
|
22
23
|
}),
|
|
23
24
|
__metadata("design:type", Number)
|
|
24
25
|
], PartnerNotification.prototype, "id", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({ length: 10, unique: true, comment: 'Código único del rol.' }),
|
|
27
|
-
__metadata("design:type", String)
|
|
28
|
-
], PartnerNotification.prototype, "code", void 0);
|
|
29
26
|
__decorate([
|
|
30
27
|
(0, typeorm_1.ManyToOne)(function () { return Partner_1.Partner; }, function (partner) { return partner.partners_notification; }, {
|
|
31
28
|
onDelete: 'CASCADE',
|
|
@@ -36,14 +33,14 @@ var PartnerNotification = /** @class */ (function () {
|
|
|
36
33
|
], PartnerNotification.prototype, "partner", void 0);
|
|
37
34
|
__decorate([
|
|
38
35
|
(0, typeorm_1.Column)({
|
|
39
|
-
length:
|
|
36
|
+
length: 200,
|
|
40
37
|
comment: 'Nombre de la notificación.',
|
|
41
38
|
}),
|
|
42
39
|
__metadata("design:type", String)
|
|
43
40
|
], PartnerNotification.prototype, "name", void 0);
|
|
44
41
|
__decorate([
|
|
45
42
|
(0, typeorm_1.Column)({
|
|
46
|
-
length:
|
|
43
|
+
length: 400,
|
|
47
44
|
nullable: true,
|
|
48
45
|
comment: 'Descripción de la notificación.',
|
|
49
46
|
}),
|
|
@@ -53,9 +50,10 @@ var PartnerNotification = /** @class */ (function () {
|
|
|
53
50
|
(0, typeorm_1.Column)({
|
|
54
51
|
type: 'json',
|
|
55
52
|
nullable: true,
|
|
53
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
56
54
|
comment: 'Configuración adicional de la notificación, como enlaces, qué hace después de darle click...',
|
|
57
55
|
}),
|
|
58
|
-
__metadata("design:type",
|
|
56
|
+
__metadata("design:type", Object)
|
|
59
57
|
], PartnerNotification.prototype, "settings", void 0);
|
|
60
58
|
__decorate([
|
|
61
59
|
(0, typeorm_1.Column)({
|
|
@@ -42,5 +42,6 @@ export { BusinessType } from './entities/BusinessType';
|
|
|
42
42
|
export { AuthenticationCredential } from './entities/AuthenticationCredential';
|
|
43
43
|
export { PosSystem } from './entities/PosSystem';
|
|
44
44
|
export { VerifyLocal } from './entities/VerifyLocal';
|
|
45
|
+
export { MasterNotification } from './entities/MasterNotification';
|
|
45
46
|
export { CustomRepository } from './CustomRepository';
|
|
46
47
|
export * from './utils';
|
|
@@ -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.VerifyLocal = exports.PosSystem = exports.AuthenticationCredential = exports.BusinessType = exports.LocalsCompany = 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.MasterNotification = exports.VerifyLocal = exports.PosSystem = exports.AuthenticationCredential = exports.BusinessType = exports.LocalsCompany = 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 PosSystem_1 = require("./entities/PosSystem");
|
|
|
103
103
|
Object.defineProperty(exports, "PosSystem", { enumerable: true, get: function () { return PosSystem_1.PosSystem; } });
|
|
104
104
|
var VerifyLocal_1 = require("./entities/VerifyLocal");
|
|
105
105
|
Object.defineProperty(exports, "VerifyLocal", { enumerable: true, get: function () { return VerifyLocal_1.VerifyLocal; } });
|
|
106
|
+
var MasterNotification_1 = require("./entities/MasterNotification");
|
|
107
|
+
Object.defineProperty(exports, "MasterNotification", { enumerable: true, get: function () { return MasterNotification_1.MasterNotification; } });
|
|
106
108
|
var CustomRepository_1 = require("./CustomRepository");
|
|
107
109
|
Object.defineProperty(exports, "CustomRepository", { enumerable: true, get: function () { return CustomRepository_1.CustomRepository; } });
|
|
108
110
|
__exportStar(require("./utils"), exports);
|
package/package.json
CHANGED
package/src/entities/Master.ts
CHANGED
|
@@ -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 { VerifyLocal } from '..'
|
|
17
|
+
import { MasterNotification, VerifyLocal } from '..'
|
|
18
18
|
|
|
19
19
|
@Entity({
|
|
20
20
|
comment:
|
|
@@ -128,4 +128,10 @@ export class Master {
|
|
|
128
128
|
|
|
129
129
|
@OneToMany(() => VerifyLocal, (verifyLocal) => verifyLocal.partner)
|
|
130
130
|
verifyLocals: VerifyLocal[]
|
|
131
|
+
|
|
132
|
+
@OneToMany(
|
|
133
|
+
() => MasterNotification,
|
|
134
|
+
(masterNotification) => masterNotification.master
|
|
135
|
+
)
|
|
136
|
+
master_notifications: MasterNotification[]
|
|
131
137
|
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Column,
|
|
3
|
+
Entity,
|
|
4
|
+
JoinColumn,
|
|
5
|
+
ManyToOne,
|
|
6
|
+
PrimaryGeneratedColumn,
|
|
7
|
+
} from 'typeorm'
|
|
8
|
+
import { Partner } from './Partner'
|
|
9
|
+
import { DateTransformer } from '../transformers/dateTransformer'
|
|
10
|
+
import { Master } from '..'
|
|
11
|
+
import { jsonTransformer } from '../transformers/jsonTransformer'
|
|
12
|
+
|
|
13
|
+
@Entity('master_notification', {
|
|
14
|
+
comment:
|
|
15
|
+
'Tabla creada para las notificaciones del master (administrador) de la plataforma.',
|
|
16
|
+
})
|
|
17
|
+
export class MasterNotification {
|
|
18
|
+
@PrimaryGeneratedColumn({
|
|
19
|
+
comment: 'ID único para cada notificación',
|
|
20
|
+
})
|
|
21
|
+
id: number
|
|
22
|
+
|
|
23
|
+
@ManyToOne(() => Master, (master) => master.master_notifications, {
|
|
24
|
+
onDelete: 'CASCADE',
|
|
25
|
+
onUpdate: 'NO ACTION',
|
|
26
|
+
})
|
|
27
|
+
@JoinColumn({ name: 'master' })
|
|
28
|
+
master: Master
|
|
29
|
+
|
|
30
|
+
@Column({
|
|
31
|
+
length: 200,
|
|
32
|
+
comment: 'Nombre de la notificación.',
|
|
33
|
+
})
|
|
34
|
+
name: string
|
|
35
|
+
|
|
36
|
+
@Column({
|
|
37
|
+
length: 400,
|
|
38
|
+
nullable: true,
|
|
39
|
+
comment: 'Descripción de la notificación.',
|
|
40
|
+
})
|
|
41
|
+
description: string
|
|
42
|
+
|
|
43
|
+
@Column({
|
|
44
|
+
type: 'json',
|
|
45
|
+
nullable: true,
|
|
46
|
+
transformer: jsonTransformer,
|
|
47
|
+
comment:
|
|
48
|
+
'Configuración adicional de la notificación, como enlaces, qué hace después de darle click...',
|
|
49
|
+
})
|
|
50
|
+
settings: any
|
|
51
|
+
|
|
52
|
+
@Column({
|
|
53
|
+
default: 1,
|
|
54
|
+
comment:
|
|
55
|
+
'Si la notificación está pendiente o leída:\r\n1. Pendiente.\r\n2. Leída.',
|
|
56
|
+
})
|
|
57
|
+
type: number
|
|
58
|
+
|
|
59
|
+
@Column({
|
|
60
|
+
default: 1,
|
|
61
|
+
comment:
|
|
62
|
+
'Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.',
|
|
63
|
+
})
|
|
64
|
+
status: number
|
|
65
|
+
|
|
66
|
+
@Column({
|
|
67
|
+
type: 'datetime',
|
|
68
|
+
comment: 'Fecha de creación de la notificación.',
|
|
69
|
+
transformer: new DateTransformer(),
|
|
70
|
+
})
|
|
71
|
+
created: Date
|
|
72
|
+
}
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
} from 'typeorm'
|
|
8
8
|
import { Partner } from './Partner'
|
|
9
9
|
import { DateTransformer } from '../transformers/dateTransformer'
|
|
10
|
+
import { jsonTransformer } from '../transformers/jsonTransformer'
|
|
10
11
|
|
|
11
12
|
@Entity('partner_notification', {
|
|
12
13
|
comment: 'Tabla creada para almacenar las notificaciones del usuario.',
|
|
@@ -17,9 +18,6 @@ export class PartnerNotification {
|
|
|
17
18
|
})
|
|
18
19
|
id: number
|
|
19
20
|
|
|
20
|
-
@Column({ length: 10, unique: true, comment: 'Código único del rol.' })
|
|
21
|
-
code: string
|
|
22
|
-
|
|
23
21
|
@ManyToOne(() => Partner, (partner) => partner.partners_notification, {
|
|
24
22
|
onDelete: 'CASCADE',
|
|
25
23
|
onUpdate: 'NO ACTION',
|
|
@@ -28,13 +26,13 @@ export class PartnerNotification {
|
|
|
28
26
|
partner: Partner
|
|
29
27
|
|
|
30
28
|
@Column({
|
|
31
|
-
length:
|
|
29
|
+
length: 200,
|
|
32
30
|
comment: 'Nombre de la notificación.',
|
|
33
31
|
})
|
|
34
32
|
name: string
|
|
35
33
|
|
|
36
34
|
@Column({
|
|
37
|
-
length:
|
|
35
|
+
length: 400,
|
|
38
36
|
nullable: true,
|
|
39
37
|
comment: 'Descripción de la notificación.',
|
|
40
38
|
})
|
|
@@ -43,10 +41,11 @@ export class PartnerNotification {
|
|
|
43
41
|
@Column({
|
|
44
42
|
type: 'json',
|
|
45
43
|
nullable: true,
|
|
44
|
+
transformer: jsonTransformer,
|
|
46
45
|
comment:
|
|
47
46
|
'Configuración adicional de la notificación, como enlaces, qué hace después de darle click...',
|
|
48
47
|
})
|
|
49
|
-
settings:
|
|
48
|
+
settings: any
|
|
50
49
|
|
|
51
50
|
@Column({
|
|
52
51
|
default: 1,
|
|
@@ -42,6 +42,7 @@ export { BusinessType } from './entities/BusinessType'
|
|
|
42
42
|
export { AuthenticationCredential } from './entities/AuthenticationCredential'
|
|
43
43
|
export { PosSystem } from './entities/PosSystem'
|
|
44
44
|
export { VerifyLocal } from './entities/VerifyLocal'
|
|
45
|
+
export { MasterNotification } from './entities/MasterNotification'
|
|
45
46
|
|
|
46
47
|
export { CustomRepository } from './CustomRepository'
|
|
47
48
|
export * from './utils'
|