package com.wasu.cs.mvp.model; import org.json.JSONObject; import java.io.Serializable; /** * @Description: 基本的资产数据类(目前只在首页使用,如需要拓展请自行添加) * @Author: Danxingxi * @CreateDate: 2017/1/12 16:19 */ public class AssetsDataModel extends IBaseDataModel implements Serializable { private static final long serialVersionUID = 1L; private int aliRecommend; //阿里大数据推荐 private String csJsonUrl; private String csLayout; private int id; //资产ID private String jsonUrl; //资产URL private String layout; //csLayout和layout在没有说明的情况下优先使用layout字段 private int linkType; //资产的连接去向类型,WCMS使用字段 private String picUrl; //资产Image URL private String recommendUrl; //推荐URL,可以使用此字段跳转到搜索页 private String summary; //内容简介 private String title; //资产Name private int traceid; //不为空标识来自阿里大数据推荐 private String points; //豆瓣评分 private int catId; // 栏目id public AssetsDataModel(){ } @Override public boolean parseJson(JSONObject json) { if(super.parseJson(json)){ this.aliRecommend = json.optInt("aliRecommend"); this.csJsonUrl = json.optString("csJsonUrl"); this.csLayout = json.optString("csLayout"); this.id = json.optInt("id"); this.jsonUrl = json.optString("jsonUrl"); this.layout = json.optString("layout"); this.linkType = json.optInt("linkType"); this.picUrl = json.optString("picUrl"); this.recommendUrl = json.optString("recommendUrl"); this.summary = json.optString("summary"); this.title = json.optString("title"); this.traceid = json.optInt("traceid"); this.points = json.optString("points"); this.catId = json.optInt("catId"); return true; } return false; } public int getAliRecommend() { return aliRecommend; } public void setAliRecommend(int aliRecommend) { this.aliRecommend = aliRecommend; } public String getCsJsonUrl() { return csJsonUrl; } public void setCsJsonUrl(String csJsonUrl) { this.csJsonUrl = csJsonUrl; } public String getCsLayout() { return csLayout; } public void setCsLayout(String csLayout) { this.csLayout = csLayout; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getJsonUrl() { return jsonUrl; } public void setJsonUrl(String jsonUrl) { this.jsonUrl = jsonUrl; } public String getLayout() { return layout; } public void setLayout(String layout) { this.layout = layout; } public int getLinkType() { return linkType; } public void setLinkType(int linkType) { this.linkType = linkType; } public String getPicUrl() { return picUrl; } public void setPicUrl(String picUrl) { this.picUrl = picUrl; } public String getRecommendUrl() { return recommendUrl; } public void setRecommendUrl(String recommendUrl) { this.recommendUrl = recommendUrl; } public String getSummary() { return summary; } public void setSummary(String summary) { this.summary = summary; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public int getTraceid() { return traceid; } public void setTraceid(int traceid) { this.traceid = traceid; } public String getPoints() { return points; } public void setPoints(String points) { this.points = points; } public int getCatId() { return catId; } public void setCatId(int catId) { this.catId = catId; } }