Skip to content

Commit 02a9b55

Browse files
committed
Revert "remove unused class"
This reverts commit 42391a7.
1 parent 2e81b2c commit 02a9b55

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2+
import { IsDate, IsEnum, IsNotEmpty, IsOptional, IsString } from 'class-validator';
3+
import { MediaSourceDataFormat } from '@modules/media-source';
4+
5+
export class ExternalToolMediumParams {
6+
@IsString()
7+
@IsNotEmpty()
8+
@ApiProperty({ type: String, description: 'Id of the medium' })
9+
public mediumId!: string;
10+
11+
@IsString()
12+
@IsOptional()
13+
@IsNotEmpty()
14+
@ApiPropertyOptional({ type: String, description: 'Publisher of the medium' })
15+
public publisher?: string;
16+
17+
@IsString()
18+
@IsOptional()
19+
@IsNotEmpty()
20+
@ApiPropertyOptional({ type: String, description: 'The id of the media source' })
21+
public mediaSourceId?: string;
22+
23+
@IsOptional()
24+
@IsEnum(MediaSourceDataFormat, { each: true })
25+
@ApiPropertyOptional({
26+
enum: MediaSourceDataFormat,
27+
enumName: 'MediaSourceDataFormat',
28+
description: 'Restrict media sources to a specific format',
29+
})
30+
public format?: MediaSourceDataFormat;
31+
32+
@IsDate()
33+
@IsOptional()
34+
@ApiPropertyOptional({ type: Date, description: 'The date the medium was last modified' })
35+
public modifiedAt?: Date;
36+
}

0 commit comments

Comments
 (0)