package com.wasu.cs.model;

import org.json.JSONObject;

@SuppressWarnings("serial")
public class FilmSpecialModel extends Model {
	
	private int id;
	private int catId;
	private String title;
	private String summary;
	private String picUrl;

	private String layout;
	private String jsonUrl;
	private String datetime;
	private String cmark;
	private String points;
	
	@Override
	public boolean from(JSONObject json) {
		boolean result = super.from(json);

		if (result) {
			id = json.optInt("id", 0);
			catId = json.optInt("catId", 0);
			title = json.optString("title", "");
			summary = json.optString("summary", "");
			picUrl = json.optString("picUrl", "");
			
			layout = json.optString("layout", "");
			jsonUrl = json.optString("jsonUrl", "");
			datetime = json.optString("datetime", "");
			cmark = json.optString("cmark", "");
			points = json.optString("points", "");
		}

		return result;
	}

	public int getId() {
		return id;
	}

	public int getCatId() {
		return catId;
	}

	public String getTitle() {
		return title;
	}

	public String getSummary() {
		return summary;
	}

	public String getPicUrl() {
		return picUrl;
	}

	public String getLayout() {
		return layout;
	}

	public String getJsonUrl() {
		return jsonUrl;
	}

	public String getDatetime() {
		return datetime;
	}

	public String getCmark() {
		return cmark;
	}

	public String getPoints() {
		return points;
	}

}
