Files
lumaplayer/app/src/main/java/com/example/myapplication/data/ServerEntity.java
T

65 lines
1.5 KiB
Java

package com.example.myapplication.data;
import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;
@Entity(tableName = "servers")
public class ServerEntity {
@PrimaryKey
@NonNull
public String id;
public String name;
public String host;
public String basePath;
public String port;
public String username;
public String password;
public String note;
public String accessToken;
public String userId;
public String iconUrl;
@Ignore
public ServerEntity(
String id,
String name,
String host,
String basePath,
String port,
String username,
String password,
String note,
String accessToken,
String userId
) {
this(id, name, host, basePath, port, username, password, note, accessToken, userId, "");
}
public ServerEntity(
String id,
String name,
String host,
String basePath,
String port,
String username,
String password,
String note,
String accessToken,
String userId,
String iconUrl
) {
this.id = id;
this.name = name;
this.host = host;
this.basePath = basePath;
this.port = port;
this.username = username;
this.password = password;
this.note = note;
this.accessToken = accessToken;
this.userId = userId;
this.iconUrl = iconUrl == null ? "" : iconUrl;
}
}