Slide 14
Slide 14 text
©2019 Wantedly, Inc.
Code @Entity
data class Playlist(
@PrimaryKey(autoGenerate = true)
val playlistId: Long,
val title: String
)
@Entity
data class Song(
@PrimaryKey(autoGenerate = true)
val songId: Long,
val title: String
)
@Entity(primaryKeys = ["playlistId", "songId"])
data class PlaylistSongRef(
val playlistId: Long,
val songId: Long
)