46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import { BaseBatchUpdateStatusManager } from 'src/core/modules/domain/usecase/managers/base-batch-update-status.manager';
|
|
import { FaqEntity } from '../../entities/faq.entity';
|
|
import {
|
|
EventTopics,
|
|
validateRelations,
|
|
} from 'src/core/strings/constants/interface.constants';
|
|
import { FaqModel } from '../../../data/models/faq.model';
|
|
import { FaqChangeStatusEvent } from '../../entities/event/faq-change-status.event';
|
|
import { BatchResult } from 'src/core/response/domain/ok-response.interface';
|
|
import { Injectable } from '@nestjs/common';
|
|
|
|
@Injectable()
|
|
export class BatchInactiveFaqManager extends BaseBatchUpdateStatusManager<FaqEntity> {
|
|
validateData(data: FaqEntity): Promise<void> {
|
|
return;
|
|
}
|
|
|
|
beforeProcess(): Promise<void> {
|
|
return;
|
|
}
|
|
|
|
afterProcess(): Promise<void> {
|
|
return;
|
|
}
|
|
|
|
get validateRelations(): validateRelations[] {
|
|
return [];
|
|
}
|
|
|
|
get entityTarget(): any {
|
|
return FaqModel;
|
|
}
|
|
|
|
get eventTopics(): EventTopics[] {
|
|
return [
|
|
{
|
|
topic: FaqChangeStatusEvent,
|
|
},
|
|
];
|
|
}
|
|
|
|
getResult(): BatchResult {
|
|
return this.result;
|
|
}
|
|
}
|