31 lines
831 B
TypeScript
31 lines
831 B
TypeScript
import { ConceptResponseDTO } from "./dto/conceptresponse.dto";
|
|
import type { ConceptEvent } from "./events";
|
|
export class ConceptCreateEvent implements ConceptEvent {
|
|
type = "create";
|
|
constructor(public concept: ConceptResponseDTO) {
|
|
this.concept = new ConceptResponseDTO(concept);
|
|
}
|
|
}
|
|
|
|
export class ConceptEditEvent implements ConceptEvent {
|
|
type = "edit";
|
|
constructor(public concept: ConceptResponseDTO) {
|
|
this.concept = new ConceptResponseDTO(concept);
|
|
}
|
|
}
|
|
|
|
export class ConceptDeleteEvent implements ConceptEvent {
|
|
type = "delete";
|
|
constructor(public id: number) {}
|
|
}
|
|
|
|
export class ConceptEnableEvent implements ConceptEvent {
|
|
type = "enable";
|
|
constructor(public id: number) {}
|
|
}
|
|
|
|
export class ConceptDisableEvent implements ConceptEvent {
|
|
type = "disable";
|
|
constructor(public id: number) {}
|
|
}
|