hedgedoc/src/revisions/revision.dto.ts
David Mehren 5ed2fae44e
Enforce import order with prettier
Signed-off-by: David Mehren <git@herrmehren.de>
2021-08-29 18:45:46 +02:00

42 lines
817 B
TypeScript

/*
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { ApiProperty } from '@nestjs/swagger';
import { IsDate, IsNumber, IsString } from 'class-validator';
import { Revision } from './revision.entity';
export class RevisionDto {
/**
* ID of this revision
* @example 13
*/
@IsNumber()
@ApiProperty()
id: Revision['id'];
/**
* Markdown content of the revision
* @example "# I am a heading"
*/
@IsString()
@ApiProperty()
content: string;
/**
* Patch from the preceding revision to this one
*/
@IsString()
@ApiProperty()
patch: string;
/**
* Datestring of the time this revision was created
* @example "2020-12-01 12:23:34"
*/
@IsDate()
@ApiProperty()
createdAt: Date;
}