|
3 | 3 | import android.support.annotation.NonNull; |
4 | 4 | import android.support.annotation.Nullable; |
5 | 5 |
|
| 6 | +import com.creatubbles.api.model.school.School; |
| 7 | +import com.creatubbles.api.model.user.custom_style.CustomStyle; |
6 | 8 | import com.fasterxml.jackson.annotation.JsonCreator; |
7 | 9 | import com.fasterxml.jackson.annotation.JsonProperty; |
8 | 10 | import com.github.jasminb.jsonapi.annotations.Id; |
| 11 | +import com.github.jasminb.jsonapi.annotations.Relationship; |
9 | 12 | import com.github.jasminb.jsonapi.annotations.Type; |
10 | 13 |
|
11 | 14 | import java.util.Date; |
@@ -89,6 +92,12 @@ public class User { |
89 | 92 |
|
90 | 93 | private String interests; |
91 | 94 |
|
| 95 | + @Relationship("custom_style") |
| 96 | + private CustomStyle customStyle; |
| 97 | + |
| 98 | + @Relationship("school") |
| 99 | + private School school; |
| 100 | + |
92 | 101 | public static User withId(String id) { |
93 | 102 | return new User(id); |
94 | 103 | } |
@@ -268,6 +277,16 @@ public String getInterests() { |
268 | 277 | return interests; |
269 | 278 | } |
270 | 279 |
|
| 280 | + @Nullable |
| 281 | + public School getSchool() { |
| 282 | + return school; |
| 283 | + } |
| 284 | + |
| 285 | + @Nullable |
| 286 | + public CustomStyle getCustomStyle() { |
| 287 | + return customStyle; |
| 288 | + } |
| 289 | + |
271 | 290 | @Override |
272 | 291 | public String toString() { |
273 | 292 | return "User{" + |
@@ -298,6 +317,8 @@ public String toString() { |
298 | 317 | ", homeSchooling=" + homeSchooling + |
299 | 318 | ", whatDoYouTeach='" + whatDoYouTeach + '\'' + |
300 | 319 | ", interests='" + interests + '\'' + |
| 320 | + ", customStyle=" + customStyle + |
| 321 | + ", school=" + school + |
301 | 322 | '}'; |
302 | 323 | } |
303 | 324 | } |
0 commit comments