46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
import { BaseBatchDeleteManager } from 'src/core/modules/domain/usecase/managers/base-batch-delete.manager';
|
|
import { SeasonPeriodEntity } from '../../entities/season-period.entity';
|
|
import {
|
|
EventTopics,
|
|
validateRelations,
|
|
} from 'src/core/strings/constants/interface.constants';
|
|
import { SeasonPeriodModel } from '../../../data/models/season-period.model';
|
|
import { SeasonPeriodDeletedEvent } from '../../entities/event/season-period-deleted.event';
|
|
import { BatchResult } from 'src/core/response/domain/ok-response.interface';
|
|
import { Injectable } from '@nestjs/common';
|
|
|
|
@Injectable()
|
|
export class BatchDeleteSeasonPeriodManager extends BaseBatchDeleteManager<SeasonPeriodEntity> {
|
|
async beforeProcess(): Promise<void> {
|
|
return;
|
|
}
|
|
|
|
async validateData(data: SeasonPeriodEntity): Promise<void> {
|
|
return;
|
|
}
|
|
|
|
async afterProcess(): Promise<void> {
|
|
return;
|
|
}
|
|
|
|
get validateRelations(): validateRelations[] {
|
|
return [];
|
|
}
|
|
|
|
get entityTarget(): any {
|
|
return SeasonPeriodModel;
|
|
}
|
|
|
|
get eventTopics(): EventTopics[] {
|
|
return [
|
|
{
|
|
topic: SeasonPeriodDeletedEvent,
|
|
},
|
|
];
|
|
}
|
|
|
|
getResult(): BatchResult {
|
|
return this.result;
|
|
}
|
|
}
|