test-entity-library-asm 2.8.6 → 2.8.7
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MasterNotification, ReassignReview, VerifyLocal } from '..';
|
|
1
|
+
import { MasterNotification, PartnerNotification, ReassignReview, VerifyLocal } from '..';
|
|
2
2
|
import { City } from './City';
|
|
3
3
|
import { DiscountCodeCompany } from './DiscountCodeCompany';
|
|
4
4
|
import { MasterRole } from './MasterRole';
|
|
@@ -24,4 +24,5 @@ export declare class Master {
|
|
|
24
24
|
master_notifications: MasterNotification[];
|
|
25
25
|
reassign_reviews: ReassignReview[];
|
|
26
26
|
reassign_review_news: ReassignReview[];
|
|
27
|
+
masters_notification: PartnerNotification[];
|
|
27
28
|
}
|
package/dist/entities/Master.js
CHANGED
|
@@ -156,6 +156,10 @@ var Master = /** @class */ (function () {
|
|
|
156
156
|
(0, typeorm_1.OneToMany)(function () { return __1.ReassignReview; }, function (reassignReview) { return reassignReview.new_user; }),
|
|
157
157
|
__metadata("design:type", Array)
|
|
158
158
|
], Master.prototype, "reassign_review_news", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
(0, typeorm_1.OneToMany)(function () { return __1.PartnerNotification; }, function (partner_notification) { return partner_notification.master; }),
|
|
161
|
+
__metadata("design:type", Array)
|
|
162
|
+
], Master.prototype, "masters_notification", void 0);
|
|
159
163
|
Master = __decorate([
|
|
160
164
|
(0, typeorm_1.Entity)({
|
|
161
165
|
comment: 'Tabla agregada para los usuarios qué son administradores de la plataforma.',
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Partner } from './Partner';
|
|
2
|
+
import { Master } from './Master';
|
|
2
3
|
export declare class PartnerNotification {
|
|
3
4
|
id: number;
|
|
4
5
|
partner: Partner;
|
|
6
|
+
master: Master;
|
|
5
7
|
name: string;
|
|
6
8
|
description: string;
|
|
7
9
|
settings: any;
|
|
8
|
-
type: number;
|
|
9
10
|
status: number;
|
|
10
11
|
created: Date;
|
|
11
12
|
}
|
|
@@ -14,6 +14,7 @@ var typeorm_1 = require("typeorm");
|
|
|
14
14
|
var Partner_1 = require("./Partner");
|
|
15
15
|
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
16
|
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
17
|
+
var Master_1 = require("./Master");
|
|
17
18
|
var PartnerNotification = /** @class */ (function () {
|
|
18
19
|
function PartnerNotification() {
|
|
19
20
|
}
|
|
@@ -31,6 +32,14 @@ var PartnerNotification = /** @class */ (function () {
|
|
|
31
32
|
(0, typeorm_1.JoinColumn)({ name: 'partner' }),
|
|
32
33
|
__metadata("design:type", Partner_1.Partner)
|
|
33
34
|
], PartnerNotification.prototype, "partner", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.ManyToOne)(function () { return Master_1.Master; }, function (master) { return master.masters_notification; }, {
|
|
37
|
+
onDelete: 'CASCADE',
|
|
38
|
+
onUpdate: 'NO ACTION',
|
|
39
|
+
}),
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: 'master' }),
|
|
41
|
+
__metadata("design:type", Master_1.Master)
|
|
42
|
+
], PartnerNotification.prototype, "master", void 0);
|
|
34
43
|
__decorate([
|
|
35
44
|
(0, typeorm_1.Column)({
|
|
36
45
|
length: 200,
|
|
@@ -55,13 +64,6 @@ var PartnerNotification = /** @class */ (function () {
|
|
|
55
64
|
}),
|
|
56
65
|
__metadata("design:type", Object)
|
|
57
66
|
], PartnerNotification.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
|
-
], PartnerNotification.prototype, "type", void 0);
|
|
65
67
|
__decorate([
|
|
66
68
|
(0, typeorm_1.Column)({
|
|
67
69
|
default: 1,
|
package/package.json
CHANGED
package/src/entities/Master.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
OneToMany,
|
|
9
9
|
PrimaryGeneratedColumn,
|
|
10
10
|
} from 'typeorm'
|
|
11
|
-
import { MasterNotification, ReassignReview, VerifyLocal } from '..'
|
|
11
|
+
import { MasterNotification, PartnerNotification, ReassignReview, VerifyLocal } from '..'
|
|
12
12
|
import { DateTransformer } from '../transformers/dateTransformer'
|
|
13
13
|
import { jsonTransformer } from '../transformers/jsonTransformer'
|
|
14
14
|
import { City } from './City'
|
|
@@ -146,4 +146,10 @@ export class Master {
|
|
|
146
146
|
|
|
147
147
|
@OneToMany(() => ReassignReview, (reassignReview) => reassignReview.new_user)
|
|
148
148
|
reassign_review_news: ReassignReview[]
|
|
149
|
+
|
|
150
|
+
@OneToMany(
|
|
151
|
+
() => PartnerNotification,
|
|
152
|
+
(partner_notification) => partner_notification.master
|
|
153
|
+
)
|
|
154
|
+
masters_notification: PartnerNotification[]
|
|
149
155
|
}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
import { Partner } from './Partner'
|
|
9
9
|
import { DateTransformer } from '../transformers/dateTransformer'
|
|
10
10
|
import { jsonTransformer } from '../transformers/jsonTransformer'
|
|
11
|
+
import { Master } from './Master'
|
|
11
12
|
|
|
12
13
|
@Entity('partner_notification', {
|
|
13
14
|
comment: 'Tabla creada para almacenar las notificaciones del usuario.',
|
|
@@ -25,6 +26,13 @@ export class PartnerNotification {
|
|
|
25
26
|
@JoinColumn({ name: 'partner' })
|
|
26
27
|
partner: Partner
|
|
27
28
|
|
|
29
|
+
@ManyToOne(() => Master, (master) => master.masters_notification, {
|
|
30
|
+
onDelete: 'CASCADE',
|
|
31
|
+
onUpdate: 'NO ACTION',
|
|
32
|
+
})
|
|
33
|
+
@JoinColumn({ name: 'master' })
|
|
34
|
+
master: Master
|
|
35
|
+
|
|
28
36
|
@Column({
|
|
29
37
|
length: 200,
|
|
30
38
|
comment: 'Nombre de la notificación.',
|
|
@@ -47,13 +55,6 @@ export class PartnerNotification {
|
|
|
47
55
|
})
|
|
48
56
|
settings: any
|
|
49
57
|
|
|
50
|
-
@Column({
|
|
51
|
-
default: 1,
|
|
52
|
-
comment:
|
|
53
|
-
'Si la notificación está pendiente o leída:\r\n1. Pendiente.\r\n2. Leída.',
|
|
54
|
-
})
|
|
55
|
-
type: number
|
|
56
|
-
|
|
57
58
|
@Column({
|
|
58
59
|
default: 1,
|
|
59
60
|
comment:
|