Skip to content

Commit

Permalink
feat: use dto for types
Browse files Browse the repository at this point in the history
  • Loading branch information
seo-wo committed Dec 1, 2023
1 parent 2a0fb0d commit 2d0b9cf
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/user/dto/create-user.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { IsEmail, IsNotEmpty, IsString } from 'class-validator';

export class CreateUserDto {
@IsString()
@IsNotEmpty()
readonly nickname: string;

@IsString()
readonly slackId: string;

@IsEmail()
@IsNotEmpty()
readonly email: string;

@IsString()
@IsNotEmpty()
readonly googleId: string;
}
10 changes: 10 additions & 0 deletions src/user/dto/signup-user.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { IsNotEmpty, IsString } from 'class-validator';

export class SignUpUserDto {
@IsString()
@IsNotEmpty()
readonly nickname: string;

@IsString()
readonly slackId: string;
}

0 comments on commit 2d0b9cf

Please sign in to comment.