test-entity-library-asm 3.1.5 → 3.1.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.
- package/dist/entities/Company.d.ts +10 -9
- package/dist/entities/Company.js +34 -25
- package/dist/entities/Local.d.ts +11 -13
- package/dist/entities/Local.js +43 -48
- package/dist/entities/Partner.d.ts +3 -6
- package/dist/entities/Partner.js +7 -24
- package/dist/entities/PartnerSession.d.ts +13 -0
- package/dist/entities/PartnerSession.js +104 -0
- package/dist/entities.views.routes.d.ts +1 -2
- package/dist/entities.views.routes.js +4 -6
- package/dist/filters/LoginTerminalPartner.d.ts +3 -0
- package/dist/filters/LoginTerminalPartner.js +74 -0
- package/dist/interfaces.d.ts +3 -0
- package/package.json +1 -1
- package/src/CustomRepository.ts +1 -0
- package/src/entities/Company.ts +65 -57
- package/src/entities/Local.ts +79 -84
- package/src/entities/Partner.ts +7 -27
- package/src/entities/PartnerSession.ts +88 -0
- package/src/entities.views.routes.ts +1 -2
- package/src/interfaces.ts +4 -0
- package/src/entities/Terminal.ts +0 -67
- package/src/entities/TerminalSession.ts +0 -56
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { City } from
|
|
2
|
-
import { CodeRedemptionHistoryCompany } from
|
|
3
|
-
import { DiscountCodeUser } from
|
|
4
|
-
import { Local } from
|
|
5
|
-
import { Partner } from
|
|
6
|
-
import { PartnerRole } from
|
|
7
|
-
import { Plan } from
|
|
8
|
-
import { ProductTopping } from
|
|
9
|
-
import { IPropsContactDetails } from
|
|
1
|
+
import { City } from "./City";
|
|
2
|
+
import { CodeRedemptionHistoryCompany } from "./CodeRedemptionHistoryCompany";
|
|
3
|
+
import { DiscountCodeUser } from "./DiscountCodeUser";
|
|
4
|
+
import { Local } from "./Local";
|
|
5
|
+
import { Partner } from "./Partner";
|
|
6
|
+
import { PartnerRole } from "./PartnerRole";
|
|
7
|
+
import { Plan } from "./Plan";
|
|
8
|
+
import { ProductTopping } from "./ProductTopping";
|
|
9
|
+
import { IPropsContactDetails } from "../interfaces";
|
|
10
10
|
export declare class Company {
|
|
11
11
|
id: number;
|
|
12
12
|
code: string;
|
|
@@ -17,6 +17,7 @@ export declare class Company {
|
|
|
17
17
|
contact_details: IPropsContactDetails | null;
|
|
18
18
|
legal_information: any;
|
|
19
19
|
legal_agent: any;
|
|
20
|
+
settings: any;
|
|
20
21
|
created: Date;
|
|
21
22
|
expiration: Date;
|
|
22
23
|
updated: Date;
|
package/dist/entities/Company.js
CHANGED
|
@@ -26,98 +26,107 @@ var Company = /** @class */ (function () {
|
|
|
26
26
|
}
|
|
27
27
|
__decorate([
|
|
28
28
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
29
|
-
comment:
|
|
29
|
+
comment: "Número de identificación (ID) único de cada empresa.",
|
|
30
30
|
}),
|
|
31
31
|
__metadata("design:type", Number)
|
|
32
32
|
], Company.prototype, "id", void 0);
|
|
33
33
|
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ length: 30, unique: true, comment:
|
|
34
|
+
(0, typeorm_1.Column)({ length: 30, unique: true, comment: "Código único de la empresa." }),
|
|
35
35
|
__metadata("design:type", String)
|
|
36
36
|
], Company.prototype, "code", void 0);
|
|
37
37
|
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({ length: 50, comment:
|
|
38
|
+
(0, typeorm_1.Column)({ length: 50, comment: "Nombre de la empresa." }),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], Company.prototype, "name", void 0);
|
|
41
41
|
__decorate([
|
|
42
42
|
(0, typeorm_1.ManyToOne)(function () { return City_1.City; }, function (city) { return city.companies; }, {
|
|
43
|
-
onDelete:
|
|
44
|
-
onUpdate:
|
|
43
|
+
onDelete: "RESTRICT",
|
|
44
|
+
onUpdate: "NO ACTION",
|
|
45
45
|
}),
|
|
46
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
46
|
+
(0, typeorm_1.JoinColumn)({ name: "city" }),
|
|
47
47
|
__metadata("design:type", City_1.City)
|
|
48
48
|
], Company.prototype, "city", void 0);
|
|
49
49
|
__decorate([
|
|
50
50
|
(0, typeorm_1.ManyToOne)(function () { return Partner_1.Partner; }, function (partner) { return partner.companies; }, {
|
|
51
|
-
onDelete:
|
|
52
|
-
onUpdate:
|
|
51
|
+
onDelete: "CASCADE",
|
|
52
|
+
onUpdate: "NO ACTION",
|
|
53
53
|
}),
|
|
54
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
54
|
+
(0, typeorm_1.JoinColumn)({ name: "partner" }),
|
|
55
55
|
__metadata("design:type", Partner_1.Partner)
|
|
56
56
|
], Company.prototype, "partner", void 0);
|
|
57
57
|
__decorate([
|
|
58
58
|
(0, typeorm_1.Column)({
|
|
59
|
-
type:
|
|
59
|
+
type: "longtext",
|
|
60
60
|
nullable: true,
|
|
61
61
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
62
|
-
comment:
|
|
62
|
+
comment: "Campo de tipo JSON donde se guarda información necesaria para la empresa.",
|
|
63
63
|
}),
|
|
64
64
|
__metadata("design:type", Object)
|
|
65
65
|
], Company.prototype, "profile", void 0);
|
|
66
66
|
__decorate([
|
|
67
67
|
(0, typeorm_1.Column)({
|
|
68
|
-
type:
|
|
68
|
+
type: "text",
|
|
69
69
|
nullable: true,
|
|
70
70
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
71
|
-
comment:
|
|
71
|
+
comment: "Campo de tipo JSON donde se guarda información para guardar el teléfono y el correo electrónico, también los nuevos valores qué tengan esos 2 campos.",
|
|
72
72
|
}),
|
|
73
73
|
__metadata("design:type", Object)
|
|
74
74
|
], Company.prototype, "contact_details", void 0);
|
|
75
75
|
__decorate([
|
|
76
76
|
(0, typeorm_1.Column)({
|
|
77
|
-
type:
|
|
77
|
+
type: "longtext",
|
|
78
78
|
nullable: true,
|
|
79
79
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
80
|
-
comment:
|
|
80
|
+
comment: "Información de tipo JSON donde se guarda la información legal de la empresa.",
|
|
81
81
|
}),
|
|
82
82
|
__metadata("design:type", Object)
|
|
83
83
|
], Company.prototype, "legal_information", void 0);
|
|
84
84
|
__decorate([
|
|
85
85
|
(0, typeorm_1.Column)({
|
|
86
|
-
type:
|
|
86
|
+
type: "longtext",
|
|
87
87
|
nullable: true,
|
|
88
88
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
89
|
-
comment:
|
|
89
|
+
comment: "Información de tipo JSON donde se guarda la información del representante legal del representante.",
|
|
90
90
|
}),
|
|
91
91
|
__metadata("design:type", Object)
|
|
92
92
|
], Company.prototype, "legal_agent", void 0);
|
|
93
93
|
__decorate([
|
|
94
94
|
(0, typeorm_1.Column)({
|
|
95
|
-
type:
|
|
95
|
+
type: "longtext",
|
|
96
|
+
nullable: true,
|
|
97
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
98
|
+
comment: "Configuración de la empresa.",
|
|
99
|
+
}),
|
|
100
|
+
__metadata("design:type", Object)
|
|
101
|
+
], Company.prototype, "settings", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, typeorm_1.Column)({
|
|
104
|
+
type: "datetime",
|
|
96
105
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
97
|
-
comment:
|
|
106
|
+
comment: "Fecha creación de la empresa.",
|
|
98
107
|
}),
|
|
99
108
|
__metadata("design:type", Date)
|
|
100
109
|
], Company.prototype, "created", void 0);
|
|
101
110
|
__decorate([
|
|
102
111
|
(0, typeorm_1.Column)({
|
|
103
|
-
type:
|
|
112
|
+
type: "date",
|
|
104
113
|
nullable: true,
|
|
105
|
-
comment:
|
|
114
|
+
comment: "Cuándo expira el plan de la empresa.",
|
|
106
115
|
}),
|
|
107
116
|
__metadata("design:type", Date)
|
|
108
117
|
], Company.prototype, "expiration", void 0);
|
|
109
118
|
__decorate([
|
|
110
119
|
(0, typeorm_1.Column)({
|
|
111
|
-
type:
|
|
120
|
+
type: "datetime",
|
|
112
121
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
113
|
-
comment:
|
|
122
|
+
comment: "Fecha de actualización de la empresa.",
|
|
114
123
|
}),
|
|
115
124
|
__metadata("design:type", Date)
|
|
116
125
|
], Company.prototype, "updated", void 0);
|
|
117
126
|
__decorate([
|
|
118
127
|
(0, typeorm_1.Column)({
|
|
119
128
|
default: 1,
|
|
120
|
-
comment:
|
|
129
|
+
comment: "Estado de la empresa, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
121
130
|
}),
|
|
122
131
|
__metadata("design:type", Number)
|
|
123
132
|
], Company.prototype, "status", void 0);
|
|
@@ -151,7 +160,7 @@ var Company = /** @class */ (function () {
|
|
|
151
160
|
], Company.prototype, "plans_company", void 0);
|
|
152
161
|
Company = __decorate([
|
|
153
162
|
(0, typeorm_1.Entity)({
|
|
154
|
-
comment:
|
|
163
|
+
comment: "Tabla creada para las empresas de comida rápida que deseen registrarse en la plataforma.",
|
|
155
164
|
})
|
|
156
165
|
], Company);
|
|
157
166
|
return Company;
|
package/dist/entities/Local.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { DiscountCodeUser, LocalPlan, PosSystem } from '..';
|
|
1
|
+
import { DiscountCodeUser, LocalPlan, PosSystem } from "..";
|
|
2
|
+
import { BusinessTypeProduct } from "./BusinessTypeProduct";
|
|
3
|
+
import { Category } from "./Category";
|
|
4
|
+
import { City } from "./City";
|
|
5
|
+
import { Company } from "./Company";
|
|
6
|
+
import { LocalQualification } from "./LocalQualification";
|
|
7
|
+
import { Partner } from "./Partner";
|
|
8
|
+
import { PaymentMethod } from "./PaymentMethod";
|
|
9
|
+
import { Request } from "./Request";
|
|
10
|
+
import { Square } from "./Square";
|
|
11
|
+
import { User } from "./User";
|
|
13
12
|
export declare class Local {
|
|
14
13
|
id: number;
|
|
15
14
|
company: Company;
|
|
@@ -32,7 +31,6 @@ export declare class Local {
|
|
|
32
31
|
payment_methods: PaymentMethod[];
|
|
33
32
|
qualifications: LocalQualification[];
|
|
34
33
|
requests: Request[];
|
|
35
|
-
terminals: Terminal[];
|
|
36
34
|
users_favorite_local: User[];
|
|
37
35
|
business_type_products: BusinessTypeProduct[];
|
|
38
36
|
discount_code_locals: DiscountCodeUser[];
|
package/dist/entities/Local.js
CHANGED
|
@@ -11,34 +11,33 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Local = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
|
+
var __1 = require("..");
|
|
15
|
+
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
16
|
+
var BusinessTypeProduct_1 = require("./BusinessTypeProduct");
|
|
14
17
|
var Category_1 = require("./Category");
|
|
15
18
|
var City_1 = require("./City");
|
|
16
19
|
var Company_1 = require("./Company");
|
|
17
20
|
var LocalQualification_1 = require("./LocalQualification");
|
|
21
|
+
var Partner_1 = require("./Partner");
|
|
18
22
|
var PaymentMethod_1 = require("./PaymentMethod");
|
|
19
23
|
var Request_1 = require("./Request");
|
|
20
24
|
var Square_1 = require("./Square");
|
|
21
|
-
var Terminal_1 = require("./Terminal");
|
|
22
25
|
var User_1 = require("./User");
|
|
23
|
-
var Partner_1 = require("./Partner");
|
|
24
|
-
var BusinessTypeProduct_1 = require("./BusinessTypeProduct");
|
|
25
|
-
var __1 = require("..");
|
|
26
|
-
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
27
26
|
var Local = /** @class */ (function () {
|
|
28
27
|
function Local() {
|
|
29
28
|
}
|
|
30
29
|
__decorate([
|
|
31
30
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
32
|
-
comment:
|
|
31
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
33
32
|
}),
|
|
34
33
|
__metadata("design:type", Number)
|
|
35
34
|
], Local.prototype, "id", void 0);
|
|
36
35
|
__decorate([
|
|
37
36
|
(0, typeorm_1.ManyToOne)(function () { return Company_1.Company; }, function (company) { return company.locals; }, {
|
|
38
|
-
onDelete:
|
|
39
|
-
onUpdate:
|
|
37
|
+
onDelete: "CASCADE",
|
|
38
|
+
onUpdate: "NO ACTION",
|
|
40
39
|
}),
|
|
41
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
42
41
|
__metadata("design:type", Company_1.Company)
|
|
43
42
|
], Local.prototype, "company", void 0);
|
|
44
43
|
__decorate([
|
|
@@ -47,10 +46,10 @@ var Local = /** @class */ (function () {
|
|
|
47
46
|
], Local.prototype, "name", void 0);
|
|
48
47
|
__decorate([
|
|
49
48
|
(0, typeorm_1.ManyToOne)(function () { return City_1.City; }, function (city) { return city.locals; }, {
|
|
50
|
-
onDelete:
|
|
51
|
-
onUpdate:
|
|
49
|
+
onDelete: "RESTRICT",
|
|
50
|
+
onUpdate: "NO ACTION",
|
|
52
51
|
}),
|
|
53
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
52
|
+
(0, typeorm_1.JoinColumn)({ name: "city" }),
|
|
54
53
|
__metadata("design:type", City_1.City)
|
|
55
54
|
], Local.prototype, "city", void 0);
|
|
56
55
|
__decorate([
|
|
@@ -58,88 +57,88 @@ var Local = /** @class */ (function () {
|
|
|
58
57
|
__metadata("design:type", String)
|
|
59
58
|
], Local.prototype, "address", void 0);
|
|
60
59
|
__decorate([
|
|
61
|
-
(0, typeorm_1.Column)({ type:
|
|
60
|
+
(0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 8 }),
|
|
62
61
|
__metadata("design:type", Number)
|
|
63
62
|
], Local.prototype, "latitude", void 0);
|
|
64
63
|
__decorate([
|
|
65
|
-
(0, typeorm_1.Column)({ type:
|
|
64
|
+
(0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 8 }),
|
|
66
65
|
__metadata("design:type", Number)
|
|
67
66
|
], Local.prototype, "longitude", void 0);
|
|
68
67
|
__decorate([
|
|
69
68
|
(0, typeorm_1.Column)({
|
|
70
|
-
type:
|
|
69
|
+
type: "longtext",
|
|
71
70
|
nullable: true,
|
|
72
71
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
73
|
-
comment:
|
|
72
|
+
comment: "Campo de tipo JSON por si es necesario agregar información adicional",
|
|
74
73
|
}),
|
|
75
74
|
__metadata("design:type", Object)
|
|
76
75
|
], Local.prototype, "details", void 0);
|
|
77
76
|
__decorate([
|
|
78
|
-
(0, typeorm_1.Column)({ type:
|
|
77
|
+
(0, typeorm_1.Column)({ type: "datetime" }),
|
|
79
78
|
__metadata("design:type", Date)
|
|
80
79
|
], Local.prototype, "created", void 0);
|
|
81
80
|
__decorate([
|
|
82
|
-
(0, typeorm_1.Column)({ type:
|
|
81
|
+
(0, typeorm_1.Column)({ type: "datetime" }),
|
|
83
82
|
__metadata("design:type", Date)
|
|
84
83
|
], Local.prototype, "updated", void 0);
|
|
85
84
|
__decorate([
|
|
86
85
|
(0, typeorm_1.ManyToOne)(function () { return Partner_1.Partner; }, function (partner) { return partner.locals; }, {
|
|
87
|
-
onDelete:
|
|
88
|
-
onUpdate:
|
|
86
|
+
onDelete: "NO ACTION",
|
|
87
|
+
onUpdate: "NO ACTION",
|
|
89
88
|
}),
|
|
90
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
89
|
+
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
91
90
|
__metadata("design:type", Partner_1.Partner)
|
|
92
91
|
], Local.prototype, "updated_by", void 0);
|
|
93
92
|
__decorate([
|
|
94
93
|
(0, typeorm_1.ManyToOne)(function () { return Square_1.Square; }, function (square) { return square.locals; }, {
|
|
95
|
-
onDelete:
|
|
96
|
-
onUpdate:
|
|
94
|
+
onDelete: "RESTRICT",
|
|
95
|
+
onUpdate: "NO ACTION",
|
|
97
96
|
}),
|
|
98
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
97
|
+
(0, typeorm_1.JoinColumn)({ name: "square" }),
|
|
99
98
|
__metadata("design:type", Square_1.Square)
|
|
100
99
|
], Local.prototype, "square", void 0);
|
|
101
100
|
__decorate([
|
|
102
101
|
(0, typeorm_1.ManyToOne)(function () { return __1.PosSystem; }, function (posSystem) { return posSystem.locals_pos_system; }, {
|
|
103
|
-
onDelete:
|
|
104
|
-
onUpdate:
|
|
102
|
+
onDelete: "RESTRICT",
|
|
103
|
+
onUpdate: "NO ACTION",
|
|
105
104
|
}),
|
|
106
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
105
|
+
(0, typeorm_1.JoinColumn)({ name: "pos_system" }),
|
|
107
106
|
__metadata("design:type", __1.PosSystem)
|
|
108
107
|
], Local.prototype, "pos_system", void 0);
|
|
109
108
|
__decorate([
|
|
110
109
|
(0, typeorm_1.Column)({
|
|
111
|
-
type:
|
|
110
|
+
type: "text",
|
|
112
111
|
nullable: true,
|
|
113
112
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
114
|
-
comment:
|
|
113
|
+
comment: "Campo de tipo JSON por si es necesario agregar información adicional",
|
|
115
114
|
}),
|
|
116
115
|
__metadata("design:type", String)
|
|
117
116
|
], Local.prototype, "pos_system_settings", void 0);
|
|
118
117
|
__decorate([
|
|
119
118
|
(0, typeorm_1.Column)({
|
|
120
119
|
default: 1,
|
|
121
|
-
comment:
|
|
120
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
122
121
|
}),
|
|
123
122
|
__metadata("design:type", Number)
|
|
124
123
|
], Local.prototype, "status", void 0);
|
|
125
124
|
__decorate([
|
|
126
125
|
(0, typeorm_1.Column)({
|
|
127
126
|
default: 1,
|
|
128
|
-
comment:
|
|
127
|
+
comment: "Es el estado para verificar si se envía en la papelera o no.",
|
|
129
128
|
}),
|
|
130
129
|
__metadata("design:type", Number)
|
|
131
130
|
], Local.prototype, "visible", void 0);
|
|
132
131
|
__decorate([
|
|
133
132
|
(0, typeorm_1.ManyToMany)(function () { return Partner_1.Partner; }, function (partner) { return partner.locals_partner; }),
|
|
134
133
|
(0, typeorm_1.JoinTable)({
|
|
135
|
-
name:
|
|
134
|
+
name: "local_partner",
|
|
136
135
|
joinColumn: {
|
|
137
|
-
name:
|
|
138
|
-
referencedColumnName:
|
|
136
|
+
name: "local",
|
|
137
|
+
referencedColumnName: "id",
|
|
139
138
|
},
|
|
140
139
|
inverseJoinColumn: {
|
|
141
|
-
name:
|
|
142
|
-
referencedColumnName:
|
|
140
|
+
name: "partner",
|
|
141
|
+
referencedColumnName: "id",
|
|
143
142
|
},
|
|
144
143
|
}),
|
|
145
144
|
__metadata("design:type", Array)
|
|
@@ -151,7 +150,7 @@ var Local = /** @class */ (function () {
|
|
|
151
150
|
__decorate([
|
|
152
151
|
(0, typeorm_1.ManyToMany)(function () { return PaymentMethod_1.PaymentMethod; }),
|
|
153
152
|
(0, typeorm_1.JoinTable)({
|
|
154
|
-
name:
|
|
153
|
+
name: "local_payment_method",
|
|
155
154
|
}),
|
|
156
155
|
__metadata("design:type", Array)
|
|
157
156
|
], Local.prototype, "payment_methods", void 0);
|
|
@@ -163,28 +162,24 @@ var Local = /** @class */ (function () {
|
|
|
163
162
|
(0, typeorm_1.OneToMany)(function () { return Request_1.Request; }, function (request) { return request.local; }),
|
|
164
163
|
__metadata("design:type", Array)
|
|
165
164
|
], Local.prototype, "requests", void 0);
|
|
166
|
-
__decorate([
|
|
167
|
-
(0, typeorm_1.OneToMany)(function () { return Terminal_1.Terminal; }, function (terminal) { return terminal.local; }),
|
|
168
|
-
__metadata("design:type", Array)
|
|
169
|
-
], Local.prototype, "terminals", void 0);
|
|
170
165
|
__decorate([
|
|
171
166
|
(0, typeorm_1.ManyToMany)(function () { return User_1.User; }),
|
|
172
167
|
(0, typeorm_1.JoinTable)({
|
|
173
|
-
name:
|
|
168
|
+
name: "user_favorite_local",
|
|
174
169
|
}),
|
|
175
170
|
__metadata("design:type", Array)
|
|
176
171
|
], Local.prototype, "users_favorite_local", void 0);
|
|
177
172
|
__decorate([
|
|
178
173
|
(0, typeorm_1.ManyToMany)(function () { return BusinessTypeProduct_1.BusinessTypeProduct; }),
|
|
179
174
|
(0, typeorm_1.JoinTable)({
|
|
180
|
-
name:
|
|
175
|
+
name: "business_type_product_local",
|
|
181
176
|
joinColumn: {
|
|
182
|
-
name:
|
|
183
|
-
referencedColumnName:
|
|
177
|
+
name: "local",
|
|
178
|
+
referencedColumnName: "id",
|
|
184
179
|
},
|
|
185
180
|
inverseJoinColumn: {
|
|
186
|
-
name:
|
|
187
|
-
referencedColumnName:
|
|
181
|
+
name: "business_type_product",
|
|
182
|
+
referencedColumnName: "id",
|
|
188
183
|
},
|
|
189
184
|
}),
|
|
190
185
|
__metadata("design:type", Array)
|
|
@@ -198,7 +193,7 @@ var Local = /** @class */ (function () {
|
|
|
198
193
|
__metadata("design:type", Array)
|
|
199
194
|
], Local.prototype, "locals_plan", void 0);
|
|
200
195
|
Local = __decorate([
|
|
201
|
-
(0, typeorm_1.Entity)({ comment:
|
|
196
|
+
(0, typeorm_1.Entity)({ comment: "Locales disponibles de las empresas (company)." })
|
|
202
197
|
], Local);
|
|
203
198
|
return Local;
|
|
204
199
|
}());
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
+
import { Category, MasterNotification, PartnerSession, Product, VerifyLocal } from "..";
|
|
1
2
|
import { City } from "./City";
|
|
2
3
|
import { Company } from "./Company";
|
|
3
4
|
import { DiscountCodeUser } from "./DiscountCodeUser";
|
|
4
5
|
import { Local } from "./Local";
|
|
5
|
-
import { PartnerRole } from "./PartnerRole";
|
|
6
|
-
import { Terminal } from "./Terminal";
|
|
7
|
-
import { TerminalSession } from "./TerminalSession";
|
|
8
6
|
import { PartnerNotification } from "./PartnerNotification";
|
|
9
|
-
import {
|
|
7
|
+
import { PartnerRole } from "./PartnerRole";
|
|
10
8
|
export declare class Partner {
|
|
11
9
|
id: number;
|
|
12
10
|
company: Company;
|
|
@@ -30,8 +28,6 @@ export declare class Partner {
|
|
|
30
28
|
locals: Local[];
|
|
31
29
|
locals_partner: Local[];
|
|
32
30
|
partners_roles: PartnerRole[];
|
|
33
|
-
terminals: Terminal[];
|
|
34
|
-
sessions: TerminalSession[];
|
|
35
31
|
partners_notification: PartnerNotification[];
|
|
36
32
|
verifyLocals: VerifyLocal[];
|
|
37
33
|
partners_to_notification: PartnerNotification[];
|
|
@@ -40,4 +36,5 @@ export declare class Partner {
|
|
|
40
36
|
partners_created_by: Product[];
|
|
41
37
|
partners_category_update_by: Category[];
|
|
42
38
|
partners_category_created_by: Category[];
|
|
39
|
+
partners: PartnerSession[];
|
|
43
40
|
}
|
package/dist/entities/Partner.js
CHANGED
|
@@ -11,17 +11,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Partner = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
|
+
var __1 = require("..");
|
|
15
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
14
16
|
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
15
17
|
var City_1 = require("./City");
|
|
16
18
|
var Company_1 = require("./Company");
|
|
17
19
|
var DiscountCodeUser_1 = require("./DiscountCodeUser");
|
|
18
20
|
var Local_1 = require("./Local");
|
|
19
|
-
var PartnerRole_1 = require("./PartnerRole");
|
|
20
|
-
var Terminal_1 = require("./Terminal");
|
|
21
|
-
var TerminalSession_1 = require("./TerminalSession");
|
|
22
|
-
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
23
21
|
var PartnerNotification_1 = require("./PartnerNotification");
|
|
24
|
-
var
|
|
22
|
+
var PartnerRole_1 = require("./PartnerRole");
|
|
25
23
|
var Partner = /** @class */ (function () {
|
|
26
24
|
function Partner() {
|
|
27
25
|
}
|
|
@@ -184,25 +182,6 @@ var Partner = /** @class */ (function () {
|
|
|
184
182
|
}),
|
|
185
183
|
__metadata("design:type", Array)
|
|
186
184
|
], Partner.prototype, "partners_roles", void 0);
|
|
187
|
-
__decorate([
|
|
188
|
-
(0, typeorm_1.ManyToMany)(function () { return Terminal_1.Terminal; }, function (terminal) { return terminal.partners; }),
|
|
189
|
-
(0, typeorm_1.JoinTable)({
|
|
190
|
-
name: "partner_terminal",
|
|
191
|
-
joinColumn: {
|
|
192
|
-
name: "partner",
|
|
193
|
-
referencedColumnName: "id",
|
|
194
|
-
},
|
|
195
|
-
inverseJoinColumn: {
|
|
196
|
-
name: "terminal",
|
|
197
|
-
referencedColumnName: "id",
|
|
198
|
-
},
|
|
199
|
-
}),
|
|
200
|
-
__metadata("design:type", Array)
|
|
201
|
-
], Partner.prototype, "terminals", void 0);
|
|
202
|
-
__decorate([
|
|
203
|
-
(0, typeorm_1.OneToMany)(function () { return TerminalSession_1.TerminalSession; }, function (terminalSession) { return terminalSession.partner; }),
|
|
204
|
-
__metadata("design:type", Array)
|
|
205
|
-
], Partner.prototype, "sessions", void 0);
|
|
206
185
|
__decorate([
|
|
207
186
|
(0, typeorm_1.OneToMany)(function () { return PartnerNotification_1.PartnerNotification; }, function (partnerNotification) { return partnerNotification.partner; }),
|
|
208
187
|
__metadata("design:type", Array)
|
|
@@ -246,6 +225,10 @@ var Partner = /** @class */ (function () {
|
|
|
246
225
|
(0, typeorm_1.OneToMany)(function () { return __1.Category; }, function (category) { return category.created_by; }),
|
|
247
226
|
__metadata("design:type", Array)
|
|
248
227
|
], Partner.prototype, "partners_category_created_by", void 0);
|
|
228
|
+
__decorate([
|
|
229
|
+
(0, typeorm_1.OneToMany)(function () { return __1.PartnerSession; }, function (partnerSession) { return partnerSession.partner; }),
|
|
230
|
+
__metadata("design:type", Array)
|
|
231
|
+
], Partner.prototype, "partners", void 0);
|
|
249
232
|
Partner = __decorate([
|
|
250
233
|
(0, typeorm_1.Entity)({
|
|
251
234
|
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,13 @@
|
|
|
1
|
+
import { Partner } from "..";
|
|
2
|
+
export declare class PartnerSession {
|
|
3
|
+
id: number;
|
|
4
|
+
partner: Partner;
|
|
5
|
+
platform: number;
|
|
6
|
+
token: string;
|
|
7
|
+
ip_address: string;
|
|
8
|
+
start_time: Date;
|
|
9
|
+
finish_time: Date;
|
|
10
|
+
status: number;
|
|
11
|
+
created: Date;
|
|
12
|
+
updated: Date;
|
|
13
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
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.PartnerSession = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var __1 = require("..");
|
|
15
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
var PartnerSession = /** @class */ (function () {
|
|
17
|
+
function PartnerSession() {
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], PartnerSession.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.partners; }, {
|
|
27
|
+
onDelete: "CASCADE",
|
|
28
|
+
onUpdate: "NO ACTION",
|
|
29
|
+
}),
|
|
30
|
+
(0, typeorm_1.JoinColumn)({ name: "partner" }),
|
|
31
|
+
__metadata("design:type", __1.Partner)
|
|
32
|
+
], PartnerSession.prototype, "partner", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({
|
|
35
|
+
comment: "Plataforma a la que está inciando sesión:\r\n1. Administrador.\r\n2. Portal - Terminal.",
|
|
36
|
+
}),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], PartnerSession.prototype, "platform", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({
|
|
41
|
+
length: 255,
|
|
42
|
+
comment: "Token generado para la sesión.",
|
|
43
|
+
}),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], PartnerSession.prototype, "token", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({
|
|
48
|
+
length: 255,
|
|
49
|
+
comment: "Dirección IP de donde está accediendo.",
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], PartnerSession.prototype, "ip_address", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({
|
|
55
|
+
type: "datetime",
|
|
56
|
+
default: function () { return "CURRENT_TIMESTAMP"; },
|
|
57
|
+
comment: "Fecha de inicio de la sesión.",
|
|
58
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
59
|
+
}),
|
|
60
|
+
__metadata("design:type", Date)
|
|
61
|
+
], PartnerSession.prototype, "start_time", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({
|
|
64
|
+
type: "datetime",
|
|
65
|
+
nullable: true,
|
|
66
|
+
comment: "Fecha de finalización de la sesión.",
|
|
67
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
68
|
+
}),
|
|
69
|
+
__metadata("design:type", Date)
|
|
70
|
+
], PartnerSession.prototype, "finish_time", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({
|
|
73
|
+
default: 1,
|
|
74
|
+
comment: "Estado de la sesión:\r\n1. Activa.\r\n2. Expirada.\r\n3. Revocada.",
|
|
75
|
+
}),
|
|
76
|
+
__metadata("design:type", Number)
|
|
77
|
+
], PartnerSession.prototype, "status", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({
|
|
80
|
+
type: "datetime",
|
|
81
|
+
default: function () { return "CURRENT_TIMESTAMP"; },
|
|
82
|
+
comment: "Fecha de creación del registro.",
|
|
83
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
84
|
+
}),
|
|
85
|
+
__metadata("design:type", Date)
|
|
86
|
+
], PartnerSession.prototype, "created", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({
|
|
89
|
+
type: "datetime",
|
|
90
|
+
default: function () { return "CURRENT_TIMESTAMP"; },
|
|
91
|
+
comment: "Fecha de actualización del registro.",
|
|
92
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
93
|
+
}),
|
|
94
|
+
__metadata("design:type", Date)
|
|
95
|
+
], PartnerSession.prototype, "updated", void 0);
|
|
96
|
+
PartnerSession = __decorate([
|
|
97
|
+
(0, typeorm_1.Entity)({
|
|
98
|
+
comment: "Tabla creada para llevar el control de las sesiones (partner)",
|
|
99
|
+
name: "partner_session",
|
|
100
|
+
})
|
|
101
|
+
], PartnerSession);
|
|
102
|
+
return PartnerSession;
|
|
103
|
+
}());
|
|
104
|
+
exports.PartnerSession = PartnerSession;
|
|
@@ -32,8 +32,6 @@ export { RequestProduct } from "./entities/RequestProduct";
|
|
|
32
32
|
export { RequestProductGroupComplement } from "./entities/RequestProductGroupComplement";
|
|
33
33
|
export { RequestStatus } from "./entities/RequestStatus";
|
|
34
34
|
export { Square } from "./entities/Square";
|
|
35
|
-
export { Terminal } from "./entities/Terminal";
|
|
36
|
-
export { TerminalSession } from "./entities/TerminalSession";
|
|
37
35
|
export { TypeMeasureIngredient } from "./entities/TypeMeasureIngredient";
|
|
38
36
|
export { User } from "./entities/User";
|
|
39
37
|
export { UserAddress } from "./entities/UserAddress";
|
|
@@ -51,6 +49,7 @@ export { CategoryDate } from "./entities/CategoryDate";
|
|
|
51
49
|
export { ProductSchedule } from "./entities/ProductSchedule";
|
|
52
50
|
export { ProductDate } from "./entities/ProductDate";
|
|
53
51
|
export { ToppingImage } from "./entities/ToppingImage";
|
|
52
|
+
export { PartnerSession } from "./entities/PartnerSession";
|
|
54
53
|
export { LocalsCompany } from "./views/LocalsCompany";
|
|
55
54
|
export { VerifyLocals } from "./views/VerifyLocals";
|
|
56
55
|
export { MasterNotifications } from "./views/MasterNotifications";
|