Added IAccount and ResponseAccount
This commit is contained in:
parent
334935fc25
commit
2ee1d18360
@ -0,0 +1,16 @@
|
||||
package ru.dragonestia.picker.api.model.account;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public interface IAccount {
|
||||
|
||||
@NotNull String getUsername();
|
||||
|
||||
@NotNull String getPassword();
|
||||
|
||||
@NotNull Set<String> getPermissions();
|
||||
|
||||
boolean isLocked();
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package ru.dragonestia.picker.api.model.account;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class ResponseAccount implements IAccount {
|
||||
|
||||
private String username;
|
||||
private String password;
|
||||
private Set<String> permissions;
|
||||
private boolean locked;
|
||||
|
||||
public ResponseAccount() {}
|
||||
|
||||
public ResponseAccount(String username, String password, Set<String> permissions, boolean locked) {
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.permissions = permissions;
|
||||
this.locked = locked;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Set<String> getPermissions() {
|
||||
return permissions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLocked() {
|
||||
return locked;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user