package com.sheep.gamegroup.model.entity;

import com.kfzs.duanduan.utils.NumberFormatUtils;
import com.sheep.gamegroup.util.string.SpannableSb;
import com.sheep.jiuyan.samllsheep.R;

import java.util.Locale;

/**
 * Created by realicing on 2018/11/23.
 * realicing@sina.com
 * 用户足迹
 * <p>
 * bonus:	number ($double)
 * 任务奖金
 * created_at:	integer ($int64)
 * 创建时间
 * id:	integer ($int64)
 * 主键自增ID
 * name:	string
 * 展示标题名字
 * pic:	string
 * 展示图片地址
 * relation_id:	integer ($int64)
 * 关联表ID,根据不同type关联不同表
 * stop_time:	integer ($int64)
 * 页面停留时间
 * type:	integer ($int32)
 * 足迹类型 1:游戏,应用 2:任务 3:咨询
 * update_at:	integer ($int64)
 * 更新时间
 * user_id:	integer ($int64)
 * 用户ID
 */
public class UserFootprint {
    private float bonus;

    private int created_at;

    private int id;

    private String name;

    private String pic;

    private int relation_id;

    private int stop_time;

    private int type;

    private int update_at;

    private int user_id;

    public void setBonus(float bonus){
        this.bonus = bonus;
    }
    public float getBonus(){
        return this.bonus;
    }
    public void setCreated_at(int created_at){
        this.created_at = created_at;
    }
    public int getCreated_at(){
        return this.created_at;
    }
    public void setId(int id){
        this.id = id;
    }
    public int getId(){
        return this.id;
    }
    public void setName(String name){
        this.name = name;
    }
    public String getName(){
        return this.name;
    }
    public void setPic(String pic){
        this.pic = pic;
    }
    public String getPic(){
        return this.pic;
    }
    public void setRelation_id(int relation_id){
        this.relation_id = relation_id;
    }
    public int getRelation_id(){
        return this.relation_id;
    }
    public void setStop_time(int stop_time){
        this.stop_time = stop_time;
    }
    public int getStop_time(){
        return this.stop_time;
    }
    public void setType(int type){
        this.type = type;
    }
    public int getType(){
        return this.type;
    }
    public void setUpdate_at(int update_at){
        this.update_at = update_at;
    }
    public int getUpdate_at(){
        return this.update_at;
    }
    public void setUser_id(int user_id){
        this.user_id = user_id;
    }
    public int getUser_id(){
        return this.user_id;
    }

    public CharSequence getInfo() {
        return new SpannableSb().append(name, R.dimen.text_size_15, "#333333").checkAndBr()
                .append(String.format(Locale.CHINA, "+%s元", NumberFormatUtils.retainMost2(bonus)), R.dimen.text_size_15, "#FD2D54")
                .getSsb();
    }
}
