Add DTOs for notes and note authorship

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2020-07-26 20:57:51 +02:00
parent 735980da7c
commit 11f6358516
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
2 changed files with 32 additions and 0 deletions

View 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;
}