Skip to content

Commit 09c6ca8

Browse files
committed
Fix missing relationships in entities
1 parent d34e6a9 commit 09c6ca8

3 files changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
package com.creatubbles.api.model.notification;
22

33

4+
import android.support.annotation.NonNull;
5+
6+
import com.creatubbles.api.model.creation.Creation;
7+
import com.github.jasminb.jsonapi.annotations.Relationship;
48
import com.github.jasminb.jsonapi.annotations.Type;
59

610
/**
711
* @author Pawel Szymanski
812
*/
913
@Type("creation_entities")
1014
public class CreationEntity extends Entity {
15+
16+
@Relationship("creation")
17+
private Creation creation;
18+
19+
@NonNull
20+
public Creation getCreation() {
21+
return creation;
22+
}
1123
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
package com.creatubbles.api.model.notification;
22

3+
import android.support.annotation.NonNull;
4+
5+
import com.creatubbles.api.model.gallery.Gallery;
6+
import com.github.jasminb.jsonapi.annotations.Relationship;
37
import com.github.jasminb.jsonapi.annotations.Type;
48

59
/**
610
* @author Pawel Szymanski
711
*/
812
@Type("gallery_entities")
913
public class GalleryEntity extends Entity {
14+
15+
@Relationship("gallery")
16+
private Gallery gallery;
17+
18+
@NonNull
19+
public Gallery getGallery() {
20+
return gallery;
21+
}
1022
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
package com.creatubbles.api.model.notification;
22

3+
import android.support.annotation.NonNull;
4+
5+
import com.creatubbles.api.model.user.User;
6+
import com.github.jasminb.jsonapi.annotations.Relationship;
37
import com.github.jasminb.jsonapi.annotations.Type;
48

59
/**
610
* @author Pawel Szymanski
711
*/
812
@Type("user_entities")
913
public class UserEntity extends Entity {
14+
15+
@Relationship("user")
16+
private User user;
17+
18+
@NonNull
19+
public User getUser() {
20+
return user;
21+
}
1022
}

0 commit comments

Comments
 (0)