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

πŸ”€ :: User Entity #1

Merged
merged 5 commits into from
Jul 30, 2022
Merged

πŸ”€ :: User Entity #1

merged 5 commits into from
Jul 30, 2022

Conversation

baekteun
Copy link
Member

κ°œμš”

λŒ€μΆ© μœ μ € μ—”ν‹°ν‹°λ₯Ό λ§Œλ“€μ–΄λ³΄μ•˜μŠ΅λ‹ˆλ‹€

μž‘μ—…μ‚¬ν•­

  • Gender enum
  • UserState enum
  • UserRole enum
  • User entity

etc

"ν•΄μ€˜"

@baekteun baekteun requested a review from dolong2 July 29, 2022 06:47
@baekteun baekteun self-assigned this Jul 29, 2022
Comment on lines 3 to 5
public enum UserRole {
STUDENT, TEACHER, ADMIN
}
Copy link
Member

Choose a reason for hiding this comment

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

이거 GrantedAuthority implementsν•˜κ³ 

public enum UserRole implements GrantedAuthority {
    ROLE_ADMIN, ROLE_STUDENT, ROLE_TEACHER;

    @Override
    public String getAuthority() {
        return name();
    }
}

μ΄λŸ°μ‹μœΌλ‘œ λ°”κΏ”μ•Ό 될거같은데?

Copy link
Member Author

@baekteun baekteun Jul 30, 2022

Choose a reason for hiding this comment

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

GrantedAuthorityκ°€ 있ꡰ?
6113cc6

Comment on lines 30 to 31
@Enumerated(EnumType.STRING)
private UserRole role;
Copy link
Member

Choose a reason for hiding this comment

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

여기도

    @Enumerated(EnumType.STRING)
    @ElementCollection(fetch = FetchType.EAGER)
    @CollectionTable(name = "Role", joinColumns = @JoinColumn(name = "id"))
    private List<Role> roles = new ArrayList<>();

@baekteun baekteun merged commit 1b87250 into main Jul 30, 2022
@baekteun baekteun deleted the feat/userEntity branch July 30, 2022 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants