Preparation to music streaming

This commit is contained in:
Antonio Cappiello 2020-12-08 11:12:44 +01:00
parent f837bb14e2
commit a28ad27288
23 changed files with 615 additions and 279 deletions

View file

@ -3,35 +3,21 @@ package com.cappielloantonio.play.model;
import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;
@Entity(tableName = "queue")
public class Queue {
@NonNull
@PrimaryKey(autoGenerate = true)
@PrimaryKey
@ColumnInfo(name = "id")
private int id;
@ColumnInfo(name = "song_id")
private String songID;
public Queue(@NonNull int id, String songID) {
this.id = id;
@ColumnInfo(name = "last_played")
private long lastPlayed;
public Queue(String songID, long lastPlayed) {
this.songID = songID;
}
@Ignore
public Queue(String songID) {
this.songID = songID;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
this.lastPlayed = lastPlayed;
}
public String getSongID() {
@ -41,4 +27,12 @@ public class Queue {
public void setSongID(String songID) {
this.songID = songID;
}
public long getLastPlayed() {
return lastPlayed;
}
public void setLastPlayed(long lastPlayed) {
this.lastPlayed = lastPlayed;
}
}