mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-26 19:53:59 -05:00
RevisionDto: Add doc comments
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
e4f0c5c064
commit
43194500e9
1 changed files with 18 additions and 0 deletions
|
@ -8,12 +8,30 @@ import { IsDate, IsNumber, IsString } from 'class-validator';
|
||||||
import { Revision } from './revision.entity';
|
import { Revision } from './revision.entity';
|
||||||
|
|
||||||
export class RevisionDto {
|
export class RevisionDto {
|
||||||
|
/**
|
||||||
|
* ID of this revision
|
||||||
|
* @example 13
|
||||||
|
*/
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
id: Revision['id'];
|
id: Revision['id'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Markdown content of the revision
|
||||||
|
* @example "# I am a heading"
|
||||||
|
*/
|
||||||
@IsString()
|
@IsString()
|
||||||
content: string;
|
content: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Patch from the preceding revision to this one
|
||||||
|
*/
|
||||||
@IsString()
|
@IsString()
|
||||||
patch: string;
|
patch: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Datestring of the time this revision was created
|
||||||
|
* @example "2020-12-01 12:23:34"
|
||||||
|
*/
|
||||||
@IsDate()
|
@IsDate()
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue