mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 09:45:37 -04:00
Add DTOs for notes and note authorship
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
5ce8a532a8
commit
d7fe7a95c7
2 changed files with 32 additions and 0 deletions
17
src/notes/note-authorship.dto.ts
Normal file
17
src/notes/note-authorship.dto.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { IsDate, IsNumber, IsString, Min } from 'class-validator';
|
||||
import { UserInfoDto } from '../users/user-info.dto';
|
||||
|
||||
export class NoteAuthorshipDto {
|
||||
@IsString()
|
||||
userName: UserInfoDto['userName'];
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
startPos: number;
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
endPos: number;
|
||||
@IsDate()
|
||||
createdAt: Date;
|
||||
@IsDate()
|
||||
updatedAt: Date;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue