mirror of https://github.com/ghostfolio/ghostfolio
6 changed files with 21 additions and 13 deletions
@ -1,10 +1,13 @@ |
|||||
|
import { SYMBOL_MAXIMUM_LENGTH } from '@ghostfolio/common/config'; |
||||
|
|
||||
import { DataSource } from '@prisma/client'; |
import { DataSource } from '@prisma/client'; |
||||
import { IsEnum, IsString } from 'class-validator'; |
import { IsEnum, IsString, MaxLength } from 'class-validator'; |
||||
|
|
||||
export class CreateWatchlistItemDto { |
export class CreateWatchlistItemDto { |
||||
@IsEnum(DataSource) |
@IsEnum(DataSource) |
||||
dataSource: DataSource; |
dataSource: DataSource; |
||||
|
|
||||
@IsString() |
@IsString() |
||||
|
@MaxLength(SYMBOL_MAXIMUM_LENGTH) |
||||
symbol: string; |
symbol: string; |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue