Skip to content
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

Closed
wants to merge 3 commits into from
Closed

[Feat] 프로젝트 생성 API 구현 #55

wants to merge 3 commits into from

Conversation

jjeonghak
Copy link
Collaborator

관련 이슈 번호

#54

작업 내용

  • dto 검증 추가
  • 엔티티 타임스탬프 설정
  • 프로젝트 생성 API 구현

고민과 학습내용

우선 프로젝트 엔티티에 필요한 속성이 별로 없어보여서 간단하게 구현했습니다.
이후 필요한 속성들이 생긴다면 하나씩 추가할 예정입니다.

@jjeonghak jjeonghak added Config 환경 설정, 기타 작업 Feature 새로운 기능을 추가 BE 서버 작업 labels Nov 11, 2024
@jjeonghak jjeonghak self-assigned this Nov 11, 2024
role: ProjectRole.ADMIN,
});
return new CreateProjectResponse(project);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

깔꼼하군요
역시 정한님 👍

Copy link
Collaborator

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';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


다른 엔티티에서 이 친구를 확장해서 사용하기 위해 common 에 위치한 걸까요?

Copy link
Collaborator Author

@jjeonghak jjeonghak Nov 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

모든 엔티티에 필요하다고 생각합니다. 그래서 common에 위치시켰습니다. 딱히 적절한 위치가 생각나지 않더군요..

Copy link
Collaborator

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);
}
Copy link
Collaborator

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴
username 과 email 이 명확하게 분리되었으면 좋겠습니다.
검증은 @isEmail() 이라 이메일을 요구하는 것 같지만, 이름이 username 이라 조금 당황했습니다...

Copy link
Collaborator Author

@jjeonghak jjeonghak Nov 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

서버에서 사용하는 username은 아이디로 사용되고 있고, 회원가입 때부터 아이디는 이메일 형식으로 받고 있었습니다. 그냥 이메일 형식을 사용하지 않도록 수정해두겠습니다.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사실 username 과, email 중 선택하면 되는 부분인 것 같아요!
저희가 email 을 사용할 필요가 없다면, username 으로도 충분하다고 생각됩니다.

@jjeonghak jjeonghak closed this Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE 서버 작업 Config 환경 설정, 기타 작업 Feature 새로운 기능을 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants