test-entity-library-asm 3.9.35 → 3.9.37
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/Category.js +2 -3
- package/dist/entities/CodeRedemptionHistoryCompany.js +2 -2
- package/dist/entities/Company.js +1 -0
- package/dist/entities/DiscountCodeCompany.d.ts +1 -1
- package/dist/entities/DiscountCodeCompany.js +4 -4
- package/dist/entities/DiscountCodeUser.js +1 -0
- package/dist/entities/Gallery.js +1 -2
- package/dist/entities/Local.d.ts +4 -0
- package/dist/entities/Local.js +39 -0
- package/dist/entities/LocalReserveStatus.d.ts +1 -1
- package/dist/entities/LocalReserveStatus.js +2 -1
- package/dist/entities/LocalTableReservePayment.js +2 -3
- package/dist/entities/MasterNotification.js +1 -2
- package/dist/entities/MasterSession.js +3 -5
- package/dist/entities/PartnerNotification.js +1 -2
- package/dist/entities/PartnerSession.js +3 -5
- package/dist/entities/PaymentMethod.js +1 -2
- package/dist/entities/Product.d.ts +2 -2
- package/dist/entities/Product.js +4 -5
- package/dist/entities/ReceiptConfig.js +2 -3
- package/dist/entities/Request.js +3 -4
- package/dist/entities/RequestInvoice.js +2 -3
- package/dist/entities/RequestLocalTable.d.ts +1 -1
- package/dist/entities/RequestLocalTable.js +1 -1
- package/dist/entities/RequestPrint.js +1 -2
- package/dist/entities/ServicePlan.d.ts +1 -1
- package/dist/entities/ServicePlan.js +5 -4
- package/dist/entities/UserPaymentMethod.js +2 -3
- package/dist/views/LocalsCompanyInformationForTheMap.d.ts +3 -0
- package/dist/views/LocalsCompanyInformationForTheMap.js +12 -0
- package/dist/views/LocalsCompanyInformationForTheTable.d.ts +3 -0
- package/dist/views/LocalsCompanyInformationForTheTable.js +12 -0
- package/dist/views/PartnerNotifications.js +1 -11
- package/dist/views/Partners.d.ts +2 -2
- package/dist/views/Partners.js +4 -14
- package/dist/views/ViewLocalsCompanies.d.ts +2 -2
- package/dist/views/ViewLocalsCompanies.js +4 -14
- package/package.json +1 -1
- package/src/entities/BusinessType.ts +0 -1
- package/src/entities/Category.ts +2 -3
- package/src/entities/CodeRedemptionHistoryCompany.ts +4 -4
- package/src/entities/Company.ts +1 -0
- package/src/entities/CountryHoliday.ts +0 -1
- package/src/entities/DiscountCodeCompany.ts +6 -6
- package/src/entities/DiscountCodeUser.ts +1 -0
- package/src/entities/Gallery.ts +1 -2
- package/src/entities/Local.ts +39 -0
- package/src/entities/LocalReserveStatus.ts +2 -1
- package/src/entities/LocalTableReservePayment.ts +6 -7
- package/src/entities/MasterNotification.ts +1 -2
- package/src/entities/MasterSession.ts +3 -5
- package/src/entities/PartnerNotification.ts +1 -2
- package/src/entities/PartnerSession.ts +3 -5
- package/src/entities/PaymentMethod.ts +4 -5
- package/src/entities/Product.ts +14 -9
- package/src/entities/ReceiptConfig.ts +2 -3
- package/src/entities/Request.ts +3 -4
- package/src/entities/RequestInvoice.ts +3 -4
- package/src/entities/RequestLocalTable.ts +1 -3
- package/src/entities/RequestPrint.ts +1 -2
- package/src/entities/ServicePlan.ts +6 -5
- package/src/entities/UserPaymentMethod.ts +4 -5
- package/src/views/LocalsCompanyInformationForTheMap.ts +9 -0
- package/src/views/LocalsCompanyInformationForTheTable.ts +9 -0
- package/src/views/PartnerNotifications.ts +1 -12
- package/src/views/Partners.ts +4 -15
- package/src/views/ViewLocalsCompanies.ts +4 -15
|
@@ -58,6 +58,10 @@ __decorate([
|
|
|
58
58
|
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
59
59
|
__metadata("design:type", Object)
|
|
60
60
|
], LocalsCompanyInformationForTheMap.prototype, "details", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], LocalsCompanyInformationForTheMap.prototype, "changes", void 0);
|
|
61
65
|
__decorate([
|
|
62
66
|
(0, typeorm_1.ViewColumn)(),
|
|
63
67
|
__metadata("design:type", Date)
|
|
@@ -94,6 +98,14 @@ __decorate([
|
|
|
94
98
|
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
95
99
|
__metadata("design:type", Object)
|
|
96
100
|
], LocalsCompanyInformationForTheMap.prototype, "contact_details", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.ViewColumn)(),
|
|
103
|
+
__metadata("design:type", Number)
|
|
104
|
+
], LocalsCompanyInformationForTheMap.prototype, "review_status", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, typeorm_1.ViewColumn)(),
|
|
107
|
+
__metadata("design:type", Number)
|
|
108
|
+
], LocalsCompanyInformationForTheMap.prototype, "operation_type", void 0);
|
|
97
109
|
__decorate([
|
|
98
110
|
(0, typeorm_1.ViewColumn)(),
|
|
99
111
|
__metadata("design:type", String)
|
|
@@ -7,6 +7,7 @@ export declare class LocalsCompanyInformationForTheTable {
|
|
|
7
7
|
latitude: number;
|
|
8
8
|
longitude: number;
|
|
9
9
|
details: any | null;
|
|
10
|
+
changes: any | null;
|
|
10
11
|
created: Date;
|
|
11
12
|
updated: Date;
|
|
12
13
|
updated_by: number;
|
|
@@ -16,6 +17,8 @@ export declare class LocalsCompanyInformationForTheTable {
|
|
|
16
17
|
status: number;
|
|
17
18
|
visible: number;
|
|
18
19
|
contact_details: any | null;
|
|
20
|
+
review_status: number;
|
|
21
|
+
operation_type: number;
|
|
19
22
|
type_local: string;
|
|
20
23
|
address_local: string;
|
|
21
24
|
company_id: number;
|
|
@@ -58,6 +58,10 @@ __decorate([
|
|
|
58
58
|
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
59
59
|
__metadata("design:type", Object)
|
|
60
60
|
], LocalsCompanyInformationForTheTable.prototype, "details", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], LocalsCompanyInformationForTheTable.prototype, "changes", void 0);
|
|
61
65
|
__decorate([
|
|
62
66
|
(0, typeorm_1.ViewColumn)(),
|
|
63
67
|
__metadata("design:type", Date)
|
|
@@ -94,6 +98,14 @@ __decorate([
|
|
|
94
98
|
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
95
99
|
__metadata("design:type", Object)
|
|
96
100
|
], LocalsCompanyInformationForTheTable.prototype, "contact_details", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.ViewColumn)(),
|
|
103
|
+
__metadata("design:type", Number)
|
|
104
|
+
], LocalsCompanyInformationForTheTable.prototype, "review_status", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, typeorm_1.ViewColumn)(),
|
|
107
|
+
__metadata("design:type", Number)
|
|
108
|
+
], LocalsCompanyInformationForTheTable.prototype, "operation_type", void 0);
|
|
97
109
|
__decorate([
|
|
98
110
|
(0, typeorm_1.ViewColumn)(),
|
|
99
111
|
__metadata("design:type", String)
|
|
@@ -11,21 +11,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PartnerNotifications = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
-
const moment = require("moment-timezone");
|
|
15
|
-
const __1 = require("..");
|
|
16
14
|
// JSON Transformer
|
|
17
15
|
const jsonTransformer = {
|
|
18
16
|
to: (value) => JSON.stringify(value),
|
|
19
17
|
from: (value) => JSON.parse(value),
|
|
20
18
|
};
|
|
21
|
-
const DateTransformer = {
|
|
22
|
-
to(value) {
|
|
23
|
-
return moment.utc(value).format("YYYY-MM-DD HH:mm:ss");
|
|
24
|
-
},
|
|
25
|
-
from(value) {
|
|
26
|
-
return moment.utc(value).tz((0, __1.getTimeZone)()).format("YYYY-MM-DD HH:mm:ss");
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
19
|
let PartnerNotifications = class PartnerNotifications {
|
|
30
20
|
};
|
|
31
21
|
exports.PartnerNotifications = PartnerNotifications;
|
|
@@ -54,7 +44,7 @@ __decorate([
|
|
|
54
44
|
__metadata("design:type", Object)
|
|
55
45
|
], PartnerNotifications.prototype, "settings", void 0);
|
|
56
46
|
__decorate([
|
|
57
|
-
(0, typeorm_1.ViewColumn)(
|
|
47
|
+
(0, typeorm_1.ViewColumn)(),
|
|
58
48
|
__metadata("design:type", Date)
|
|
59
49
|
], PartnerNotifications.prototype, "created", void 0);
|
|
60
50
|
__decorate([
|
package/dist/views/Partners.d.ts
CHANGED
package/dist/views/Partners.js
CHANGED
|
@@ -11,8 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Partners = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
-
const moment = require("moment-timezone");
|
|
15
|
-
const __1 = require("..");
|
|
16
14
|
// JSON Transformer
|
|
17
15
|
const jsonTransformer = {
|
|
18
16
|
to: (value) => JSON.stringify(value),
|
|
@@ -26,14 +24,6 @@ const jsonTransformer = {
|
|
|
26
24
|
}
|
|
27
25
|
},
|
|
28
26
|
};
|
|
29
|
-
const DateTransformer = {
|
|
30
|
-
to(value) {
|
|
31
|
-
return moment.utc(value).format("YYYY-MM-DD HH:mm:ss");
|
|
32
|
-
},
|
|
33
|
-
from(value) {
|
|
34
|
-
return moment.utc(value).tz((0, __1.getTimeZone)()).format("YYYY-MM-DD HH:mm:ss");
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
27
|
let Partners = class Partners {
|
|
38
28
|
};
|
|
39
29
|
exports.Partners = Partners;
|
|
@@ -90,12 +80,12 @@ __decorate([
|
|
|
90
80
|
__metadata("design:type", Number)
|
|
91
81
|
], Partners.prototype, "owner", void 0);
|
|
92
82
|
__decorate([
|
|
93
|
-
(0, typeorm_1.ViewColumn)(
|
|
94
|
-
__metadata("design:type",
|
|
83
|
+
(0, typeorm_1.ViewColumn)(),
|
|
84
|
+
__metadata("design:type", Date)
|
|
95
85
|
], Partners.prototype, "created", void 0);
|
|
96
86
|
__decorate([
|
|
97
|
-
(0, typeorm_1.ViewColumn)(
|
|
98
|
-
__metadata("design:type",
|
|
87
|
+
(0, typeorm_1.ViewColumn)(),
|
|
88
|
+
__metadata("design:type", Date)
|
|
99
89
|
], Partners.prototype, "updated", void 0);
|
|
100
90
|
__decorate([
|
|
101
91
|
(0, typeorm_1.ViewColumn)(),
|
|
@@ -11,21 +11,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ViewLocalsCompanies = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
-
const moment = require("moment-timezone");
|
|
15
|
-
const __1 = require("..");
|
|
16
14
|
// JSON Transformer
|
|
17
15
|
const jsonTransformer = {
|
|
18
16
|
to: (value) => JSON.stringify(value),
|
|
19
17
|
from: (value) => JSON.parse(value),
|
|
20
18
|
};
|
|
21
|
-
const DateTransformer = {
|
|
22
|
-
to(value) {
|
|
23
|
-
return moment.utc(value).format("YYYY-MM-DD HH:mm:ss");
|
|
24
|
-
},
|
|
25
|
-
from(value) {
|
|
26
|
-
return moment.utc(value).tz((0, __1.getTimeZone)()).format("YYYY-MM-DD HH:mm:ss");
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
19
|
let ViewLocalsCompanies = class ViewLocalsCompanies {
|
|
30
20
|
};
|
|
31
21
|
exports.ViewLocalsCompanies = ViewLocalsCompanies;
|
|
@@ -38,12 +28,12 @@ __decorate([
|
|
|
38
28
|
__metadata("design:type", String)
|
|
39
29
|
], ViewLocalsCompanies.prototype, "name_local", void 0);
|
|
40
30
|
__decorate([
|
|
41
|
-
(0, typeorm_1.ViewColumn)(
|
|
42
|
-
__metadata("design:type",
|
|
31
|
+
(0, typeorm_1.ViewColumn)(),
|
|
32
|
+
__metadata("design:type", Date)
|
|
43
33
|
], ViewLocalsCompanies.prototype, "created_local", void 0);
|
|
44
34
|
__decorate([
|
|
45
|
-
(0, typeorm_1.ViewColumn)(
|
|
46
|
-
__metadata("design:type",
|
|
35
|
+
(0, typeorm_1.ViewColumn)(),
|
|
36
|
+
__metadata("design:type", Date)
|
|
47
37
|
], ViewLocalsCompanies.prototype, "updated_local", void 0);
|
|
48
38
|
__decorate([
|
|
49
39
|
(0, typeorm_1.ViewColumn)(),
|
package/package.json
CHANGED
package/src/entities/Category.ts
CHANGED
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
RequestInvoiceCategory,
|
|
13
13
|
ScheduleCategory,
|
|
14
14
|
} from "..";
|
|
15
|
-
import { DateTransformer } from "../transformers/dateTransformer";
|
|
16
15
|
import { jsonTransformer } from "../transformers/jsonTransformer";
|
|
17
16
|
import { Local } from "./Local";
|
|
18
17
|
import { Product } from "./Product";
|
|
@@ -73,7 +72,7 @@ export class Category {
|
|
|
73
72
|
|
|
74
73
|
@Column({
|
|
75
74
|
type: "datetime",
|
|
76
|
-
|
|
75
|
+
default: () => "CURRENT_TIMESTAMP",
|
|
77
76
|
comment: "Fecha de creación del registro.",
|
|
78
77
|
})
|
|
79
78
|
created: Date;
|
|
@@ -82,7 +81,7 @@ export class Category {
|
|
|
82
81
|
type: "datetime",
|
|
83
82
|
nullable: true,
|
|
84
83
|
default: null,
|
|
85
|
-
|
|
84
|
+
onUpdate: "CURRENT_TIMESTAMP",
|
|
86
85
|
comment: "Fecha de actualización del registro.",
|
|
87
86
|
})
|
|
88
87
|
updated: Date | null;
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
} from "typeorm";
|
|
8
8
|
import { Company } from "./Company";
|
|
9
9
|
import { DiscountCodeCompany } from "./DiscountCodeCompany";
|
|
10
|
-
import { DateTransformer } from "../transformers/dateTransformer";
|
|
11
10
|
|
|
12
11
|
@Entity("code_redemption_history_company", {
|
|
13
12
|
comment:
|
|
@@ -23,7 +22,7 @@ export class CodeRedemptionHistoryCompany {
|
|
|
23
22
|
@ManyToOne(
|
|
24
23
|
() => DiscountCodeCompany,
|
|
25
24
|
(company) => company.code_redemptions_history_company,
|
|
26
|
-
{ onDelete: "CASCADE", onUpdate: "NO ACTION" }
|
|
25
|
+
{ onDelete: "CASCADE", onUpdate: "NO ACTION" },
|
|
27
26
|
)
|
|
28
27
|
@JoinColumn({ name: "discount_code_company" })
|
|
29
28
|
discount_code_company: DiscountCodeCompany;
|
|
@@ -31,14 +30,15 @@ export class CodeRedemptionHistoryCompany {
|
|
|
31
30
|
@ManyToOne(
|
|
32
31
|
() => Company,
|
|
33
32
|
(company) => company.code_redemption_history_company,
|
|
34
|
-
{ onDelete: "CASCADE", onUpdate: "NO ACTION" }
|
|
33
|
+
{ onDelete: "CASCADE", onUpdate: "NO ACTION" },
|
|
35
34
|
)
|
|
36
35
|
@JoinColumn({ name: "company" })
|
|
37
36
|
company: Company;
|
|
38
37
|
|
|
39
38
|
@Column({
|
|
40
39
|
type: "datetime",
|
|
41
|
-
|
|
40
|
+
default: () => "CURRENT_TIMESTAMP",
|
|
41
|
+
onUpdate: "CURRENT_TIMESTAMP",
|
|
42
42
|
comment: "Fecha cuando se usó el descuento.",
|
|
43
43
|
})
|
|
44
44
|
date_used: Date;
|
package/src/entities/Company.ts
CHANGED
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
OneToMany,
|
|
7
7
|
PrimaryGeneratedColumn,
|
|
8
8
|
} from "typeorm";
|
|
9
|
-
import { DateTransformer } from "../transformers/dateTransformer";
|
|
10
9
|
import { jsonTransformer } from "../transformers/jsonTransformer";
|
|
11
10
|
import { CodeRedemptionHistoryCompany } from "./CodeRedemptionHistoryCompany";
|
|
12
11
|
import { Master } from "./Master";
|
|
@@ -60,7 +59,7 @@ export class DiscountCodeCompany {
|
|
|
60
59
|
@Column({
|
|
61
60
|
type: "datetime",
|
|
62
61
|
comment: "Fecha de creación del registro.",
|
|
63
|
-
|
|
62
|
+
default: () => "CURRENT_TIMESTAMP",
|
|
64
63
|
})
|
|
65
64
|
created: Date;
|
|
66
65
|
|
|
@@ -91,9 +90,10 @@ export class DiscountCodeCompany {
|
|
|
91
90
|
@Column({
|
|
92
91
|
type: "datetime",
|
|
93
92
|
comment: "Fecha de actualización.",
|
|
94
|
-
|
|
93
|
+
default: () => "CURRENT_TIMESTAMP",
|
|
94
|
+
onUpdate: "CURRENT_TIMESTAMP",
|
|
95
95
|
})
|
|
96
|
-
updated: Date
|
|
96
|
+
updated: Date;
|
|
97
97
|
|
|
98
98
|
@Column({
|
|
99
99
|
default: 1,
|
|
@@ -114,13 +114,13 @@ export class DiscountCodeCompany {
|
|
|
114
114
|
@OneToMany(
|
|
115
115
|
() => CodeRedemptionHistoryCompany,
|
|
116
116
|
(codeRedemptionHistoryCompany) =>
|
|
117
|
-
codeRedemptionHistoryCompany.discount_code_company
|
|
117
|
+
codeRedemptionHistoryCompany.discount_code_company,
|
|
118
118
|
)
|
|
119
119
|
code_redemptions_history_company: CodeRedemptionHistoryCompany[];
|
|
120
120
|
|
|
121
121
|
@OneToMany(
|
|
122
122
|
() => ServiceDiscountsPlan,
|
|
123
|
-
(serviceDiscountsPlan) => serviceDiscountsPlan.discount
|
|
123
|
+
(serviceDiscountsPlan) => serviceDiscountsPlan.discount,
|
|
124
124
|
)
|
|
125
125
|
service_discounts_plans: ServiceDiscountsPlan[];
|
|
126
126
|
}
|
package/src/entities/Gallery.ts
CHANGED
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
PrimaryGeneratedColumn,
|
|
10
10
|
} from "typeorm";
|
|
11
11
|
import { Local, Partner, Product, ProductImage } from "..";
|
|
12
|
-
import { DateTransformer } from "../transformers/dateTransformer";
|
|
13
12
|
|
|
14
13
|
@Entity({
|
|
15
14
|
name: "gallery",
|
|
@@ -47,7 +46,7 @@ export class Gallery {
|
|
|
47
46
|
|
|
48
47
|
@Column({
|
|
49
48
|
type: "datetime",
|
|
50
|
-
|
|
49
|
+
default: () => "CURRENT_TIMESTAMP",
|
|
51
50
|
comment: "Fecha de creación de la imagen.",
|
|
52
51
|
})
|
|
53
52
|
created: Date;
|
package/src/entities/Local.ts
CHANGED
|
@@ -77,6 +77,16 @@ export class Local {
|
|
|
77
77
|
})
|
|
78
78
|
details: any | null;
|
|
79
79
|
|
|
80
|
+
@Column({
|
|
81
|
+
type: "longtext",
|
|
82
|
+
nullable: true,
|
|
83
|
+
default: null,
|
|
84
|
+
transformer: jsonTransformer,
|
|
85
|
+
comment:
|
|
86
|
+
"Columna para almacenar los cambios que se le hacen al registro. \nSe almacena todo el formik, con esto simplemente cuando estemos editando se usa esta variable y no tenemos que construir la información.",
|
|
87
|
+
})
|
|
88
|
+
changes: any | null;
|
|
89
|
+
|
|
80
90
|
@Column({ type: "datetime", default: () => "CURRENT_TIMESTAMP" })
|
|
81
91
|
created: Date;
|
|
82
92
|
|
|
@@ -135,6 +145,35 @@ export class Local {
|
|
|
135
145
|
})
|
|
136
146
|
visible: number;
|
|
137
147
|
|
|
148
|
+
// !: ¿Esta columna debería venir?
|
|
149
|
+
@Column({
|
|
150
|
+
type: "text",
|
|
151
|
+
nullable: true,
|
|
152
|
+
default: null,
|
|
153
|
+
transformer: jsonTransformer,
|
|
154
|
+
})
|
|
155
|
+
contact_details: any | null;
|
|
156
|
+
|
|
157
|
+
@Column({
|
|
158
|
+
type: "int",
|
|
159
|
+
nullable: true,
|
|
160
|
+
default: null,
|
|
161
|
+
width: 1,
|
|
162
|
+
comment:
|
|
163
|
+
"Estado en el que se encuentra la revisión de los nuevos cambios.\n1: Pendiente de revisión:Estado para decirle al usuario que los cambios se encuentran en revisión.\n2: Aprobado: Los cambios se encuentran aprobados.\n3: Rechazado: Los cambios se rechazaron por algún problema en los datos.",
|
|
164
|
+
})
|
|
165
|
+
review_status: number;
|
|
166
|
+
|
|
167
|
+
@Column({
|
|
168
|
+
type: "int",
|
|
169
|
+
nullable: true,
|
|
170
|
+
default: null,
|
|
171
|
+
width: 1,
|
|
172
|
+
comment:
|
|
173
|
+
"Columna para guardar el tipo de operación del registro.\n1: Creación: Cuando se crea por primera vez el registro.\n2: Edición: Cuando se está editando información del local.",
|
|
174
|
+
})
|
|
175
|
+
operation_type: number;
|
|
176
|
+
|
|
138
177
|
@ManyToMany(() => Partner, (partner) => partner.locals_partner)
|
|
139
178
|
@JoinTable({
|
|
140
179
|
name: "local_partner",
|
|
@@ -64,9 +64,10 @@ export class LocalReserveStatus {
|
|
|
64
64
|
@ManyToOne(() => Partner, (partner) => partner.local_reserve_status, {
|
|
65
65
|
onDelete: "NO ACTION",
|
|
66
66
|
onUpdate: "NO ACTION",
|
|
67
|
+
nullable: true,
|
|
67
68
|
})
|
|
68
69
|
@JoinColumn({ name: "updated_by" })
|
|
69
|
-
updated_by: Partner;
|
|
70
|
+
updated_by: Partner | null;
|
|
70
71
|
|
|
71
72
|
@Column({
|
|
72
73
|
default: 1,
|
|
@@ -10,9 +10,8 @@ import {
|
|
|
10
10
|
LocalReserve,
|
|
11
11
|
Partner,
|
|
12
12
|
User,
|
|
13
|
-
UserPaymentMethod
|
|
13
|
+
UserPaymentMethod,
|
|
14
14
|
} from "..";
|
|
15
|
-
import { DateTransformer } from "../transformers/dateTransformer";
|
|
16
15
|
|
|
17
16
|
@Entity({
|
|
18
17
|
comment: "Registros de los pagos qué se han hecho de las reservas.",
|
|
@@ -39,7 +38,7 @@ export class LocalTableReservePayment {
|
|
|
39
38
|
{
|
|
40
39
|
onDelete: "RESTRICT",
|
|
41
40
|
onUpdate: "NO ACTION",
|
|
42
|
-
}
|
|
41
|
+
},
|
|
43
42
|
)
|
|
44
43
|
@JoinColumn({ name: "local_reserve" })
|
|
45
44
|
local_reserve: LocalReserve;
|
|
@@ -50,7 +49,7 @@ export class LocalTableReservePayment {
|
|
|
50
49
|
{
|
|
51
50
|
onDelete: "RESTRICT",
|
|
52
51
|
onUpdate: "NO ACTION",
|
|
53
|
-
}
|
|
52
|
+
},
|
|
54
53
|
)
|
|
55
54
|
@JoinColumn({ name: "payment_method" })
|
|
56
55
|
payment_method: LocalPaymentMethod;
|
|
@@ -100,7 +99,7 @@ export class LocalTableReservePayment {
|
|
|
100
99
|
onDelete: "NO ACTION",
|
|
101
100
|
onUpdate: "NO ACTION",
|
|
102
101
|
nullable: true,
|
|
103
|
-
}
|
|
102
|
+
},
|
|
104
103
|
)
|
|
105
104
|
@JoinColumn({ name: "card" })
|
|
106
105
|
card: UserPaymentMethod | null;
|
|
@@ -133,7 +132,7 @@ export class LocalTableReservePayment {
|
|
|
133
132
|
|
|
134
133
|
@Column({
|
|
135
134
|
type: "datetime",
|
|
136
|
-
|
|
135
|
+
default: () => "CURRENT_TIMESTAMP",
|
|
137
136
|
comment: "Fecha de creación del registro.",
|
|
138
137
|
})
|
|
139
138
|
created: Date;
|
|
@@ -142,7 +141,7 @@ export class LocalTableReservePayment {
|
|
|
142
141
|
type: "datetime",
|
|
143
142
|
nullable: true,
|
|
144
143
|
default: null,
|
|
145
|
-
|
|
144
|
+
onUpdate: "CURRENT_TIMESTAMP",
|
|
146
145
|
comment: "Fecha de actualización del registro.",
|
|
147
146
|
})
|
|
148
147
|
updated: Date | null;
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
PrimaryGeneratedColumn,
|
|
9
9
|
} from "typeorm";
|
|
10
10
|
import { Master, Partner } from "..";
|
|
11
|
-
import { DateTransformer } from "../transformers/dateTransformer";
|
|
12
11
|
import { jsonTransformer } from "../transformers/jsonTransformer";
|
|
13
12
|
|
|
14
13
|
@Entity("master_notification", {
|
|
@@ -76,7 +75,7 @@ export class MasterNotification {
|
|
|
76
75
|
@Column({
|
|
77
76
|
type: "datetime",
|
|
78
77
|
comment: "Fecha de creación de la notificación.",
|
|
79
|
-
|
|
78
|
+
default: () => "CURRENT_TIMESTAMP",
|
|
80
79
|
})
|
|
81
80
|
created: Date;
|
|
82
81
|
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
PrimaryGeneratedColumn,
|
|
7
7
|
} from "typeorm";
|
|
8
8
|
import { Master } from "..";
|
|
9
|
-
import { DateTransformer } from "../transformers/dateTransformer";
|
|
10
9
|
|
|
11
10
|
@Entity({
|
|
12
11
|
comment: "Tabla creada para llevar el control de las sesiones (master)",
|
|
@@ -50,7 +49,6 @@ export class MasterSession {
|
|
|
50
49
|
@Column({
|
|
51
50
|
type: "datetime",
|
|
52
51
|
comment: "Fecha de inicio de la sesión.",
|
|
53
|
-
transformer: new DateTransformer(),
|
|
54
52
|
})
|
|
55
53
|
start_time: Date;
|
|
56
54
|
|
|
@@ -59,7 +57,6 @@ export class MasterSession {
|
|
|
59
57
|
nullable: true,
|
|
60
58
|
default: null,
|
|
61
59
|
comment: "Fecha de finalización de la sesión.",
|
|
62
|
-
transformer: new DateTransformer(),
|
|
63
60
|
})
|
|
64
61
|
finish_time: Date | null;
|
|
65
62
|
|
|
@@ -75,7 +72,7 @@ export class MasterSession {
|
|
|
75
72
|
@Column({
|
|
76
73
|
type: "datetime",
|
|
77
74
|
comment: "Fecha de creación del registro.",
|
|
78
|
-
|
|
75
|
+
default: () => "CURRENT_TIMESTAMP",
|
|
79
76
|
})
|
|
80
77
|
created: Date;
|
|
81
78
|
|
|
@@ -83,7 +80,8 @@ export class MasterSession {
|
|
|
83
80
|
type: "datetime",
|
|
84
81
|
nullable: true,
|
|
85
82
|
comment: "Fecha de actualización del registro.",
|
|
86
|
-
|
|
83
|
+
default: null,
|
|
84
|
+
onUpdate: "CURRENT_TIMESTAMP",
|
|
87
85
|
})
|
|
88
86
|
updated: Date | null;
|
|
89
87
|
}
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
PrimaryGeneratedColumn,
|
|
9
9
|
} from "typeorm";
|
|
10
10
|
import { Partner } from "./Partner";
|
|
11
|
-
import { DateTransformer } from "../transformers/dateTransformer";
|
|
12
11
|
import { jsonTransformer } from "../transformers/jsonTransformer";
|
|
13
12
|
import { Master } from "./Master";
|
|
14
13
|
|
|
@@ -76,7 +75,7 @@ export class PartnerNotification {
|
|
|
76
75
|
@Column({
|
|
77
76
|
type: "datetime",
|
|
78
77
|
comment: "Fecha de creación de la notificación.",
|
|
79
|
-
|
|
78
|
+
default: () => "CURRENT_TIMESTAMP",
|
|
80
79
|
})
|
|
81
80
|
created: Date;
|
|
82
81
|
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
PrimaryGeneratedColumn,
|
|
7
7
|
} from "typeorm";
|
|
8
8
|
import { Partner } from "..";
|
|
9
|
-
import { DateTransformer } from "../transformers/dateTransformer";
|
|
10
9
|
|
|
11
10
|
@Entity({
|
|
12
11
|
comment: "Tabla creada para llevar el control de las sesiones (partner)",
|
|
@@ -51,7 +50,6 @@ export class PartnerSession {
|
|
|
51
50
|
@Column({
|
|
52
51
|
type: "datetime",
|
|
53
52
|
comment: "Fecha de inicio de la sesión.",
|
|
54
|
-
transformer: new DateTransformer(),
|
|
55
53
|
})
|
|
56
54
|
start_time: Date;
|
|
57
55
|
|
|
@@ -60,7 +58,6 @@ export class PartnerSession {
|
|
|
60
58
|
nullable: true,
|
|
61
59
|
default: null,
|
|
62
60
|
comment: "Fecha de finalización de la sesión.",
|
|
63
|
-
transformer: new DateTransformer(),
|
|
64
61
|
})
|
|
65
62
|
finish_time: Date | null;
|
|
66
63
|
|
|
@@ -76,7 +73,7 @@ export class PartnerSession {
|
|
|
76
73
|
@Column({
|
|
77
74
|
type: "datetime",
|
|
78
75
|
comment: "Fecha de creación del registro.",
|
|
79
|
-
|
|
76
|
+
default: () => "CURRENT_TIMESTAMP",
|
|
80
77
|
})
|
|
81
78
|
created: Date;
|
|
82
79
|
|
|
@@ -84,7 +81,8 @@ export class PartnerSession {
|
|
|
84
81
|
type: "datetime",
|
|
85
82
|
nullable: true,
|
|
86
83
|
comment: "Fecha de actualización del registro.",
|
|
87
|
-
|
|
84
|
+
default: null,
|
|
85
|
+
onUpdate: "CURRENT_TIMESTAMP",
|
|
88
86
|
})
|
|
89
87
|
updated: Date | null;
|
|
90
88
|
}
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
LocalTableReservePayment,
|
|
12
12
|
RequestLocalPayment,
|
|
13
13
|
} from "..";
|
|
14
|
-
import { DateTransformer } from "../transformers/dateTransformer";
|
|
15
14
|
import { Local } from "./Local";
|
|
16
15
|
import { jsonTransformer } from "../transformers/jsonTransformer";
|
|
17
16
|
|
|
@@ -56,7 +55,7 @@ export class PaymentMethod {
|
|
|
56
55
|
|
|
57
56
|
@Column({
|
|
58
57
|
type: "datetime",
|
|
59
|
-
|
|
58
|
+
default: () => "CURRENT_TIMESTAMP",
|
|
60
59
|
comment: "Fecha de creación del registro.",
|
|
61
60
|
})
|
|
62
61
|
created: Date;
|
|
@@ -86,19 +85,19 @@ export class PaymentMethod {
|
|
|
86
85
|
|
|
87
86
|
@OneToMany(
|
|
88
87
|
() => RequestLocalPayment,
|
|
89
|
-
(requestLocalPayment) => requestLocalPayment.payment_method
|
|
88
|
+
(requestLocalPayment) => requestLocalPayment.payment_method,
|
|
90
89
|
)
|
|
91
90
|
payment_methods: RequestLocalPayment[];
|
|
92
91
|
|
|
93
92
|
@OneToMany(
|
|
94
93
|
() => LocalTableReservePayment,
|
|
95
|
-
(localTableReservePayment) => localTableReservePayment.payment_method
|
|
94
|
+
(localTableReservePayment) => localTableReservePayment.payment_method,
|
|
96
95
|
)
|
|
97
96
|
local_table_reserve_payments: LocalTableReservePayment[];
|
|
98
97
|
|
|
99
98
|
@OneToMany(
|
|
100
99
|
() => LocalPaymentMethod,
|
|
101
|
-
(localPaymentMethod) => localPaymentMethod.payment_method
|
|
100
|
+
(localPaymentMethod) => localPaymentMethod.payment_method,
|
|
102
101
|
)
|
|
103
102
|
payments_method: LocalPaymentMethod[];
|
|
104
103
|
}
|