mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-23 14:17:15 +00:00
Make objects cascade when deleting them
This commit is contained in:
parent
ed7c1a19aa
commit
92e04d7431
58 changed files with 178 additions and 261 deletions
|
|
@ -111,7 +111,7 @@ abstract class HabiticaBaseApplication : Application() {
|
|||
.compactOnLaunch { totalBytes, usedBytes ->
|
||||
|
||||
// Compact if the file is over 100MB in size and less than 50% 'used'
|
||||
val oneHundredMB = 100 * 1024 * 1024
|
||||
val oneHundredMB = 50 * 1024 * 1024
|
||||
(totalBytes > oneHundredMB) && (usedBytes / totalBytes) < 0.5
|
||||
}
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
package com.habitrpg.android.habitica.models;
|
||||
|
||||
public class IAPGift {
|
||||
public String uuid;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
package com.habitrpg.android.habitica.models
|
||||
|
||||
class IAPGift {
|
||||
var uuid: String? = null
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
package com.habitrpg.android.habitica.models;
|
||||
|
||||
public class PurchaseValidationResult {
|
||||
public boolean ok;
|
||||
public Object data;
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
package com.habitrpg.android.habitica.models
|
||||
|
||||
class PurchaseValidationResult {
|
||||
var ok = false
|
||||
var data: Any? = null
|
||||
}
|
||||
|
|
@ -3,8 +3,10 @@ package com.habitrpg.android.habitica.models
|
|||
import io.realm.RealmModel
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
import java.util.*
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class TutorialStep: RealmObject(), BaseMainObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.habitrpg.android.habitica.models
|
||||
|
||||
interface VersionedObject {
|
||||
|
||||
var versionNumber: Int
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ import com.google.gson.annotations.SerializedName
|
|||
import io.realm.RealmModel
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
import java.util.*
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class WorldStateEvent: RealmObject(), BaseMainObject {
|
||||
val isCurrentlyActive: Boolean
|
||||
get() {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ package com.habitrpg.android.habitica.models.auth
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class LocalAuthentication : RealmObject(), BaseObject {
|
||||
@PrimaryKey
|
||||
var userID: String? = null
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
package com.habitrpg.android.habitica.models.auth;
|
||||
|
||||
/**
|
||||
* Created by magicmicky on 04/02/15.
|
||||
*/
|
||||
public class UserAuth {
|
||||
private String username;
|
||||
private String password;
|
||||
private String confirmPassword;
|
||||
private String email;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getConfirmPassword() {
|
||||
return confirmPassword;
|
||||
}
|
||||
|
||||
public void setConfirmPassword(String confirmPassword) {
|
||||
this.confirmPassword = confirmPassword;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package com.habitrpg.android.habitica.models.auth
|
||||
|
||||
class UserAuth {
|
||||
var username: String? = null
|
||||
var password: String? = null
|
||||
var confirmPassword: String? = null
|
||||
var email: String? = null
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
package com.habitrpg.android.habitica.models.auth;
|
||||
|
||||
/**
|
||||
* Created by viirus on 13/11/15.
|
||||
*/
|
||||
public class UserAuthSocial {
|
||||
private String network;
|
||||
private UserAuthSocialTokens authResponse;
|
||||
|
||||
public String getNetwork() {
|
||||
return network;
|
||||
}
|
||||
|
||||
public void setNetwork(String network) {
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
public UserAuthSocialTokens getAuthResponse() {
|
||||
return authResponse;
|
||||
}
|
||||
|
||||
public void setAuthResponse(UserAuthSocialTokens authResponse) {
|
||||
this.authResponse = authResponse;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.habitrpg.android.habitica.models.auth
|
||||
|
||||
|
||||
class UserAuthSocial {
|
||||
var network: String? = null
|
||||
var authResponse: UserAuthSocialTokens? = null
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
package com.habitrpg.android.habitica.models.auth;
|
||||
|
||||
/**
|
||||
* Created by viirus on 13/11/15.
|
||||
*/
|
||||
public class UserAuthSocialTokens {
|
||||
private String client_id;
|
||||
private String access_token;
|
||||
|
||||
public String getClient_id() {
|
||||
return client_id;
|
||||
}
|
||||
|
||||
public void setClient_id(String client_id) {
|
||||
this.client_id = client_id;
|
||||
}
|
||||
|
||||
public String getAccess_token() {
|
||||
return access_token;
|
||||
}
|
||||
|
||||
public void setAccess_token(String access_token) {
|
||||
this.access_token = access_token;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
package com.habitrpg.android.habitica.models.auth
|
||||
|
||||
class UserAuthSocialTokens {
|
||||
var client_id: String? = null
|
||||
var access_token: String? = null
|
||||
}
|
||||
|
|
@ -4,7 +4,9 @@ import com.habitrpg.android.habitica.models.BaseObject
|
|||
import io.realm.RealmList
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class QuestProgress : RealmObject(), BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ package com.habitrpg.android.habitica.models.inventory
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class QuestProgressCollect : RealmObject(), BaseObject {
|
||||
@PrimaryKey
|
||||
var key: String? = null
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ import com.habitrpg.android.habitica.models.user.Hair
|
|||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class MemberPreferences : RealmObject(), AvatarPreferences {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ import com.habitrpg.android.habitica.models.BaseObject
|
|||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class ShopItemUnlockCondition : RealmObject(), BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ package com.habitrpg.android.habitica.models.social
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class ChallengeMembership : RealmObject, BaseObject {
|
||||
@PrimaryKey
|
||||
var combinedID: String = ""
|
||||
|
|
|
|||
|
|
@ -3,11 +3,9 @@ package com.habitrpg.android.habitica.models.social
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
/**
|
||||
* Created by phillip on 30.06.17.
|
||||
*/
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class ChatMessageLike : RealmObject, BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ import com.habitrpg.android.habitica.models.BaseMainObject
|
|||
import io.realm.RealmModel
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class GroupCategory : RealmObject(), BaseMainObject {
|
||||
override val realmClass: Class<out RealmModel>
|
||||
get() = Group::class.java
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ package com.habitrpg.android.habitica.models.social
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class GroupMembership : RealmObject, BaseObject {
|
||||
@PrimaryKey
|
||||
var combinedID: String = ""
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ import com.habitrpg.android.habitica.models.inventory.Quest
|
|||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class UserParty : RealmObject(), BaseObject {
|
||||
@PrimaryKey
|
||||
var userId: String? = null
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ import com.habitrpg.android.habitica.models.user.Preferences
|
|||
import com.habitrpg.android.habitica.models.user.Stats
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class UserStyles : RealmObject(), Avatar {
|
||||
@PrimaryKey
|
||||
var id: String? = null
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@ import com.habitrpg.android.habitica.models.BaseObject
|
|||
import io.realm.RealmModel
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
import java.util.*
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class ChecklistItem : RealmObject, BaseMainObject, Parcelable {
|
||||
|
||||
override val realmClass: Class<ChecklistItem>
|
||||
|
|
|
|||
|
|
@ -1,148 +0,0 @@
|
|||
package com.habitrpg.android.habitica.models.tasks;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import io.realm.RealmObject;
|
||||
import io.realm.annotations.PrimaryKey;
|
||||
|
||||
public class Days extends RealmObject implements Parcelable {
|
||||
|
||||
@PrimaryKey
|
||||
private String taskId;
|
||||
private boolean m, t, w, th, f, s, su;
|
||||
|
||||
public boolean getT() {
|
||||
return t;
|
||||
}
|
||||
|
||||
public void setT(boolean t) {
|
||||
this.t = t;
|
||||
}
|
||||
|
||||
public boolean getW() {
|
||||
return w;
|
||||
}
|
||||
|
||||
public void setW(boolean w) {
|
||||
this.w = w;
|
||||
}
|
||||
|
||||
public boolean getTh() {
|
||||
return th;
|
||||
}
|
||||
|
||||
public void setTh(boolean th) {
|
||||
this.th = th;
|
||||
}
|
||||
|
||||
public boolean getF() {
|
||||
return f;
|
||||
}
|
||||
|
||||
public void setF(boolean f) {
|
||||
this.f = f;
|
||||
}
|
||||
|
||||
public boolean getS() {
|
||||
return s;
|
||||
}
|
||||
|
||||
public void setS(boolean s) {
|
||||
this.s = s;
|
||||
}
|
||||
|
||||
public boolean getSu() {
|
||||
return su;
|
||||
}
|
||||
|
||||
public void setSu(boolean su) {
|
||||
this.su = su;
|
||||
}
|
||||
|
||||
public boolean getM() {
|
||||
return m;
|
||||
}
|
||||
|
||||
public void setM(boolean m) {
|
||||
this.m = m;
|
||||
}
|
||||
|
||||
public boolean getForDay(int day) {
|
||||
switch (day) {
|
||||
case 2:
|
||||
return this.getM();
|
||||
case 3:
|
||||
return this.getT();
|
||||
case 4:
|
||||
return this.getW();
|
||||
case 5:
|
||||
return this.getTh();
|
||||
case 6:
|
||||
return this.getF();
|
||||
case 7:
|
||||
return this.getS();
|
||||
case 1:
|
||||
return this.getSu();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(this.taskId);
|
||||
dest.writeByte(this.m ? (byte) 1 : (byte) 0);
|
||||
dest.writeByte(this.t ? (byte) 1 : (byte) 0);
|
||||
dest.writeByte(this.w ? (byte) 1 : (byte) 0);
|
||||
dest.writeByte(this.th ? (byte) 1 : (byte) 0);
|
||||
dest.writeByte(this.f ? (byte) 1 : (byte) 0);
|
||||
dest.writeByte(this.s ? (byte) 1 : (byte) 0);
|
||||
dest.writeByte(this.su ? (byte) 1 : (byte) 0);
|
||||
}
|
||||
|
||||
protected Days(Parcel in) {
|
||||
this.taskId = in.readString();
|
||||
this.m = in.readByte() != 0;
|
||||
this.t = in.readByte() != 0;
|
||||
this.w = in.readByte() != 0;
|
||||
this.th = in.readByte() != 0;
|
||||
this.f = in.readByte() != 0;
|
||||
this.s = in.readByte() != 0;
|
||||
this.su = in.readByte() != 0;
|
||||
}
|
||||
|
||||
public Days() {
|
||||
m = true;
|
||||
t = true;
|
||||
w = true;
|
||||
th = true;
|
||||
f = true;
|
||||
s = true;
|
||||
su = true;
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<Days> CREATOR = new Parcelable.Creator<Days>() {
|
||||
@Override
|
||||
public Days createFromParcel(Parcel source) {
|
||||
return new Days(source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Days[] newArray(int size) {
|
||||
return new Days[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.habitrpg.android.habitica.models.tasks
|
||||
|
||||
import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Days() : RealmObject(), Parcelable {
|
||||
@PrimaryKey
|
||||
var taskId: String? = null
|
||||
var m: Boolean = true
|
||||
var t: Boolean = true
|
||||
var w: Boolean = true
|
||||
var th: Boolean = true
|
||||
var f: Boolean = true
|
||||
var s: Boolean = true
|
||||
var su: Boolean = true
|
||||
|
||||
override fun writeToParcel(dest: Parcel, flags: Int) {
|
||||
dest.writeString(taskId)
|
||||
dest.writeByte(if (m) 1.toByte() else 0.toByte())
|
||||
dest.writeByte(if (t) 1.toByte() else 0.toByte())
|
||||
dest.writeByte(if (w) 1.toByte() else 0.toByte())
|
||||
dest.writeByte(if (th) 1.toByte() else 0.toByte())
|
||||
dest.writeByte(if (f) 1.toByte() else 0.toByte())
|
||||
dest.writeByte(if (s) 1.toByte() else 0.toByte())
|
||||
dest.writeByte(if (su) 1.toByte() else 0.toByte())
|
||||
}
|
||||
|
||||
protected constructor(`in`: Parcel) : this() {
|
||||
taskId = `in`.readString()
|
||||
m = `in`.readByte().toInt() != 0
|
||||
t = `in`.readByte().toInt() != 0
|
||||
w = `in`.readByte().toInt() != 0
|
||||
th = `in`.readByte().toInt() != 0
|
||||
f = `in`.readByte().toInt() != 0
|
||||
s = `in`.readByte().toInt() != 0
|
||||
su = `in`.readByte().toInt() != 0
|
||||
}
|
||||
|
||||
override fun describeContents(): Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
companion object CREATOR : Parcelable.Creator<Days> {
|
||||
override fun createFromParcel(parcel: Parcel): Days {
|
||||
return Days(parcel)
|
||||
}
|
||||
|
||||
override fun newArray(size: Int): Array<Days?> {
|
||||
return arrayOfNulls(size)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,9 @@ import java.util.Date
|
|||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class RemindersItem : RealmObject, Parcelable {
|
||||
@PrimaryKey
|
||||
var id: String? = null
|
||||
|
|
|
|||
|
|
@ -6,8 +6,10 @@ import com.habitrpg.android.habitica.models.BaseObject
|
|||
import io.realm.RealmList
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
import java.util.*
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class TaskGroupPlan : RealmObject(), BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ import com.habitrpg.android.habitica.models.BaseObject
|
|||
import com.habitrpg.android.habitica.models.Tag
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class TaskTag : RealmObject(), BaseObject {
|
||||
var tag: Tag? = null
|
||||
set(value) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ import com.habitrpg.android.habitica.models.auth.LocalAuthentication
|
|||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Authentication : RealmObject(), BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ import com.google.gson.annotations.SerializedName
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
import java.util.*
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class AuthenticationTimestamps : RealmObject(), BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ package com.habitrpg.android.habitica.models.user
|
|||
|
||||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Backer : RealmObject(), BaseObject {
|
||||
var id: String? = null
|
||||
var npc: String? = null
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ import com.google.gson.annotations.SerializedName
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Buffs : RealmObject(), BaseObject {
|
||||
@PrimaryKey
|
||||
var userId: String? = null
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ import com.habitrpg.android.habitica.models.user.ContributorInfo
|
|||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class ContributorInfo : RealmObject(), BaseObject {
|
||||
companion object {
|
||||
val CONTRIBUTOR_COLOR_DICT: SparseIntArray = SparseIntArray()
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ package com.habitrpg.android.habitica.models.user
|
|||
|
||||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class EmailNotificationsPreference : RealmObject(), BaseObject {
|
||||
var unsubscribeFromAll: Boolean = false
|
||||
var invitedParty: Boolean = false
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ import com.habitrpg.android.habitica.models.TutorialStep
|
|||
import io.realm.RealmList
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Flags : RealmObject(), BaseObject {
|
||||
@PrimaryKey
|
||||
var userId: String? = null
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ import com.habitrpg.android.habitica.models.inventory.Equipment
|
|||
import io.realm.RealmList
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Gear : RealmObject(), BaseObject {
|
||||
@PrimaryKey
|
||||
var userId: String? = null
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ package com.habitrpg.android.habitica.models.user
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Hair : RealmObject, BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ import com.habitrpg.android.habitica.models.BaseObject
|
|||
import io.realm.RealmList
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Inbox : RealmObject(), BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ import com.habitrpg.android.habitica.models.BaseObject
|
|||
import io.realm.RealmList
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
import java.util.*
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Items : RealmObject, BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ import com.habitrpg.android.habitica.models.BaseObject
|
|||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Outfit : RealmObject(), BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ package com.habitrpg.android.habitica.models.user
|
|||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class OwnedCustomization : RealmObject(), OwnedObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ import com.habitrpg.android.habitica.models.BaseMainObject
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class OwnedItem : RealmObject(), BaseMainObject, OwnedObject {
|
||||
|
||||
override val realmClass: Class<OwnedItem>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ package com.habitrpg.android.habitica.models.user
|
|||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class OwnedMount : RealmObject(), OwnedObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@ package com.habitrpg.android.habitica.models.user
|
|||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class OwnedPet : RealmObject(), OwnedObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@ import com.habitrpg.android.habitica.models.BaseObject
|
|||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
import java.util.*
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Preferences : RealmObject(), AvatarPreferences, BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ package com.habitrpg.android.habitica.models.user
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Profile : RealmObject, BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ import com.habitrpg.android.habitica.models.BaseObject
|
|||
import io.realm.RealmList
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Purchases : RealmObject(), BaseObject {
|
||||
@PrimaryKey
|
||||
var userId: String? = null
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ package com.habitrpg.android.habitica.models.user
|
|||
|
||||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class PushNotificationsPreference : RealmObject(), BaseObject {
|
||||
var unsubscribeFromAll: Boolean = false
|
||||
var invitedParty: Boolean = false
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ import com.habitrpg.android.habitica.models.BaseObject
|
|||
import io.realm.RealmList
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class SpecialItems : RealmObject(), BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -6,8 +6,10 @@ import com.habitrpg.android.habitica.R
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Stats : RealmObject(), BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ import com.google.gson.annotations.SerializedName
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
import java.util.*
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class SubscriptionPlan : RealmObject(), BaseObject {
|
||||
@PrimaryKey
|
||||
var customerId: String? = null
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ package com.habitrpg.android.habitica.models.user
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class SubscriptionPlanConsecutive : RealmObject(), BaseObject {
|
||||
@PrimaryKey
|
||||
var customerId: String? = null
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ package com.habitrpg.android.habitica.models.user
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class SuppressedModals : RealmObject(), BaseObject {
|
||||
@PrimaryKey
|
||||
var userId: String? = null
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ import com.google.gson.annotations.SerializedName
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class Training : RealmObject(), BaseObject {
|
||||
@PrimaryKey
|
||||
var userId: String? = null
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ package com.habitrpg.android.habitica.models.user
|
|||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
open class UserAchievement() : RealmObject(), BaseObject {
|
||||
@RealmClass(embedded = true)
|
||||
open class UserAchievement : RealmObject(), BaseObject {
|
||||
|
||||
@PrimaryKey
|
||||
var combinedKey: String? = null
|
||||
|
|
|
|||
Loading…
Reference in a new issue