refactor(ThreadStoreBean.java): 使用 Kotlin 重写

This commit is contained in:
GoFly233 2020-08-13 20:28:58 +08:00 committed by HuanChengFly
parent e22a9b3022
commit 8dc1e6091a
2 changed files with 49 additions and 142 deletions

View File

@ -1,173 +1,80 @@
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
import java.util.List; class ThreadStoreBean : BaseBean() {
public class ThreadStoreBean extends BaseBean {
@SerializedName("error_code") @SerializedName("error_code")
private String errorCode; val errorCode: String? = null
private ErrorInfo error; val error: ErrorInfo? = null
@SerializedName("store_thread") @SerializedName("store_thread")
private List<ThreadStoreInfo> storeThread; val storeThread: List<ThreadStoreInfo>? = null
public String getErrorCode() { inner class ThreadStoreInfo : BaseBean() {
return errorCode;
}
public ErrorInfo getError() {
return error;
}
public List<ThreadStoreInfo> getStoreThread() {
return storeThread;
}
public class ThreadStoreInfo extends BaseBean {
@SerializedName("thread_id") @SerializedName("thread_id")
private String threadId; val threadId: String? = null
private String title; val title: String? = null
@SerializedName("forum_name") @SerializedName("forum_name")
private String forumName; val forumName: String? = null
private AuthorInfo author; val author: AuthorInfo? = null
private List<MediaInfo> media; val media: List<MediaInfo>? = null
@SerializedName("is_deleted") @SerializedName("is_deleted")
private String isDeleted; val isDeleted: String? = null
@SerializedName("last_time") @SerializedName("last_time")
private String lastTime; val lastTime: String? = null
private String type; val type: String? = null
private String status; val status: String? = null
@SerializedName("max_pid") @SerializedName("max_pid")
private String maxPid; val maxPid: String? = null
@SerializedName("min_pid") @SerializedName("min_pid")
private String minPid; val minPid: String? = null
@SerializedName("mark_pid") @SerializedName("mark_pid")
private String markPid; val markPid: String? = null
@SerializedName("mark_status") @SerializedName("mark_status")
private String markStatus; val markStatus: String? = null
public String getThreadId() {
return threadId;
}
public String getTitle() {
return title;
}
public String getForumName() {
return forumName;
}
public AuthorInfo getAuthor() {
return author;
}
public List<MediaInfo> getMedia() {
return media;
}
public String getIsDeleted() {
return isDeleted;
}
public String getLastTime() {
return lastTime;
}
public String getType() {
return type;
}
public String getStatus() {
return status;
}
public String getMaxPid() {
return maxPid;
}
public String getMinPid() {
return minPid;
}
public String getMarkPid() {
return markPid;
}
public String getMarkStatus() {
return markStatus;
}
} }
public class MediaInfo extends BaseBean { inner class MediaInfo : BaseBean() {
private String type; val type: String? = null
@SerializedName("small_Pic") @SerializedName("small_Pic")
private String smallPic; val smallPic: String? = null
@SerializedName("big_pic") @SerializedName("big_pic")
private String bigPic; val bigPic: String? = null
private String width; val width: String? = null
private String height; val height: String? = null
public String getType() {
return type;
}
public String getSmallPic() {
return smallPic;
}
public String getBigPic() {
return bigPic;
}
public String getWidth() {
return width;
}
public String getHeight() {
return height;
}
} }
public class AuthorInfo extends BaseBean { inner class AuthorInfo : BaseBean() {
@SerializedName("lz_uid") @SerializedName("lz_uid")
private String lzUid; val lzUid: String? = null
private String name; val name: String? = null
@SerializedName("name_show") @SerializedName("name_show")
private String nameShow; val nameShow: String? = null
@SerializedName("user_portrait") @SerializedName("user_portrait")
private String userPortrait; val userPortrait: String? = null
public String getLzUid() {
return lzUid;
}
public String getName() {
return name;
}
public String getNameShow() {
return nameShow;
}
public String getUserPortrait() {
return userPortrait;
}
} }
public class ErrorInfo extends BaseBean { inner class ErrorInfo : BaseBean() {
@SerializedName("errno") @SerializedName("errno")
private String errorCode; val errorCode: String? = null
@SerializedName("errmsg") @SerializedName("errmsg")
private String errorMsg; val errorMsg: String? = null
public String getErrorCode() {
return errorCode;
}
public String getErrorMsg() {
return errorMsg;
}
} }
} }