@asumano/worklip-typeorm-db 1.1.76 → 1.1.77
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,3 +1,4 @@
|
|
|
1
|
+
import { Associate } from "./Associate";
|
|
1
2
|
import { Company } from "./Company";
|
|
2
3
|
import { ServiceOrder } from "./ServiceOrder";
|
|
3
4
|
import { Workshop } from "./Workshop";
|
|
@@ -12,5 +13,7 @@ export declare class EmailLog {
|
|
|
12
13
|
provider_message_id: string;
|
|
13
14
|
status: number;
|
|
14
15
|
error_message: string | null;
|
|
16
|
+
sent_by: Associate | null;
|
|
17
|
+
is_manual: boolean;
|
|
15
18
|
created: Date;
|
|
16
19
|
}
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.EmailLog = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Associate_1 = require("./Associate");
|
|
14
15
|
const Company_1 = require("./Company");
|
|
15
16
|
const ServiceOrder_1 = require("./ServiceOrder");
|
|
16
17
|
const Workshop_1 = require("./Workshop");
|
|
@@ -99,6 +100,23 @@ __decorate([
|
|
|
99
100
|
}),
|
|
100
101
|
__metadata("design:type", Object)
|
|
101
102
|
], EmailLog.prototype, "error_message", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typeorm_1.ManyToOne)(() => Associate_1.Associate, {
|
|
105
|
+
onDelete: "SET NULL",
|
|
106
|
+
onUpdate: "NO ACTION",
|
|
107
|
+
nullable: true,
|
|
108
|
+
}),
|
|
109
|
+
(0, typeorm_1.JoinColumn)({ name: "sent_by" }),
|
|
110
|
+
__metadata("design:type", Object)
|
|
111
|
+
], EmailLog.prototype, "sent_by", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, typeorm_1.Column)({
|
|
114
|
+
default: false,
|
|
115
|
+
type: "boolean",
|
|
116
|
+
comment: "1 si el destinatario lo escribió a mano el asesor al compartir el informe.",
|
|
117
|
+
}),
|
|
118
|
+
__metadata("design:type", Boolean)
|
|
119
|
+
], EmailLog.prototype, "is_manual", void 0);
|
|
102
120
|
__decorate([
|
|
103
121
|
(0, typeorm_1.Column)({
|
|
104
122
|
type: "datetime",
|
|
@@ -118,4 +136,9 @@ exports.EmailLog = EmailLog = __decorate([
|
|
|
118
136
|
// que crece ~60.000 filas al mes.
|
|
119
137
|
,
|
|
120
138
|
(0, typeorm_1.Index)("IDX_email_log_provider_message_id", ["provider_message_id"])
|
|
139
|
+
// DOC: Sostiene el conteo del tope diario de envíos manuales, que corre ANTES de cada
|
|
140
|
+
// envío con destinatario escrito a mano. Sin él sería un recorrido completo de la tabla
|
|
141
|
+
// en cada compartir.
|
|
142
|
+
,
|
|
143
|
+
(0, typeorm_1.Index)("IDX_email_log_sent_by_created", ["sent_by", "created"])
|
|
121
144
|
], EmailLog);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Associate } from "./Associate";
|
|
1
2
|
import { Company } from "./Company";
|
|
2
3
|
import { ServiceOrder } from "./ServiceOrder";
|
|
3
4
|
import { Workshop } from "./Workshop";
|
|
@@ -12,5 +13,7 @@ export declare class WhatsappLog {
|
|
|
12
13
|
provider_message_id: string;
|
|
13
14
|
status: number;
|
|
14
15
|
error_message: string | null;
|
|
16
|
+
sent_by: Associate | null;
|
|
17
|
+
is_manual: boolean;
|
|
15
18
|
created: Date;
|
|
16
19
|
}
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.WhatsappLog = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Associate_1 = require("./Associate");
|
|
14
15
|
const Company_1 = require("./Company");
|
|
15
16
|
const ServiceOrder_1 = require("./ServiceOrder");
|
|
16
17
|
const Workshop_1 = require("./Workshop");
|
|
@@ -99,6 +100,23 @@ __decorate([
|
|
|
99
100
|
}),
|
|
100
101
|
__metadata("design:type", Object)
|
|
101
102
|
], WhatsappLog.prototype, "error_message", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typeorm_1.ManyToOne)(() => Associate_1.Associate, {
|
|
105
|
+
onDelete: "SET NULL",
|
|
106
|
+
onUpdate: "NO ACTION",
|
|
107
|
+
nullable: true,
|
|
108
|
+
}),
|
|
109
|
+
(0, typeorm_1.JoinColumn)({ name: "sent_by" }),
|
|
110
|
+
__metadata("design:type", Object)
|
|
111
|
+
], WhatsappLog.prototype, "sent_by", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, typeorm_1.Column)({
|
|
114
|
+
default: false,
|
|
115
|
+
type: "boolean",
|
|
116
|
+
comment: "1 si el destinatario lo escribió a mano el asesor al compartir el informe.",
|
|
117
|
+
}),
|
|
118
|
+
__metadata("design:type", Boolean)
|
|
119
|
+
], WhatsappLog.prototype, "is_manual", void 0);
|
|
102
120
|
__decorate([
|
|
103
121
|
(0, typeorm_1.Column)({
|
|
104
122
|
type: "datetime",
|
|
@@ -113,4 +131,8 @@ exports.WhatsappLog = WhatsappLog = __decorate([
|
|
|
113
131
|
name: "whatsapp_log",
|
|
114
132
|
}),
|
|
115
133
|
(0, typeorm_1.Index)("IDX_whatsapp_log_company_created", ["company", "created"])
|
|
134
|
+
// DOC: Mismo motivo que en `email_log`: el tope diario de envíos manuales cuenta los DOS
|
|
135
|
+
// canales juntos, así que esta tabla también se consulta antes de cada compartir.
|
|
136
|
+
,
|
|
137
|
+
(0, typeorm_1.Index)("IDX_whatsapp_log_sent_by_created", ["sent_by", "created"])
|
|
116
138
|
], WhatsappLog);
|