Recipe-app main
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { IsNotEmpty, IsString, MaxLength } from 'class-validator';
|
||||
|
||||
export class CreateProductDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@MaxLength(191)
|
||||
name!: string;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { IsInt } from 'class-validator';
|
||||
|
||||
export class MergeProductsDto {
|
||||
@IsInt()
|
||||
sourceProductId!: number;
|
||||
|
||||
@IsInt()
|
||||
targetProductId!: number;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { IsNotEmpty, IsString, MaxLength } from 'class-validator';
|
||||
|
||||
export class UpdateCanonicalNameDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@MaxLength(191)
|
||||
canonicalName!: string;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { IsNotEmpty, IsOptional, IsString, MaxLength } from 'class-validator';
|
||||
|
||||
export class UpdateProductDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@MaxLength(191)
|
||||
name?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user