* update
@@ -1,12 +0,0 @@ | ||
1 | -package com.xynotec.dictdroid.data.model; | |
2 | - | |
3 | -import androidx.room.PrimaryKey; | |
4 | - | |
5 | -import io.realm.RealmObject; | |
6 | - | |
7 | -public class Word extends RealmObject { | |
8 | - @PrimaryKey | |
9 | - private String word; | |
10 | - | |
11 | - private String mean; | |
12 | -} |
@@ -0,0 +1,31 @@ | ||
1 | +package com.xynotec.dictdroid.data.model; | |
2 | + | |
3 | +import androidx.room.PrimaryKey; | |
4 | + | |
5 | +import io.realm.RealmObject; | |
6 | +import io.realm.annotations.Required; | |
7 | + | |
8 | +public class Favorite extends RealmObject { | |
9 | + @PrimaryKey | |
10 | + @Required //not null | |
11 | + private String word; | |
12 | + | |
13 | + @Required //not null | |
14 | + private String mean; | |
15 | + | |
16 | + public String getWord() { | |
17 | + return word; | |
18 | + } | |
19 | + | |
20 | + public void setWord(String word) { | |
21 | + this.word = word; | |
22 | + } | |
23 | + | |
24 | + public String getMean() { | |
25 | + return mean; | |
26 | + } | |
27 | + | |
28 | + public void setMean(String mean) { | |
29 | + this.mean = mean; | |
30 | + } | |
31 | +} |
@@ -0,0 +1,31 @@ | ||
1 | +package com.xynotec.dictdroid.data.model; | |
2 | + | |
3 | +import androidx.room.PrimaryKey; | |
4 | + | |
5 | +import io.realm.RealmObject; | |
6 | +import io.realm.annotations.Required; | |
7 | + | |
8 | +public class History extends RealmObject { | |
9 | + @PrimaryKey | |
10 | + @Required //not null | |
11 | + private String word; | |
12 | + | |
13 | + @Required //not null | |
14 | + private String mean; | |
15 | + | |
16 | + public String getWord() { | |
17 | + return word; | |
18 | + } | |
19 | + | |
20 | + public void setWord(String word) { | |
21 | + this.word = word; | |
22 | + } | |
23 | + | |
24 | + public String getMean() { | |
25 | + return mean; | |
26 | + } | |
27 | + | |
28 | + public void setMean(String mean) { | |
29 | + this.mean = mean; | |
30 | + } | |
31 | +} |