You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
975 B
47 lines
975 B
package com.community.pocket.ui.login;
|
|
|
|
import androidx.annotation.StringRes;
|
|
|
|
import com.community.pocket.R;
|
|
import com.community.pocket.data.model.Token;
|
|
import com.community.pocket.ui.main.ui.share.ToastResponse;
|
|
import com.community.pocket.util.CustomMessage;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/**
|
|
* 登陆响应结果
|
|
*/
|
|
public class LoginResponse extends ToastResponse<LoginResponse.Msg> {
|
|
private Token token;
|
|
|
|
public Token getToken() {
|
|
return token;
|
|
}
|
|
|
|
public void setToken(Token token) {
|
|
this.token = token;
|
|
}
|
|
|
|
|
|
enum Msg implements CustomMessage {
|
|
ok(R.string.login_ok),
|
|
fail(R.string.login_fail);
|
|
|
|
private Integer msg;
|
|
|
|
Msg(@StringRes Integer msg) {
|
|
this.msg = msg;
|
|
}
|
|
|
|
@NotNull
|
|
@Override
|
|
public Integer getMsg() {
|
|
return msg;
|
|
}
|
|
|
|
public void setMsg(Integer msg) {
|
|
this.msg = msg;
|
|
}
|
|
}
|
|
}
|
|
|