File

src/models/category/dto/create-category.dto.ts

Description

Describes the fields needed to create a Category

Implements

Category

Index

Properties

Properties

name
Type : string
Decorators :
@IsString()
@IsNotEmpty()

Category name

import { IsNotEmpty, IsString } from 'class-validator';
import { Category } from '../entities/category.entity';

/** Describes the fields needed to create a Category */
export class CreateCategoryDto implements Category {
  /**
   * Category name
   * @example "Decoration"
   */
  @IsString()
  @IsNotEmpty()
  name: string;
}

results matching ""

    No results matching ""