1+ package com .sayup .SayUp .kakao .dto ;
2+
3+ import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
4+ import com .fasterxml .jackson .annotation .JsonProperty ;
5+ import lombok .Getter ;
6+ import lombok .NoArgsConstructor ;
7+
8+ import java .util .Date ;
9+ import java .util .HashMap ;
10+
11+ @ Getter
12+ @ NoArgsConstructor //역직렬화를 위한 기본 생성자
13+ @ JsonIgnoreProperties (ignoreUnknown = true )
14+ public class KakaoUserInfoResponseDto {
15+
16+ //회원 번호
17+ @ JsonProperty ("id" )
18+ public Long id ;
19+
20+ //자동 연결 설정을 비활성화한 경우만 존재.
21+ //true : 연결 상태, false : 연결 대기 상태
22+ @ JsonProperty ("has_signed_up" )
23+ public Boolean hasSignedUp ;
24+
25+ //서비스에 연결 완료된 시각. UTC
26+ @ JsonProperty ("connected_at" )
27+ public Date connectedAt ;
28+
29+ //카카오싱크 간편가입을 통해 로그인한 시각. UTC
30+ @ JsonProperty ("synched_at" )
31+ public Date synchedAt ;
32+
33+ //사용자 프로퍼티
34+ @ JsonProperty ("properties" )
35+ public HashMap <String , String > properties ;
36+
37+ //카카오 계정 정보
38+ @ JsonProperty ("kakao_account" )
39+ public KakaoAccount kakaoAccount ;
40+
41+ //uuid 등 추가 정보
42+ @ JsonProperty ("for_partner" )
43+ public Partner partner ;
44+
45+ @ Getter
46+ @ NoArgsConstructor
47+ @ JsonIgnoreProperties (ignoreUnknown = true )
48+ public class KakaoAccount {
49+
50+ //프로필 정보 제공 동의 여부
51+ @ JsonProperty ("profile_needs_agreement" )
52+ public Boolean isProfileAgree ;
53+
54+ //닉네임 제공 동의 여부
55+ @ JsonProperty ("profile_nickname_needs_agreement" )
56+ public Boolean isNickNameAgree ;
57+
58+ //프로필 사진 제공 동의 여부
59+ @ JsonProperty ("profile_image_needs_agreement" )
60+ public Boolean isProfileImageAgree ;
61+
62+ //사용자 프로필 정보
63+ @ JsonProperty ("profile" )
64+ public Profile profile ;
65+
66+ //이름 제공 동의 여부
67+ @ JsonProperty ("name_needs_agreement" )
68+ public Boolean isNameAgree ;
69+
70+ //카카오계정 이름
71+ @ JsonProperty ("name" )
72+ public String name ;
73+
74+ //이메일 제공 동의 여부
75+ @ JsonProperty ("email_needs_agreement" )
76+ public Boolean isEmailAgree ;
77+
78+ //이메일이 유효 여부
79+ // true : 유효한 이메일, false : 이메일이 다른 카카오 계정에 사용돼 만료
80+ @ JsonProperty ("is_email_valid" )
81+ public Boolean isEmailValid ;
82+
83+ //이메일이 인증 여부
84+ //true : 인증된 이메일, false : 인증되지 않은 이메일
85+ @ JsonProperty ("is_email_verified" )
86+ public Boolean isEmailVerified ;
87+
88+ //카카오계정 대표 이메일
89+ @ JsonProperty ("email" )
90+ public String email ;
91+
92+ //연령대 제공 동의 여부
93+ @ JsonProperty ("age_range_needs_agreement" )
94+ public Boolean isAgeAgree ;
95+
96+ //연령대
97+ //참고 https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api#req-user-info
98+ @ JsonProperty ("age_range" )
99+ public String ageRange ;
100+
101+ //출생 연도 제공 동의 여부
102+ @ JsonProperty ("birthyear_needs_agreement" )
103+ public Boolean isBirthYearAgree ;
104+
105+ //출생 연도 (YYYY 형식)
106+ @ JsonProperty ("birthyear" )
107+ public String birthYear ;
108+
109+ //생일 제공 동의 여부
110+ @ JsonProperty ("birthday_needs_agreement" )
111+ public Boolean isBirthDayAgree ;
112+
113+ //생일 (MMDD 형식)
114+ @ JsonProperty ("birthday" )
115+ public String birthDay ;
116+
117+ //생일 타입
118+ // SOLAR(양력) 혹은 LUNAR(음력)
119+ @ JsonProperty ("birthday_type" )
120+ public String birthDayType ;
121+
122+ //성별 제공 동의 여부
123+ @ JsonProperty ("gender_needs_agreement" )
124+ public Boolean isGenderAgree ;
125+
126+ //성별
127+ @ JsonProperty ("gender" )
128+ public String gender ;
129+
130+ //전화번호 제공 동의 여부
131+ @ JsonProperty ("phone_number_needs_agreement" )
132+ public Boolean isPhoneNumberAgree ;
133+
134+ //전화번호
135+ //국내 번호인 경우 +82 00-0000-0000 형식
136+ @ JsonProperty ("phone_number" )
137+ public String phoneNumber ;
138+
139+ //CI 동의 여부
140+ @ JsonProperty ("ci_needs_agreement" )
141+ public Boolean isCIAgree ;
142+
143+ //CI, 연계 정보
144+ @ JsonProperty ("ci" )
145+ public String ci ;
146+
147+ //CI 발급 시각, UTC
148+ @ JsonProperty ("ci_authenticated_at" )
149+ public Date ciCreatedAt ;
150+
151+ @ Getter
152+ @ NoArgsConstructor
153+ @ JsonIgnoreProperties (ignoreUnknown = true )
154+ public class Profile {
155+
156+ //닉네임
157+ @ JsonProperty ("nickname" )
158+ public String nickName ;
159+
160+ //프로필 미리보기 이미지 URL
161+ @ JsonProperty ("thumbnail_image_url" )
162+ public String thumbnailImageUrl ;
163+
164+ //프로필 사진 URL
165+ @ JsonProperty ("profile_image_url" )
166+ public String profileImageUrl ;
167+
168+ //프로필 사진 URL 기본 프로필인지 여부
169+ //true : 기본 프로필, false : 사용자 등록
170+ @ JsonProperty ("is_default_image" )
171+ public String isDefaultImage ;
172+
173+ //닉네임이 기본 닉네임인지 여부
174+ //true : 기본 닉네임, false : 사용자 등록
175+ @ JsonProperty ("is_default_nickname" )
176+ public Boolean isDefaultNickName ;
177+
178+ }
179+ }
180+
181+ @ Getter
182+ @ NoArgsConstructor
183+ @ JsonIgnoreProperties (ignoreUnknown = true )
184+ public class Partner {
185+ //고유 ID
186+ @ JsonProperty ("uuid" )
187+ public String uuid ;
188+ }
189+
190+ }
0 commit comments