Files
webapp-dto/word.events.ts
T
2024-12-30 00:39:06 +01:00

31 lines
615 B
TypeScript

import { WordResponseDTO } from './dto/wordresponse.dto';
export class WordCreateEvent {
type = 'create';
constructor(public word: WordResponseDTO) {
this.word = new WordResponseDTO(word);
}
}
export class WordEditEvent {
type = 'edit';
constructor(public word: WordResponseDTO) {
this.word = new WordResponseDTO(word);
}
}
export class WordDeleteEvent {
type = 'delete';
constructor(public id: number) {}
}
export class WordEnableEvent {
type = 'enable';
constructor(public id: number) {}
}
export class WordDisableEvent {
type = 'disable';
constructor(public id: number) {}
}