hedgedoc/src/notes/note.dto.ts

16 lines
382 B
TypeScript
Raw Normal View History

import { IsArray, IsString, ValidateNested } from 'class-validator';
import { NoteAuthorshipDto } from './note-authorship.dto';
import { NoteMetadataDto } from './note-metadata.dto';
export class NoteDto {
@IsString()
content: string;
@ValidateNested()
metdata: NoteMetadataDto;
@IsArray()
@ValidateNested({ each: true })
editedByAtPosition: NoteAuthorshipDto[];
}