NoteAuthorshipDto: Add doc comments

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

View file

@ -8,16 +8,41 @@ import { IsDate, IsNumber, IsString, Min } from 'class-validator';
import { UserInfoDto } from '../users/user-info.dto';
export class NoteAuthorshipDto {
/**
* Username of the user who authored this section
* @example "john.smith"
*/
@IsString()
userName: UserInfoDto['userName'];
/**
* Character index of the start of this section
* @example 102
*/
@IsNumber()
@Min(0)
startPos: number;
/**
* Character index of the end of this section
* Must be greater than {@link startPos}
* @example 154
*/
@IsNumber()
@Min(0)
endPos: number;
/**
* Datestring of the time this section was created
* @example "2020-12-01 12:23:34"
*/
@IsDate()
createdAt: Date;
/**
* Datestring of the last time this section was edited
* @example "2020-12-01 12:23:34"
*/
@IsDate()
updatedAt: Date;
}