pos-be/src/modules/web-information/gate/domain/usecases/managers/inactive-gate.manager.ts

46 lines
1.1 KiB
TypeScript

import { Injectable } from '@nestjs/common';
import { BaseUpdateStatusManager } from 'src/core/modules/domain/usecase/managers/base-update-status.manager';
import { GateEntity } from '../../entities/gate.entity';
import {
EventTopics,
validateRelations,
} from 'src/core/strings/constants/interface.constants';
import { GateModel } from '../../../data/models/gate.model';
import { GateChangeStatusEvent } from '../../entities/event/gate-change-status.event';
@Injectable()
export class InactiveGateManager extends BaseUpdateStatusManager<GateEntity> {
getResult(): string {
return `Success inactive data gate ${this.result.code}`;
}
async validateProcess(): Promise<void> {
return;
}
async beforeProcess(): Promise<void> {
return;
}
async afterProcess(): Promise<void> {
return;
}
get validateRelations(): validateRelations[] {
return [];
}
get entityTarget(): any {
return GateModel;
}
get eventTopics(): EventTopics[] {
return [
{
topic: GateChangeStatusEvent,
data: this.data,
},
];
}
}