package com.sheep.gamegroup.model.entity;

import android.text.TextUtils;

import java.io.Serializable;

/**
 * Created by ljy on 2018/7/11.
 */

public class PayEntity implements Serializable {

    private String account;//游戏账号
    private String pwd;//密码
    private String game_id;//;游戏
    private String service;//区服
    private String role_name;//角色
    private String role_id;//角色ID
    private String goods;//购买物品
    private String task_type;//

    private double amount;//充值金额
    private int pay_type;//支付方式：1支付宝 2微信 3绵羊币

    private boolean use_voucher;

    private String game_name;

    private int tencent_platform;//腾讯充值标识平台： 1是QQ 2是微信

    public int getTencent_platform() {
        return tencent_platform;
    }

    public void setTencent_platform(int tencent_platform) {
        this.tencent_platform = tencent_platform;
    }

    public String getGame_name() {
        return TextUtils.isEmpty(game_name)?"游戏":game_name;
    }

    public void setGame_name(String game_name) {
        this.game_name = game_name;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getGame_id() {
        return game_id;
    }

    public void setGame_id(String game_id) {
        this.game_id = game_id;
    }

    public String getService() {
        return service;
    }

    public void setService(String service) {
        this.service = service;
    }

    public String getRole_name() {
        return role_name;
    }

    public void setRole_name(String role_name) {
        this.role_name = role_name;
    }

    public String getRole_id() {
        return role_id;
    }

    public void setRole_id(String role_id) {
        this.role_id = role_id;
    }

    public String getGoods() {
        return goods;
    }

    public void setGoods(String goods) {
        this.goods = goods;
    }

    public String getTask_type() {
        return TextUtils.isEmpty(task_type)?"1002":task_type;
    }

    public void setTask_type(String task_type) {
        this.task_type = task_type;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public int getPay_type() {
        return pay_type;
    }

    public void setPay_type(int pay_type) {
        this.pay_type = pay_type;
    }

    public boolean isUse_voucher() {
        return use_voucher;
    }

    public void setUse_voucher(boolean use_voucher) {
        this.use_voucher = use_voucher;
    }

    public String getTaskType(){
        return TextUtils.isEmpty(task_type) ? "0":task_type;
    }

    /**
     * 游戏详情，title显示
     */
    public String getDetailShow(){
        switch (getTask_type()){
            case "1002":
            default:
                return (TextUtils.isEmpty(game_id) || game_id.equals("0"))?"平台游戏充值" :getGame_name()+"游戏";
            case "1003":
            return (TextUtils.isEmpty(game_id) || game_id.equals("0"))?"腾讯游戏充值" :getGame_name()+"游戏";
            case "1004":
            return (TextUtils.isEmpty(game_id) || game_id.equals("0"))?"小米游戏充值" :getGame_name()+"游戏";
        }
    }
}
