Created
January 14, 2021 21:03
-
-
Save gmwill934/c3c68650f773018aa8c656697ea2c625 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { IsString } from 'class-validator'; | |
export class CreateCoffeeDto { | |
@IsString() | |
readonly name: string; | |
@IsString() | |
readonly brand: string; | |
@IsString({ each: true }) | |
readonly flavors: string[]; | |
} | |
import { PartialType } from '@nestjs/mapped-types'; | |
import { CreateCoffeeDto } from './create-coffee.dto'; | |
export class UpdateCoffeeDto extends PartialType(CreateCoffeeDto) {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment