test-entity-library-asm 2.0.7 → 2.0.9
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/Partner.d.ts +2 -0
- package/dist/entities/Partner.js +5 -0
- package/dist/entities/PartnerNotification.d.ts +12 -0
- package/dist/entities/PartnerNotification.js +89 -0
- 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/Partner.ts +7 -0
- package/src/entities/PartnerNotification.ts +71 -0
- package/src/entities.views.routes.ts +1 -0
|
@@ -5,6 +5,7 @@ import { Local } from './Local';
|
|
|
5
5
|
import { PartnerRole } from './PartnerRole';
|
|
6
6
|
import { Terminal } from './Terminal';
|
|
7
7
|
import { TerminalSession } from './TerminalSession';
|
|
8
|
+
import { PartnerNotification } from './PartnerNotification';
|
|
8
9
|
export declare class Partner {
|
|
9
10
|
id: number;
|
|
10
11
|
company: Company;
|
|
@@ -29,4 +30,5 @@ export declare class Partner {
|
|
|
29
30
|
partners_roles: PartnerRole[];
|
|
30
31
|
terminals: Terminal[];
|
|
31
32
|
sessions: TerminalSession[];
|
|
33
|
+
partners_notification: PartnerNotification[];
|
|
32
34
|
}
|
package/dist/entities/Partner.js
CHANGED
|
@@ -20,6 +20,7 @@ var PartnerRole_1 = require("./PartnerRole");
|
|
|
20
20
|
var Terminal_1 = require("./Terminal");
|
|
21
21
|
var TerminalSession_1 = require("./TerminalSession");
|
|
22
22
|
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
23
|
+
var PartnerNotification_1 = require("./PartnerNotification");
|
|
23
24
|
var Partner = /** @class */ (function () {
|
|
24
25
|
function Partner() {
|
|
25
26
|
}
|
|
@@ -194,6 +195,10 @@ var Partner = /** @class */ (function () {
|
|
|
194
195
|
(0, typeorm_1.OneToMany)(function () { return TerminalSession_1.TerminalSession; }, function (terminalSession) { return terminalSession.partner; }),
|
|
195
196
|
__metadata("design:type", Array)
|
|
196
197
|
], Partner.prototype, "sessions", void 0);
|
|
198
|
+
__decorate([
|
|
199
|
+
(0, typeorm_1.OneToMany)(function () { return PartnerNotification_1.PartnerNotification; }, function (partnerNotification) { return partnerNotification.partner; }),
|
|
200
|
+
__metadata("design:type", Array)
|
|
201
|
+
], Partner.prototype, "partners_notification", void 0);
|
|
197
202
|
Partner = __decorate([
|
|
198
203
|
(0, typeorm_1.Entity)({
|
|
199
204
|
comment: 'Tabla agregada para los usuarios qué quieran registrar su local o empresa de comida rápida en la plataforma.\r\n\r\nEste usuario es independiente a los usuarios de la tabla `user` ya que tiene diferentes plataformas.\r\n\r\nTambién van a estar los usuarios qué el administrador/dueño desee agregar como empleados/colaboradores.',
|
|
@@ -0,0 +1,89 @@
|
|
|
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.PartnerNotification = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var Partner_1 = require("./Partner");
|
|
15
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
var PartnerNotification = /** @class */ (function () {
|
|
17
|
+
function PartnerNotification() {
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
+
comment: 'ID único para cada notificación',
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], 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
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.ManyToOne)(function () { return Partner_1.Partner; }, function (partner) { return partner.partners_notification; }, {
|
|
31
|
+
onDelete: 'CASCADE',
|
|
32
|
+
onUpdate: 'NO ACTION',
|
|
33
|
+
}),
|
|
34
|
+
(0, typeorm_1.JoinColumn)({ name: 'partner' }),
|
|
35
|
+
__metadata("design:type", Partner_1.Partner)
|
|
36
|
+
], PartnerNotification.prototype, "partner", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({
|
|
39
|
+
length: 50,
|
|
40
|
+
comment: 'Nombre de la notificación.',
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], PartnerNotification.prototype, "name", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({
|
|
46
|
+
length: 40,
|
|
47
|
+
nullable: true,
|
|
48
|
+
comment: 'Descripción de la notificación.',
|
|
49
|
+
}),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], PartnerNotification.prototype, "description", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({
|
|
54
|
+
type: 'json',
|
|
55
|
+
nullable: true,
|
|
56
|
+
comment: 'Configuración adicional de la notificación, como enlaces, qué hace después de darle click...',
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], PartnerNotification.prototype, "settings", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({
|
|
62
|
+
default: 1,
|
|
63
|
+
comment: 'Si la notificación está pendiente o leída:\r\n1. Pendiente.\r\n2. Leída.',
|
|
64
|
+
}),
|
|
65
|
+
__metadata("design:type", Number)
|
|
66
|
+
], PartnerNotification.prototype, "type", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({
|
|
69
|
+
default: 1,
|
|
70
|
+
comment: 'Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.',
|
|
71
|
+
}),
|
|
72
|
+
__metadata("design:type", Number)
|
|
73
|
+
], PartnerNotification.prototype, "status", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({
|
|
76
|
+
type: 'datetime',
|
|
77
|
+
comment: 'Fecha de creación de la notificación.',
|
|
78
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
79
|
+
}),
|
|
80
|
+
__metadata("design:type", Date)
|
|
81
|
+
], PartnerNotification.prototype, "created", void 0);
|
|
82
|
+
PartnerNotification = __decorate([
|
|
83
|
+
(0, typeorm_1.Entity)('partner_notification', {
|
|
84
|
+
comment: 'Tabla creada para almacenar las notificaciones del usuario.',
|
|
85
|
+
})
|
|
86
|
+
], PartnerNotification);
|
|
87
|
+
return PartnerNotification;
|
|
88
|
+
}());
|
|
89
|
+
exports.PartnerNotification = PartnerNotification;
|
|
@@ -36,4 +36,5 @@ export { Square } from './entities/Square';
|
|
|
36
36
|
export { TypeMeasureIngredient } from './entities/TypeMeasureIngredient';
|
|
37
37
|
export { UserAddress } from './entities/UserAddress';
|
|
38
38
|
export { ProductGroupComplement } from './entities/productGroupComplement';
|
|
39
|
+
export { PartnerNotification } from './entities/PartnerNotification';
|
|
39
40
|
export { LocalsCompany } from './views/LocalsCompany';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LocalsCompany = exports.ProductGroupComplement = exports.UserAddress = exports.TypeMeasureIngredient = exports.Square = exports.RequestStatus = exports.RequestProductGroupComplement = exports.RequestProduct = exports.Request = exports.ProductIngredient = exports.ProductGroup = exports.TerminalSession = exports.Terminal = exports.PaymentMethod = exports.PartnerPermission = exports.MasterRole = exports.MasterPermission = exports.User = exports.TypeFood = exports.Master = exports.Region = exports.ProductTopping = exports.Product = exports.Plan = exports.LocalQualification = exports.DiscountCodeCompany = exports.Day = exports.Configuration = exports.CodeRedemptionHistoryUser = exports.PartnerRole = exports.Partner = exports.Local = exports.DiscountCodeUser = exports.CodeRedemptionHistoryCompany = exports.Country = exports.Company = exports.City = exports.ScheduleCategory = exports.Category = void 0;
|
|
3
|
+
exports.LocalsCompany = exports.PartnerNotification = exports.ProductGroupComplement = exports.UserAddress = exports.TypeMeasureIngredient = exports.Square = exports.RequestStatus = exports.RequestProductGroupComplement = exports.RequestProduct = exports.Request = exports.ProductIngredient = exports.ProductGroup = exports.TerminalSession = exports.Terminal = exports.PaymentMethod = exports.PartnerPermission = exports.MasterRole = exports.MasterPermission = exports.User = exports.TypeFood = exports.Master = exports.Region = exports.ProductTopping = exports.Product = exports.Plan = exports.LocalQualification = exports.DiscountCodeCompany = exports.Day = exports.Configuration = exports.CodeRedemptionHistoryUser = exports.PartnerRole = exports.Partner = exports.Local = exports.DiscountCodeUser = exports.CodeRedemptionHistoryCompany = exports.Country = exports.Company = exports.City = exports.ScheduleCategory = exports.Category = void 0;
|
|
4
4
|
var Category_1 = require("./entities/Category");
|
|
5
5
|
Object.defineProperty(exports, "Category", { enumerable: true, get: function () { return Category_1.Category; } });
|
|
6
6
|
var CategorySchedule_1 = require("./entities/CategorySchedule");
|
|
@@ -77,5 +77,7 @@ var UserAddress_1 = require("./entities/UserAddress");
|
|
|
77
77
|
Object.defineProperty(exports, "UserAddress", { enumerable: true, get: function () { return UserAddress_1.UserAddress; } });
|
|
78
78
|
var productGroupComplement_1 = require("./entities/productGroupComplement");
|
|
79
79
|
Object.defineProperty(exports, "ProductGroupComplement", { enumerable: true, get: function () { return productGroupComplement_1.ProductGroupComplement; } });
|
|
80
|
+
var PartnerNotification_1 = require("./entities/PartnerNotification");
|
|
81
|
+
Object.defineProperty(exports, "PartnerNotification", { enumerable: true, get: function () { return PartnerNotification_1.PartnerNotification; } });
|
|
80
82
|
var LocalsCompany_1 = require("./views/LocalsCompany");
|
|
81
83
|
Object.defineProperty(exports, "LocalsCompany", { enumerable: true, get: function () { return LocalsCompany_1.LocalsCompany; } });
|
package/package.json
CHANGED
package/src/entities/Partner.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { PartnerRole } from './PartnerRole'
|
|
|
18
18
|
import { Terminal } from './Terminal'
|
|
19
19
|
import { TerminalSession } from './TerminalSession'
|
|
20
20
|
import { DateTransformer } from '../transformers/dateTransformer'
|
|
21
|
+
import { PartnerNotification } from './PartnerNotification'
|
|
21
22
|
|
|
22
23
|
@Entity({
|
|
23
24
|
comment:
|
|
@@ -180,4 +181,10 @@ export class Partner {
|
|
|
180
181
|
(terminalSession) => terminalSession.partner
|
|
181
182
|
)
|
|
182
183
|
sessions: TerminalSession[]
|
|
184
|
+
|
|
185
|
+
@OneToMany(
|
|
186
|
+
() => PartnerNotification,
|
|
187
|
+
(partnerNotification) => partnerNotification.partner
|
|
188
|
+
)
|
|
189
|
+
partners_notification: PartnerNotification[]
|
|
183
190
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
|
|
11
|
+
@Entity('partner_notification', {
|
|
12
|
+
comment: 'Tabla creada para almacenar las notificaciones del usuario.',
|
|
13
|
+
})
|
|
14
|
+
export class PartnerNotification {
|
|
15
|
+
@PrimaryGeneratedColumn({
|
|
16
|
+
comment: 'ID único para cada notificación',
|
|
17
|
+
})
|
|
18
|
+
id: number
|
|
19
|
+
|
|
20
|
+
@Column({ length: 10, unique: true, comment: 'Código único del rol.' })
|
|
21
|
+
code: string
|
|
22
|
+
|
|
23
|
+
@ManyToOne(() => Partner, (partner) => partner.partners_notification, {
|
|
24
|
+
onDelete: 'CASCADE',
|
|
25
|
+
onUpdate: 'NO ACTION',
|
|
26
|
+
})
|
|
27
|
+
@JoinColumn({ name: 'partner' })
|
|
28
|
+
partner: Partner
|
|
29
|
+
|
|
30
|
+
@Column({
|
|
31
|
+
length: 50,
|
|
32
|
+
comment: 'Nombre de la notificación.',
|
|
33
|
+
})
|
|
34
|
+
name: string
|
|
35
|
+
|
|
36
|
+
@Column({
|
|
37
|
+
length: 40,
|
|
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
|
+
comment:
|
|
47
|
+
'Configuración adicional de la notificación, como enlaces, qué hace después de darle click...',
|
|
48
|
+
})
|
|
49
|
+
settings: string
|
|
50
|
+
|
|
51
|
+
@Column({
|
|
52
|
+
default: 1,
|
|
53
|
+
comment:
|
|
54
|
+
'Si la notificación está pendiente o leída:\r\n1. Pendiente.\r\n2. Leída.',
|
|
55
|
+
})
|
|
56
|
+
type: number
|
|
57
|
+
|
|
58
|
+
@Column({
|
|
59
|
+
default: 1,
|
|
60
|
+
comment:
|
|
61
|
+
'Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.',
|
|
62
|
+
})
|
|
63
|
+
status: number
|
|
64
|
+
|
|
65
|
+
@Column({
|
|
66
|
+
type: 'datetime',
|
|
67
|
+
comment: 'Fecha de creación de la notificación.',
|
|
68
|
+
transformer: new DateTransformer(),
|
|
69
|
+
})
|
|
70
|
+
created: Date
|
|
71
|
+
}
|
|
@@ -36,4 +36,5 @@ export { Square } from './entities/Square'
|
|
|
36
36
|
export { TypeMeasureIngredient } from './entities/TypeMeasureIngredient'
|
|
37
37
|
export { UserAddress } from './entities/UserAddress'
|
|
38
38
|
export { ProductGroupComplement } from './entities/productGroupComplement'
|
|
39
|
+
export { PartnerNotification } from './entities/PartnerNotification'
|
|
39
40
|
export { LocalsCompany } from './views/LocalsCompany'
|