pos-be/src/modules/web-information/faq/domain/usecases/managers/update-faq.manager.ts

46 lines
1005 B
TypeScript

import { Injectable } from '@nestjs/common';
import { BaseUpdateManager } from 'src/core/modules/domain/usecase/managers/base-update.manager';
import { FaqEntity } from '../../entities/faq.entity';
import { FaqModel } from '../../../data/models/faq.model';
import { FaqUpdatedEvent } from '../../entities/event/faq-updated.event';
import {
EventTopics,
columnUniques,
validateRelations,
} from 'src/core/strings/constants/interface.constants';
@Injectable()
export class UpdateFaqManager extends BaseUpdateManager<FaqEntity> {
async validateProcess(): Promise<void> {
return;
}
async beforeProcess(): Promise<void> {
return;
}
async afterProcess(): Promise<void> {
return;
}
get validateRelations(): validateRelations[] {
return [];
}
get uniqueColumns(): columnUniques[] {
return [];
}
get entityTarget(): any {
return FaqModel;
}
get eventTopics(): EventTopics[] {
return [
{
topic: FaqUpdatedEvent,
},
];
}
}