-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] 프로젝트 생성 API 구현 #55
Conversation
role: ProjectRole.ADMIN, | ||
}); | ||
return new CreateProjectResponse(project); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
깔꼼하군요
역시 정한님 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
나중에 트랜잭션 처리도 해야겠군요...
@@ -0,0 +1,9 @@ | |||
import { CreateDateColumn, UpdateDateColumn } from 'typeorm'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓
다른 엔티티에서 이 친구를 확장해서 사용하기 위해 common 에 위치한 걸까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
모든 엔티티에 필요하다고 생각합니다. 그래서 common에 위치시켰습니다. 딱히 적절한 위치가 생각나지 않더군요..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋습니다. 저는 저렇게 타임스탬프를 분리해본 경험조차 없습니다 ㅎㅎ
role: ProjectRole.ADMIN, | ||
}); | ||
return new CreateProjectResponse(project); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
나중에 트랜잭션 처리도 해야겠군요...
|
||
export class CreateUserDto { | ||
@IsNotEmpty() | ||
@IsEmail() | ||
username: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴
username 과 email 이 명확하게 분리되었으면 좋겠습니다.
검증은 @isEmail()
이라 이메일을 요구하는 것 같지만, 이름이 username 이라 조금 당황했습니다...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
서버에서 사용하는 username
은 아이디로 사용되고 있고, 회원가입 때부터 아이디는 이메일 형식으로 받고 있었습니다. 그냥 이메일 형식을 사용하지 않도록 수정해두겠습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
사실 username 과, email 중 선택하면 되는 부분인 것 같아요!
저희가 email 을 사용할 필요가 없다면, username 으로도 충분하다고 생각됩니다.
관련 이슈 번호
#54
작업 내용
고민과 학습내용
우선 프로젝트 엔티티에 필요한 속성이 별로 없어보여서 간단하게 구현했습니다.
이후 필요한 속성들이 생긴다면 하나씩 추가할 예정입니다.