Added modules for books & series.

This commit is contained in:
Tom
2025-02-24 20:54:58 +00:00
parent 8f0ca1ce58
commit a44cd89072
25 changed files with 767 additions and 41 deletions

View File

@ -0,0 +1,35 @@
import { Transform } from 'class-transformer';
import { IsDate, IsNotEmpty, IsNumber, IsOptional, IsPositive, IsString, MaxLength } from 'class-validator';
export class CreateBookDto {
@IsString()
@IsOptional()
providerSeriesId: string;
@IsString()
@IsNotEmpty()
providerBookId: string;
@IsString()
@IsNotEmpty()
@MaxLength(128)
title: string;
@IsString()
@MaxLength(512)
desc: string;
@IsNumber()
@IsOptional()
@IsPositive()
volume: number | null;
@IsString()
@IsNotEmpty()
provider: string;
@IsDate()
@IsNotEmpty()
@Transform(({ value }) => new Date(value))
publishedAt: Date
}