hedgedoc/src/notes/note.dto.ts
Tilman Vatteroth 0c56466dc1
Change year in copyright to 2021
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-01-06 22:10:19 +01:00

21 lines
511 B
TypeScript

/*
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
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()
metadata: NoteMetadataDto;
@IsArray()
@ValidateNested({ each: true })
editedByAtPosition: NoteAuthorshipDto[];
}