package com.sheep.gamegroup.model.entity;

import com.sheep.gamegroup.util.CommonUtil;

import java.util.Locale;

/**
 * Created by ljy on 2018/3/21.
 */

public class WithdrawalEty implements ILog{
    private float amount;// 0,
    private String create_time;// 0,
    private String desc;// "string",
    private int id;// 0,
    private String order_no;// "string",
    private int pay_status;// 0,pay_status 0未付款 1付款中 2已付款 3付款失败
    private int risk_status;// 0,
    private int status;// 0,----0未审核 1系统审核通过 2系统审核不通过等待人工审核 3人工审核不通过 4人工审核通过 (1,4;显示pay_status状态)
    private String surplus_amount;// 0,
    private String total_amount;// 0,
    private String type;// 0,
    private int update_time;// 0,
    private String user_id;// 0,
    private String wx_resp_content;// "string"
    private UserEntity user;
    private boolean isSelect;

    public boolean isSelect() {
        return isSelect;
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }

    public float getAmount() {
        return amount;
    }

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

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public int getId() {
        return id;
    }

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

    public String getOrder_no() {
        return order_no;
    }

    public void setOrder_no(String order_no) {
        this.order_no = order_no;
    }

    public int getPay_status() {
        return pay_status;
    }

    public void setPay_status(int pay_status) {
        this.pay_status = pay_status;
    }

    public int getRisk_status() {
        return risk_status;
    }

    public void setRisk_status(int risk_status) {
        this.risk_status = risk_status;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getSurplus_amount() {
        return surplus_amount;
    }

    public void setSurplus_amount(String surplus_amount) {
        this.surplus_amount = surplus_amount;
    }

    public String getTotal_amount() {
        return total_amount;
    }

    public void setTotal_amount(String total_amount) {
        this.total_amount = total_amount;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(int update_time) {
        this.update_time = update_time;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public String getWx_resp_content() {
        return wx_resp_content;
    }

    public void setWx_resp_content(String wx_resp_content) {
        this.wx_resp_content = wx_resp_content;
    }

    public UserEntity getUser() {
        return user;
    }

    public void setUser(UserEntity user) {
        this.user = user;
    }


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

    @Override
    public String getStateText() {
        return CommonUtil.getInstance().returnAuditResult(this);
    }

    @Override
    public String getEventText() {
        return String.format(Locale.CHINA,"提现金额%.2f元", amount);
    }

    @Override
    public boolean isEventSuccess() {
        return pay_status == 2;
    }

    @Override
    public long getEventTime() {
        return update_time;
    }

    @Override
    public void isSelect(boolean b) {
        setSelect(b);
    }

    @Override
    public boolean getSelect() {
        return isSelect();
    }
}
