Skip to content

Commit 1bc9b1d

Browse files
committed
Convert Image entity class to Kotlin
1 parent f7c5754 commit 1bc9b1d

File tree

1 file changed

+7
-28
lines changed
  • app/src/main/java/ai/elimu/content_provider/room/entity

1 file changed

+7
-28
lines changed
Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,14 @@
1-
package ai.elimu.content_provider.room.entity;
1+
package ai.elimu.content_provider.room.entity
22

3-
import androidx.annotation.NonNull;
4-
import androidx.room.Entity;
5-
6-
import ai.elimu.model.v2.enums.content.ImageFormat;
3+
import ai.elimu.model.v2.enums.content.ImageFormat
4+
import androidx.room.Entity
75

86
/**
9-
* For documentation, see <a href="https://github.com/elimu-ai/webapp/tree/main/src/main/java/ai/elimu/model">model</a>
7+
* For documentation, see [model](https://github.com/elimu-ai/webapp/tree/main/src/main/java/ai/elimu/model)
108
*/
119
@Entity
12-
public class Image extends Content {
13-
14-
@NonNull
15-
private String title;
16-
17-
@NonNull
18-
private ImageFormat imageFormat;
19-
20-
public String getTitle() {
21-
return title;
22-
}
23-
24-
public void setTitle(String title) {
25-
this.title = title;
26-
}
27-
28-
public ImageFormat getImageFormat() {
29-
return imageFormat;
30-
}
10+
class Image : Content() {
11+
lateinit var title: String
3112

32-
public void setImageFormat(ImageFormat imageFormat) {
33-
this.imageFormat = imageFormat;
34-
}
13+
lateinit var imageFormat: ImageFormat
3514
}

0 commit comments

Comments
 (0)