-
Notifications
You must be signed in to change notification settings - Fork 0
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
회원 탈퇴를 할 수 있다. #545
회원 탈퇴를 할 수 있다. #545
Conversation
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.
작업양이 엄청나네요...
진짜 수고많으셨어요👍👍
@@ -7,7 +7,7 @@ export class UsersRoleEntity { | |||
@PrimaryColumn({ type: 'bigint', nullable: false }) | |||
userId: number; | |||
|
|||
@ManyToOne(() => UserEntity) | |||
@ManyToOne(() => UserEntity, { onDelete: 'CASCADE' }) |
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.
아하! 일단은 이렇게 해서 삭제가 되었나 보네요! 다행입니다.
@OneToOne(() => GroupAchievementEntity, { | ||
nullable: true, | ||
onDelete: 'SET NULL', | ||
}) |
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.
그룹 달성기록은 casecade에서 삭제 안하고 나두셨네요! 좋습니다!
@@ -17,7 +17,7 @@ export class UserGroupEntity extends BaseTimeEntity { | |||
@PrimaryGeneratedColumn() | |||
id: number; | |||
|
|||
@ManyToOne(() => UserEntity) | |||
@ManyToOne(() => UserEntity, { onDelete: 'CASCADE' }) |
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.
우선은 group entity는 삭제 안되고 user_group만 삭제 그러니까 그룹장만 그룹에서 없어지도록 했습니다.
Manager가 있으면 그 Manager가 그룹장이 된다거나 이런 로직은 현재 논의된게 없고 케이스가 복잡해서 우선은 그룹장만 나가도록 해놨습니다.
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.
아하!... 그죠 그건 너무 복잡해질 것 같긴해요...
네 일단 너무 수고 하셨어요!
PR 요약
변경 사항
Linked Issue
close #536