mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-22 21:32:16 +00:00
NoteAuthorshipDto: Add doc comments
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
6c7bd0ed26
commit
7688b7c21f
1 changed files with 25 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue