nombre de columna con mayus
This commit is contained in:
@@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS pause_cancel_tasks (
|
||||
|
||||
completed_date TIMESTAMPTZ, -- Cuando se ha completado, para bien o mal.
|
||||
error TEXT,
|
||||
actionData JSONB -- datos de la operacion original.
|
||||
action_data JSONB -- datos de la operacion original.
|
||||
);
|
||||
|
||||
-- Indice de las tareas que no han terminado
|
||||
|
||||
@@ -299,7 +299,7 @@ export class SimUseCases {
|
||||
activation_date: activationDate,
|
||||
next_check: undefined, // Que se haga instantaneamente al ser la primera
|
||||
operation_type: "suspend",
|
||||
actiondata: suspendData
|
||||
action_data: suspendData
|
||||
}
|
||||
|
||||
const taskCreated = await this.pauseRepository.addTask(newTask)
|
||||
@@ -339,7 +339,7 @@ export class SimUseCases {
|
||||
activation_date: activationDate,
|
||||
next_check: undefined, // Que se haga instantaneamente al ser la primera
|
||||
operation_type: "terminate",
|
||||
actiondata: terminateData
|
||||
action_data: terminateData
|
||||
}
|
||||
|
||||
const taskCreated = await this.pauseRepository.addTask(newTask)
|
||||
|
||||
@@ -8,7 +8,7 @@ const testTask: CreatePauseCancelTaskDTO = {
|
||||
operation_type: "suspend",
|
||||
activation_date: new Date(),
|
||||
next_check: new Date(),
|
||||
actiondata: {
|
||||
action_data: {
|
||||
dueDate: new Date().toString(),
|
||||
correlation_id: "12223",
|
||||
identifier: {
|
||||
|
||||
@@ -13,10 +13,10 @@ export type PauseCancelTask = {
|
||||
next_check?: Date | null;
|
||||
completed_date?: Date | null;
|
||||
error?: string | null;
|
||||
actiondata: ActionData
|
||||
action_data: ActionData
|
||||
}
|
||||
|
||||
export type CreatePauseCancelTaskDTO = Pick<PauseCancelTask, "iccid" | "activation_date" | "next_check" | "operation_type" | "actiondata">
|
||||
export type CreatePauseCancelTaskDTO = Pick<PauseCancelTask, "iccid" | "activation_date" | "next_check" | "operation_type" | "action_data">
|
||||
export type UpdatePauseCancelTaskDTO = Pick<PauseCancelTask, "id" | "next_check">
|
||||
export type FinishPauseCancelTaskDTO = Pick<PauseCancelTask, "id" | "error">
|
||||
|
||||
@@ -62,7 +62,7 @@ export class PauseCancelTaskRepository {
|
||||
RETURNING *;
|
||||
`;
|
||||
try {
|
||||
const values = [task.iccid, task.activation_date, task.next_check, task.operation_type, JSON.stringify(task.actiondata)];
|
||||
const values = [task.iccid, task.activation_date, task.next_check, task.operation_type, JSON.stringify(task.action_data)];
|
||||
const res: QueryResult<PauseCancelTask> = await this.pgClient.query(sql, values);
|
||||
return {
|
||||
data: res.rows[0]
|
||||
|
||||
@@ -112,8 +112,8 @@ export class PauseTerminateTask {
|
||||
dueDate.setMinutes(new Date().getMinutes() + 15)
|
||||
|
||||
const operacionTipo = operacion.operation_type
|
||||
const actionData = operacion.actiondata
|
||||
const correlation_id = operacion.actiondata.correlation_id
|
||||
const actionData = operacion.action_data
|
||||
const correlation_id = operacion.action_data.correlation_id
|
||||
actionData.dueDate = dueDate.toISOString()
|
||||
|
||||
switch (linea.status.billingStatus) {
|
||||
|
||||
Reference in New Issue
Block a user