RevisionDto: Add doc comments

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-01-25 22:44:11 +01:00
parent e4f0c5c064
commit 43194500e9
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -8,12 +8,30 @@ import { IsDate, IsNumber, IsString } from 'class-validator';
import { Revision } from './revision.entity';
export class RevisionDto {
/**
* ID of this revision
* @example 13
*/
@IsNumber()
id: Revision['id'];
/**
* Markdown content of the revision
* @example "# I am a heading"
*/
@IsString()
content: string;
/**
* Patch from the preceding revision to this one
*/
@IsString()
patch: string;
/**
* Datestring of the time this revision was created
* @example "2020-12-01 12:23:34"
*/
@IsDate()
createdAt: Date;
}