package com.sheep.gamegroup.model.entity;

import java.io.Serializable;

/**
 * Created by realicing on 2018/6/7.
 * realicing@sina.com
 * {
 "name": "游戏新游戏",
 "package_name": "游戏新游戏",
 "icon": "http://staticcdn.kuaifazs.com/upload/game/201806/11/3c/d6/O800O0.png",
 "balance": 100,
 "game_id": 123,
 "min_amount": 2,
 "ratio": 3,
 "download_url": "12323",
 "task_id": 415
 }
 */
public class OrienteeringDetail implements Serializable{

    private String name;

    private String package_name;

    private String icon;

    private float balance;//可定向消费金额

    private String game_id;

    private int min_amount;//最低消费金额

    private int ratio;//赠送比率
    private int id;

    private String download_url;

    private int task_id;
    private int release_task_id;

    private int is_reservation;//是否预约任务 0不是 1是
    private boolean can_download;//是否可以下载
    private int appointment_time;//预约时间

    public int getRelease_task_id() {
        return release_task_id;
    }

    public void setRelease_task_id(int release_task_id) {
        this.release_task_id = release_task_id;
    }

    public void setName(String name){
        this.name = name;
    }
    public String getName(){
        return this.name;
    }
    public void setPackage_name(String package_name){
        this.package_name = package_name;
    }
    public String getPackage_name(){
        return this.package_name;
    }
    public void setIcon(String icon){
        this.icon = icon;
    }
    public String getIcon(){
        return this.icon;
    }
    public void setBalance(float balance){
        this.balance = balance;
    }
    public float getBalance(){
        return this.balance;
    }
    public void setGame_id(String game_id){
        this.game_id = game_id;
    }
    public String getGame_id(){
        return this.game_id;
    }
    public void setMin_amount(int min_amount){
        this.min_amount = min_amount;
    }
    public int getMin_amount(){
        return this.min_amount;
    }
    public void setRatio(int ratio){
        this.ratio = ratio;
    }
    public int getRatio(){
        return this.ratio;
    }
    public void setDownload_url(String download_url){
        this.download_url = download_url;
    }
    public String getDownload_url(){
        return this.download_url;
    }
    public void setTask_id(int task_id){
        this.task_id = task_id;
    }
    public int getTask_id(){
        return this.task_id;
    }

    public int getId() {
        return id;
    }

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

    public int getIs_reservation() {
        return is_reservation;
    }

    public void setIs_reservation(int is_reservation) {
        this.is_reservation = is_reservation;
    }

    public boolean isCan_download() {
        return can_download;
    }

    public void setCan_download(boolean can_download) {
        this.can_download = can_download;
    }

    public int getAppointment_time() {
        return appointment_time;
    }

    public void setAppointment_time(int appointment_time) {
        this.appointment_time = appointment_time;
    }












    @Override
    public boolean equals(Object obj) {
        return obj instanceof OrienteeringDetail && ((OrienteeringDetail) obj).id == id;
    }











    /**
     * 是否是游戏任务中的预约任务
     * @return
     */
    public boolean isGameReservation() {
        return is_reservation == 1;//是否预约任务 0不是 1是
    }
    /**
     * 是否游戏任务中的预约任务还不可以下载
     * @return
     */
    public boolean isGameReservationCantDownload() {
        return isGameReservation() && !can_download;
    }
}
