package com.wasu.cs.model;

import org.json.JSONObject;

@SuppressWarnings("serial")
public class AssetDetailModel extends Model {
	
	private String actor;
	private String area;
	private String assetType;
	private String bgPicUrl;
	private String catEngName;
	
	private int catId;
	private String catName;
	private String description;
	private String director;
	private int id;
	
	private int isDolby;
	private int isFree;
	private int itemNum;
	private String language;
	private int module;
	
	private int nowItem;
	private String pgId;
	private String picUrl;
	private String ppv;
	private String summary;
	
	private String title;
	private int total;
	private String year;

	@Override
	public boolean from(JSONObject json) {
		boolean result = super.from(json);

		if (result) {
			
			actor = json.optString("actor", "");
			area = json.optString("area", "");
			assetType = json.optString("assetType", "");
			bgPicUrl = json.optString("bgPicUrl", "");
			catEngName = json.optString("catEngName", "");
			
			catId = json.optInt("catId", 0);
			catName = json.optString("catName", "");
			description = json.optString("description", "");
			director = json.optString("director", "");
			id = json.optInt("id", 0);
			
			isDolby = json.optInt("isDolby", 0);
			isFree = json.optInt("isFree", 0);
			itemNum = json.optInt("itemNum", 0);
			language = json.optString("language", "");
			module = json.optInt("module", 0);
			
			nowItem = json.optInt("nowItem", 0);
			pgId = json.optString("pgId", "");
			picUrl = json.optString("picUrl", "");
			ppv = json.optString("ppv", "");
			summary = json.optString("summary", "");
			
			title = json.optString("title", "");
			total = json.optInt("total", 0);
			year = json.optString("year", "");
		}

		return result;
	}

	public String getActor() {
		return actor;
	}

	public String getArea() {
		return area;
	}

	public String getAssetType() {
		return assetType;
	}

	public String getBgPicUrl() {
		return bgPicUrl;
	}

	public String getCatEngName() {
		return catEngName;
	}

	public int getCatId() {
		return catId;
	}

	public String getCatName() {
		return catName;
	}

	public String getDescription() {
		return description;
	}

	public String getDirector() {
		return director;
	}

	public int getId() {
		return id;
	}

	public int getIsDolby() {
		return isDolby;
	}

	public int getIsFree() {
		return isFree;
	}

	public int getItemNum() {
		return itemNum;
	}

	public String getLanguage() {
		return language;
	}

	public int getModule() {
		return module;
	}

	public int getNowItem() {
		return nowItem;
	}

	public String getPgId() {
		return pgId;
	}

	public String getPicUrl() {
		return picUrl;
	}

	public String getPpv() {
		return ppv;
	}

	public String getSummary() {
		return summary;
	}

	public String getTitle() {
		return title;
	}

	public int getTotal() {
		return total;
	}

	public String getYear() {
		return year;
	}
}
