mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-01 07:03:35 +00:00
Preparation to music streaming
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user