refactor(ProfileBean.java): 使用 Kotlin 重写
This commit is contained in:
parent
bf3dc72ecf
commit
4328a3d20e
|
@ -1,136 +1,66 @@
|
||||||
package com.huanchengfly.tieba.api.models;
|
package com.huanchengfly.tieba.api.models
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName
|
||||||
import com.huanchengfly.tieba.post.models.BaseBean;
|
import com.huanchengfly.tieba.post.models.BaseBean
|
||||||
|
|
||||||
public class ProfileBean extends BaseBean {
|
class ProfileBean : BaseBean() {
|
||||||
@SerializedName("error_code")
|
@SerializedName("error_code")
|
||||||
private String errorCode;
|
val errorCode: String? = null
|
||||||
|
|
||||||
@SerializedName("error_msg")
|
@SerializedName("error_msg")
|
||||||
private String errorMsg;
|
val errorMsg: String? = null
|
||||||
private AntiBean anti;
|
val anti: AntiBean? = null
|
||||||
private UserBean user;
|
val user: UserBean? = null
|
||||||
|
|
||||||
public String getErrorCode() {
|
class AntiBean {
|
||||||
return errorCode;
|
val tbs: String? = null
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getErrorMsg() {
|
class UserBean {
|
||||||
return errorMsg;
|
val id: String? = null
|
||||||
}
|
val name: String? = null
|
||||||
|
|
||||||
public AntiBean getAnti() {
|
|
||||||
return anti;
|
|
||||||
}
|
|
||||||
|
|
||||||
public UserBean getUser() {
|
|
||||||
return user;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class AntiBean {
|
|
||||||
private String tbs;
|
|
||||||
|
|
||||||
public String getTbs() {
|
|
||||||
return tbs;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class UserBean {
|
|
||||||
private String id;
|
|
||||||
private String name;
|
|
||||||
@SerializedName("name_show")
|
@SerializedName("name_show")
|
||||||
private String nameShow;
|
val nameShow: String? = null
|
||||||
private String portrait;
|
val portrait: String? = null
|
||||||
private String intro;
|
val intro: String? = null
|
||||||
private String sex;
|
val sex: String? = null
|
||||||
|
|
||||||
@SerializedName("post_num")
|
@SerializedName("post_num")
|
||||||
private String postNum;
|
val postNum: String? = null
|
||||||
|
|
||||||
@SerializedName("repost_num")
|
@SerializedName("repost_num")
|
||||||
private String repostNum;
|
val repostNum: String? = null
|
||||||
|
|
||||||
@SerializedName("thread_num")
|
@SerializedName("thread_num")
|
||||||
private String threadNum;
|
val threadNum: String? = null
|
||||||
|
|
||||||
@SerializedName("tb_age")
|
@SerializedName("tb_age")
|
||||||
private String tbAge;
|
val tbAge: String? = null
|
||||||
|
|
||||||
@SerializedName("my_like_num")
|
@SerializedName("my_like_num")
|
||||||
private String myLikeNum;
|
val myLikeNum: String? = null
|
||||||
|
|
||||||
@SerializedName("like_forum_num")
|
@SerializedName("like_forum_num")
|
||||||
private String likeForumNum;
|
val likeForumNum: String? = null
|
||||||
|
|
||||||
@SerializedName("concern_num")
|
@SerializedName("concern_num")
|
||||||
private String concernNum;
|
val concernNum: String? = null
|
||||||
|
|
||||||
@SerializedName("fans_num")
|
@SerializedName("fans_num")
|
||||||
private String fansNum;
|
val fansNum: String? = null
|
||||||
|
|
||||||
@SerializedName("has_concerned")
|
@SerializedName("has_concerned")
|
||||||
private String hasConcerned;
|
var hasConcerned: String? = null
|
||||||
|
private set
|
||||||
|
|
||||||
@SerializedName("is_fans")
|
@SerializedName("is_fans")
|
||||||
private String isFans;
|
val isFans: String? = null
|
||||||
|
|
||||||
public String getIntro() {
|
fun setHasConcerned(hasConcerned: String?): UserBean {
|
||||||
return intro;
|
this.hasConcerned = hasConcerned
|
||||||
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSex() {
|
|
||||||
return sex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPostNum() {
|
|
||||||
return postNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRepostNum() {
|
|
||||||
return repostNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getThreadNum() {
|
|
||||||
return threadNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTbAge() {
|
|
||||||
return tbAge;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMyLikeNum() {
|
|
||||||
return myLikeNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLikeForumNum() {
|
|
||||||
return likeForumNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getConcernNum() {
|
|
||||||
return concernNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFansNum() {
|
|
||||||
return fansNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getHasConcerned() {
|
|
||||||
return hasConcerned;
|
|
||||||
}
|
|
||||||
|
|
||||||
public UserBean setHasConcerned(String hasConcerned) {
|
|
||||||
this.hasConcerned = hasConcerned;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIsFans() {
|
|
||||||
return isFans;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNameShow() {
|
|
||||||
return nameShow;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPortrait() {
|
|
||||||
return portrait;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue