Android Room entities with the same fields (TMDB API)
I have several entities of the same type (same fields, names). How can I use one entity to handle all data of a given type?
For example, I have UpcomingMovieEntity and PopularMovieEntity, and these entities are the same:
@Entity(tableName = TABLE_UPCOMING_MOVIES)
data class UpcomingMovieEntity(
@PrimaryKey(autoGenerate = false)
@ColumnInfo(name = "id") val id: Int,
@ColumnInfo(name = "poster_path") val posterPath: String?,
@ColumnInfo(name = "adult") val adult: Boolean,...