Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@enginebai
Created April 1, 2019 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enginebai/6daf5188333ceba3875503af7b44a6fa to your computer and use it in GitHub Desktop.
Save enginebai/6daf5188333ceba3875503af7b44a6fa to your computer and use it in GitHub Desktop.
data class Location(
val name: String,
val lat: Double,
val lng: Double
)
enum class PostType {
TEXT,
PHOTO,
VIDEO,
LINK
}
@Entity(tableName = "new_post")
data class NewPost(
@PrimaryKey val id: String = UUID.randomUUID().toString(),
@ColumnInfo val caption: String? = null,
@ColumnInfo(name = "media_file") val mediaFile: File? = null,
@ColumnInfo val type: PostType? = null,
val location: Location? = null
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment