mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-03 00:19:57 -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>
47 lines
892 B
TypeScript
47 lines
892 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
import { IsArray, IsBoolean, IsDate, IsString } from 'class-validator';
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
|
|
export class HistoryEntryDto {
|
|
/**
|
|
* ID or Alias of the note
|
|
*/
|
|
@IsString()
|
|
@ApiProperty()
|
|
identifier: string;
|
|
|
|
/**
|
|
* Title of the note
|
|
* Does not contain any markup but might be empty
|
|
* @example "Shopping List"
|
|
*/
|
|
@IsString()
|
|
@ApiProperty()
|
|
title: string;
|
|
|
|
/**
|
|
* Datestring of the last time this note was updated
|
|
* @example "2020-12-01 12:23:34"
|
|
*/
|
|
@IsDate()
|
|
@ApiProperty()
|
|
lastVisited: Date;
|
|
|
|
@IsArray()
|
|
@IsString({ each: true })
|
|
@ApiProperty()
|
|
tags: string[];
|
|
|
|
/**
|
|
* True if this note is pinned
|
|
* @example false
|
|
*/
|
|
@IsBoolean()
|
|
@ApiProperty()
|
|
pinStatus: boolean;
|
|
}
|