@@ -27,6 +27,9 @@ public class User extends BaseEntity {
2727 @ GeneratedValue (strategy = GenerationType .IDENTITY )
2828 private Long id ;
2929
30+ @ Column (name = "kakao_id" , nullable = false , unique = true , length = 50 )
31+ private String kakaoId ;
32+
3033 @ Column (name = "nickname" , nullable = false , unique = true , length = 50 )
3134 private String nickname ;
3235
@@ -40,6 +43,9 @@ public class User extends BaseEntity {
4043 @ Column (name = "image_url" , nullable = false , columnDefinition = "TEXT" )
4144 private String imageUrl ;
4245
46+ @ Column (name = "onboarding_completed" , nullable = false , columnDefinition = "BOOLEAN DEFAULT FALSE" )
47+ private Boolean onboardingCompleted = false ;
48+
4349 @ OneToMany (mappedBy = "user" , cascade = CascadeType .ALL )
4450 private List <UserSession > sessions = new ArrayList <>();
4551
@@ -48,4 +54,13 @@ public class User extends BaseEntity {
4854
4955 @ OneToMany (mappedBy = "user" , cascade = CascadeType .ALL )
5056 private List <SRHistory > srHistories = new ArrayList <>();
57+
58+ public void completeOnboarding (Tier selectedTier ) {
59+ this .tier = selectedTier ;
60+ this .onboardingCompleted = true ;
61+ }
62+
63+ public boolean needsOnboarding () {
64+ return !this .onboardingCompleted ;
65+ }
5166}
0 commit comments