Spaces:
Sleeping
Sleeping
Viktoria435
Refactor import paths in Book, Visitor, and Worker modules to use relative paths
c995cfc | import { ApiProperty } from '@nestjs/swagger'; | |
| import { | |
| IsString, | |
| IsInt, | |
| MinLength, | |
| MaxLength, | |
| Min, | |
| Max, | |
| IsNotEmpty, | |
| IsEnum, | |
| } from 'class-validator'; | |
| import { BookStatus, Genre } from '../../types/book.types'; | |
| export class CreateBookDto { | |
| ({ | |
| description: 'Название книги', | |
| example: 'Pride and Prejudice', | |
| }) | |
| () | |
| ({ message: 'Title is required' }) | |
| (2) | |
| (100) | |
| title: string; | |
| ({ | |
| description: 'Автор книги', | |
| example: 'Jane Austen', | |
| }) | |
| () | |
| ({ message: 'Author is required' }) | |
| (2) | |
| (100) | |
| author: string; | |
| ({ | |
| description: 'Количество страниц', | |
| example: 279, | |
| }) | |
| () | |
| (1) | |
| (10000) | |
| pages: number; | |
| ({ | |
| description: 'Год публикации', | |
| example: 1813, | |
| }) | |
| () | |
| (1000) | |
| (new Date().getFullYear()) | |
| year: number; | |
| ({ | |
| description: 'Жанр книги', | |
| enum: Genre, | |
| example: Genre.Romance, | |
| }) | |
| (Genre) | |
| genre: Genre; | |
| ({ | |
| description: 'Статус книги', | |
| enum: BookStatus, | |
| example: BookStatus.AVAILABLE, | |
| }) | |
| (BookStatus, { message: 'Invalid book status' }) | |
| status: BookStatus; | |
| } | |