package com.kfzs.duanduan.bean;

import com.kfzs.duanduan.proto.GameOuterClass;

/**
 * @ Created by Dlg
 * @ <p>TiTle:  Game</p>
 * @ <p>Description:游戏基类</p>
 * @ date:  2017/12/13 13:39
 * @ QQ:    315096953
 */

public class Game {

    private int id = 0;
    private String gameName = "";
    private String iconImage = "";
    private long startTime = 0L;
    private String version = "";
    private String size = "";
    private String detailBackImage = "";
    private String detailImage = "";
    private String introduce = "";
    private int isShelves = 0;
    private int downloadNumTrue = 0;
    private int downloadNum = 0;
    private String downloadUrl = "";
    private int searchNumTrue = 0;
    private int searchNum = 0;
    private int star = 0;
    private String typeText = "";
    private String packageName = "";
    private String versionCode = "";
    private long shelvesTime = 0L;
    private int isInBook = 0;
    private String onlyTag = "";
    private int bookId = 0;
    private String bookName = "";
    private String url = "";
    private boolean booked = false;
    private boolean isCanPreDown = false;
    private int existGift = 0;
    private String discount;

    public String getDiscount() {
        return discount == null ? "" : discount;
    }

    public void setDiscount(String discount) {
        this.discount = discount;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getGameName() {
        return gameName;
    }

    public void setGameName(String gameName) {
        this.gameName = gameName;
    }

    public String getIconImage() {
        return iconImage;
    }

    public void setIconImage(String iconImage) {
        this.iconImage = iconImage;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public String getDetailBackImage() {
        return detailBackImage;
    }

    public void setDetailBackImage(String detailBackImage) {
        this.detailBackImage = detailBackImage;
    }

    public String getDetailImage() {
        return detailImage;
    }

    public void setDetailImage(String detailImage) {
        this.detailImage = detailImage;
    }

    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }

    public int getIsShelves() {
        return isShelves;
    }

    public void setIsShelves(int isShelves) {
        this.isShelves = isShelves;
    }

    public int getDownloadNumTrue() {
        return downloadNumTrue;
    }

    public void setDownloadNumTrue(int downloadNumTrue) {
        this.downloadNumTrue = downloadNumTrue;
    }

    public int getDownloadNum() {
        return downloadNum;
    }

    public void setDownloadNum(int downloadNum) {
        this.downloadNum = downloadNum;
    }

    public String getDownloadUrl() {
        return downloadUrl;
    }

    public void setDownloadUrl(String downloadUrl) {
        this.downloadUrl = downloadUrl;
    }

    public int getSearchNumTrue() {
        return searchNumTrue;
    }

    public void setSearchNumTrue(int searchNumTrue) {
        this.searchNumTrue = searchNumTrue;
    }

    public int getSearchNum() {
        return searchNum;
    }

    public void setSearchNum(int searchNum) {
        this.searchNum = searchNum;
    }

    public int getStar() {
        return star;
    }

    public void setStar(int star) {
        this.star = star;
    }

    public String getTypeText() {
        return typeText;
    }

    public void setTypeText(String typeText) {
        this.typeText = typeText;
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public String getVersionCode() {
        return versionCode;
    }

    public void setVersionCode(String versionCode) {
        this.versionCode = versionCode;
    }

    public long getShelvesTime() {
        return shelvesTime;
    }

    public void setShelvesTime(long shelvesTime) {
        this.shelvesTime = shelvesTime;
    }

    public int getIsInBook() {
        return isInBook;
    }

    public void setIsInBook(int isInBook) {
        this.isInBook = isInBook;
    }

    public String getOnlyTag() {
        return onlyTag;
    }

    public void setOnlyTag(String onlyTag) {
        this.onlyTag = onlyTag;
    }

    public int getBookId() {
        return bookId;
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getUrl() {
        return url;
    }

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

    public boolean isBooked() {
        return booked;
    }

    public void setBooked(boolean booked) {
        this.booked = booked;
    }

    public boolean isCanPreDown() {
        return isCanPreDown;
    }

    public void setCanPreDown(boolean canPreDown) {
        isCanPreDown = canPreDown;
    }

    public int getExistGift() {
        return existGift;
    }

    public void setExistGift(int existGift) {
        this.existGift = existGift;
    }


    public GameOuterClass.Game getGameV1() {
        return GameOuterClass.Game.newBuilder()
                .setBooked(booked)
                .setBookId(bookId)
                .setBookName(bookName)
                .setDetailBackImage(detailBackImage)
                .setDetailImage(detailImage)
                .setDownloadNum(downloadNum)
                .setDownloadNumTrue(downloadNumTrue)
                .setDownloadUrl(downloadUrl)
                .setExistGift(existGift)
                .setGameName(gameName)
                .setIconImage(iconImage)
                .setId(id)
                .setIntroduce(introduce)
                .setIsCanPreDown(isCanPreDown)
                .setIsInBook(isInBook)
                .setPackageName(packageName)
                .setIsShelves(isShelves)
                .setOnlyTag(onlyTag)
                .setSearchNum(searchNum)
                .setSize(size)
                .setStar(star)
                .setStartTime(startTime)
                .setSearchNum(searchNum)
                .setShelvesTime(shelvesTime)
                .setTypeText(typeText)
                .setUrl(url)
                .setVersion(version)
                .setVersionCode(versionCode)
                .setSearchNumTrue(searchNumTrue)
                .build();
    }

}
