32 lines
781 B
TypeScript
32 lines
781 B
TypeScript
import { WordResponseDTO } from './dto/wordresponse.dto';
|
|
import type { ConceptEvent } from './events';
|
|
|
|
export class WordCreateEvent implements ConceptEvent {
|
|
type = 'create';
|
|
constructor(public word: WordResponseDTO) {
|
|
this.word = new WordResponseDTO(word);
|
|
}
|
|
}
|
|
|
|
export class WordEditEvent implements ConceptEvent {
|
|
type = 'edit';
|
|
constructor(public word: WordResponseDTO) {
|
|
this.word = new WordResponseDTO(word);
|
|
}
|
|
}
|
|
|
|
export class WordDeleteEvent implements ConceptEvent {
|
|
type = 'delete';
|
|
constructor(public id: number) {}
|
|
}
|
|
|
|
export class WordEnableEvent implements ConceptEvent {
|
|
type = 'enable';
|
|
constructor(public id: number) {}
|
|
}
|
|
|
|
export class WordDisableEvent implements ConceptEvent {
|
|
type = 'disable';
|
|
constructor(public id: number) {}
|
|
}
|