Add DTOs for revision and revision metadata

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

View file

@ -0,0 +1,13 @@
import { IsDate, IsNumber, IsString } from 'class-validator';
import { Revision } from './revision.entity';
export class RevisionMetadataDto {
@IsString()
id: Revision['id'];
@IsDate()
updatedAt: Date;
@IsNumber()
length: number;
}

View file

@ -0,0 +1,11 @@
import { IsString } from 'class-validator';
import { Revision } from './revision.entity';
export class RevisionDto {
@IsString()
id: Revision['id'];
@IsString()
content: string;
@IsString()
patch: string;
}