add servers to the new database

This commit is contained in:
dkanada 2021-04-09 23:38:32 +09:00
commit eb5b4787ed
7 changed files with 82 additions and 31 deletions

View 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;
}
}