add servers to the new database
This commit is contained in:
parent
a45ae46d31
commit
eb5b4787ed
7 changed files with 82 additions and 31 deletions
34
app/src/main/java/com/dkanada/gramophone/model/Server.java
Normal file
34
app/src/main/java/com/dkanada/gramophone/model/Server.java
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
package com.dkanada.gramophone.model;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity(tableName = "servers")
|
||||
public class Server {
|
||||
@NonNull
|
||||
@PrimaryKey
|
||||
public String id;
|
||||
|
||||
public String name;
|
||||
public String url;
|
||||
|
||||
public String user;
|
||||
public String token;
|
||||
|
||||
public Server() {
|
||||
this.id = UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
public Server(String name, String url, String user, String token) {
|
||||
this.id = UUID.randomUUID().toString();
|
||||
|
||||
this.name = name;
|
||||
this.url = url;
|
||||
|
||||
this.user = user;
|
||||
this.token = token;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue