package com.uas.account.viewmodel;

import java.io.Serializable;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.uas.account.entity.Asset;

public class AssetView implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String url;
	private String background;
	private String imgLink;
	private String title;
	private String subTitle;
	private String color;
	private String reserveColor;
	private JSONArray btns;

	public AssetView(Asset asset) {
		this.url = asset.getUrl();
		this.background = asset.getBackground();
		this.imgLink = asset.getImgLink();
		this.title = asset.getTitle();
		this.subTitle = asset.getSubTitle();
		this.color = asset.getColor();
		this.reserveColor = asset.getReserveColor();
		if (asset.getBtns() != null)
			this.btns = JSON.parseArray(asset.getBtns());
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getBackground() {
		return background;
	}

	public void setBackground(String background) {
		this.background = background;
	}

	public String getImgLink() {
		return imgLink;
	}

	public void setImgLink(String imgLink) {
		this.imgLink = imgLink;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getSubTitle() {
		return subTitle;
	}

	public void setSubTitle(String subTitle) {
		this.subTitle = subTitle;
	}

	public JSONArray getBtns() {
		return btns;
	}

	public void setBtns(JSONArray btns) {
		this.btns = btns;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public String getReserveColor() {
		return reserveColor;
	}

	public void setReserveColor(String reserveColor) {
		this.reserveColor = reserveColor;
	}

}
