import { Attr } from 'ts-framework' import { AssistanceCategoryResponseDTO } from './assistance-category' export class CreateAssistanceDTO { @Attr({ type: String }) categoryId: string @Attr({ type: String }) instruction: string @Attr({ type: String }) type: string } export class UpdateAssistanceDTO { @Attr({ type: String }) id: string @Attr({ type: String, optional: true }) categoryId?: string @Attr({ type: String, optional: true }) instruction?: string @Attr({ type: String, optional: true }) type?: string } export class AssistanceResponseDTO { id: string instruction: string type: string category?: AssistanceCategoryResponseDTO constructor(model: AssistanceResponseDTO) { this.id = model.id this.instruction = model.instruction this.type = model.type if (model.category) { this.category = AssistanceCategoryResponseDTO.of(model.category) } } static of(model: AssistanceResponseDTO): AssistanceResponseDTO { return new AssistanceResponseDTO(model) } }