194 lines
4.4 KiB
Java
194 lines
4.4 KiB
Java
package com.yunbao.common.bean;
|
|
|
|
import com.google.gson.annotations.SerializedName;
|
|
import com.yunbao.common.utils.StringUtil;
|
|
import com.yunbao.common.utils.WordUtil;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 主播创建投票
|
|
* {
|
|
* "live_vote_id": "20",
|
|
* "question_content": "123",
|
|
* "vote_end_time": 180,
|
|
* "option_content_first_num": 0,
|
|
* "option_content_second_num": 0,
|
|
* "users_id": []
|
|
* }
|
|
*/
|
|
public class LiveRoomVoteModel extends BaseModel {
|
|
@SerializedName("vote_status")
|
|
private int status;
|
|
@SerializedName("live_vote_id")
|
|
private String voteId;
|
|
@SerializedName("question_content")
|
|
private String content;
|
|
@SerializedName("vote_end_time")
|
|
private int time;
|
|
@SerializedName("option_content_first_num")
|
|
private int answer1Num;
|
|
@SerializedName("option_content_second_num")
|
|
private int answer2Num;
|
|
@SerializedName("users_id")
|
|
private List<String> userIds;
|
|
@SerializedName("option_content_first")
|
|
private String answer1;
|
|
@SerializedName("option_content_second")
|
|
private String answer2;
|
|
@SerializedName("result_zh")
|
|
private String resultZh;
|
|
@SerializedName("result_en")
|
|
private String resultEn;
|
|
@SerializedName("option_text")
|
|
private String optionText;
|
|
@SerializedName("option_content_key")
|
|
private String vote;
|
|
|
|
private String liveUid;
|
|
|
|
public String getLiveUid() {
|
|
return liveUid;
|
|
}
|
|
|
|
public void setLiveUid(String liveUid) {
|
|
this.liveUid = liveUid;
|
|
}
|
|
|
|
public String getAnswer1() {
|
|
return answer1;
|
|
}
|
|
|
|
public void setAnswer1(String answer1) {
|
|
this.answer1 = answer1;
|
|
}
|
|
|
|
public String getAnswer2() {
|
|
return answer2;
|
|
}
|
|
|
|
public void setAnswer2(String answer2) {
|
|
this.answer2 = answer2;
|
|
}
|
|
|
|
public String getVoteId() {
|
|
return voteId;
|
|
}
|
|
|
|
public void setVoteId(String voteId) {
|
|
this.voteId = voteId;
|
|
}
|
|
|
|
public String getContent() {
|
|
return content;
|
|
}
|
|
|
|
public void setContent(String content) {
|
|
this.content = content;
|
|
}
|
|
|
|
public int getTime() {
|
|
return time;
|
|
}
|
|
|
|
public void setTime(int time) {
|
|
this.time = time;
|
|
}
|
|
|
|
public int getAnswer1Num() {
|
|
return answer1Num;
|
|
}
|
|
|
|
public void setAnswer1Num(int answer1Num) {
|
|
this.answer1Num = answer1Num;
|
|
}
|
|
|
|
public int getAnswer2Num() {
|
|
return answer2Num;
|
|
}
|
|
|
|
public void setAnswer2Num(int answer2Num) {
|
|
this.answer2Num = answer2Num;
|
|
}
|
|
|
|
public List<String> getUserIds() {
|
|
return userIds;
|
|
}
|
|
|
|
public void setUserIds(List<String> userIds) {
|
|
this.userIds = userIds;
|
|
}
|
|
|
|
public int getStatus() {
|
|
return status;
|
|
}
|
|
|
|
public void setStatus(int status) {
|
|
this.status = status;
|
|
}
|
|
|
|
public String getResult() {
|
|
return WordUtil.isNewZh() ? resultZh : resultEn;
|
|
}
|
|
|
|
public String getResultZh() {
|
|
return resultZh;
|
|
}
|
|
|
|
public void setResultZh(String resultZh) {
|
|
this.resultZh = resultZh;
|
|
}
|
|
|
|
public String getResultEn() {
|
|
return resultEn;
|
|
}
|
|
|
|
public void setResultEn(String resultEn) {
|
|
this.resultEn = resultEn;
|
|
}
|
|
|
|
public String getOptionText() {
|
|
return optionText;
|
|
}
|
|
|
|
public void setOptionText(String optionText) {
|
|
this.optionText = optionText;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "LiveRoomVoteModel{" +
|
|
"status=" + status +
|
|
", voteId='" + voteId + '\'' +
|
|
", content='" + content + '\'' +
|
|
", time=" + time +
|
|
", answer1Num=" + answer1Num +
|
|
", answer2Num=" + answer2Num +
|
|
", userIds=" + userIds +
|
|
", answer1='" + answer1 + '\'' +
|
|
", answer2='" + answer2 + '\'' +
|
|
", resultZh='" + resultZh + '\'' +
|
|
", resultEn='" + resultEn + '\'' +
|
|
", optionText='" + optionText + '\'' +
|
|
", vote='" + vote + '\'' +
|
|
", liveUid='" + liveUid + '\'' +
|
|
'}';
|
|
}
|
|
|
|
public String getVote() {
|
|
return vote;
|
|
}
|
|
|
|
public void setVote(String vote) {
|
|
this.vote = vote;
|
|
}
|
|
|
|
public boolean isVoteLeft() {
|
|
return vote.equals("option_content_first_num");
|
|
}
|
|
|
|
public boolean isVote() {
|
|
return !StringUtil.isEmpty(vote);
|
|
}
|
|
}
|