mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
Preparation to music streaming
This commit is contained in:
parent
f837bb14e2
commit
a28ad27288
23 changed files with 615 additions and 279 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue