diff --git a/concept.events.ts b/concept.events.ts new file mode 100644 index 0000000..1094691 --- /dev/null +++ b/concept.events.ts @@ -0,0 +1,30 @@ +import { ConceptResponseDTO } from './dto/conceptresponse.dto'; + +export class ConceptCreateEvent { + type = 'create'; + constructor(public concept: ConceptResponseDTO) { + this.concept = new ConceptResponseDTO(concept); + } +} + +export class ConceptEditEvent { + type = 'edit'; + constructor(public concept: ConceptResponseDTO) { + this.concept = new ConceptResponseDTO(concept); + } +} + +export class ConceptDeleteEvent { + type = 'delete'; + constructor(public id: number) {} +} + +export class ConceptEnableEvent { + type = 'enable'; + constructor(public id: number) {} +} + +export class ConceptDisableEvent { + type = 'disable'; + constructor(public id: number) {} +}