mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 01:35:18 -04:00

This makes it possible for the autogenerated openapi file to contain all the dtos instead of nothing. Signed-off-by: Philip Molares <philip.molares@udo.edu>
35 lines
692 B
TypeScript
35 lines
692 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
import { IsDate, IsNumber } from 'class-validator';
|
|
import { Revision } from './revision.entity';
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
|
|
export class RevisionMetadataDto {
|
|
/**
|
|
* ID of this revision
|
|
* @example 13
|
|
*/
|
|
@IsNumber()
|
|
@ApiProperty()
|
|
id: Revision['id'];
|
|
|
|
/**
|
|
* Datestring of the time this revision was created
|
|
* @example "2020-12-01 12:23:34"
|
|
*/
|
|
@IsDate()
|
|
@ApiProperty()
|
|
createdAt: Date;
|
|
|
|
/**
|
|
* Number of characters in this revision
|
|
* @example 142
|
|
*/
|
|
@IsNumber()
|
|
@ApiProperty()
|
|
length: number;
|
|
}
|