package com.sheep.gamegroup.model.entity;

import android.text.TextUtils;

import com.kfzs.duanduan.utils.NumberFormatUtils;
import com.sheep.gamegroup.util.ListUtil;
import com.sheep.gamegroup.util.StringUtils;

import java.util.ArrayList;

/**
 * Created by realicing on 2018/11/26.
 * realicing@sina.com
 * 小绵羊3.4.5新增--足迹--某一天的足迹数量
 */
public class FootprintCountRespons {
    private String date;
    private int count;

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }


    //获取对应的天数
    public int getDay() {
        if(!TextUtils.isEmpty(date)) {
            ArrayList<String> arrayList = StringUtils.getAllSatisfyStr(date, "\\d+");
            String item = ListUtil.getLast(arrayList);
            return NumberFormatUtils.parseInteger(item);
        }
        return 1;
    }
}
