41 lines
942 B
TypeScript
41 lines
942 B
TypeScript
import { Injectable } from '@nestjs/common';
|
|
import { BaseUpdateStatusManager } from 'src/core/modules/domain/usecase/managers/base-update-status.manager';
|
|
import {
|
|
EventTopics,
|
|
validateRelations,
|
|
} from 'src/core/strings/constants/interface.constants';
|
|
import { Queue } from '../entities/queue.entity';
|
|
import { QueueModel } from '../../data/models/queue.model';
|
|
|
|
@Injectable()
|
|
export class CallQueueManager extends BaseUpdateStatusManager<Queue> {
|
|
getResult(): string {
|
|
return `Success call Queue ${this.result.code}`;
|
|
}
|
|
|
|
async validateProcess(): Promise<void> {
|
|
return;
|
|
}
|
|
|
|
async beforeProcess(): Promise<void> {
|
|
this.data.call_time = new Date().getTime();
|
|
return;
|
|
}
|
|
|
|
async afterProcess(): Promise<void> {
|
|
return;
|
|
}
|
|
|
|
get validateRelations(): validateRelations[] {
|
|
return [];
|
|
}
|
|
|
|
get entityTarget(): any {
|
|
return QueueModel;
|
|
}
|
|
|
|
get eventTopics(): EventTopics[] {
|
|
return [];
|
|
}
|
|
}
|