package com.sheep.gamegroup.model.entity;

import android.text.TextUtils;

import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;

/**
 * Created by realicing on 2018/9/13.
 * realicing@sina.com
 */
@Table(name = "search_app_record")
public class SearchAppRecord {
    @Column(name = "input", isId = true)
    private String input;
    @Column(name = "time")
    private long time;
    @Column(name = "count")//搜索次数
    private int count;

    public String getInput() {
        return input;
    }

    public void setInput(String input) {
        this.input = input;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public int getCount() {
        return count;
    }

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

    @Override
    public String toString() {
        return input;
    }


    @Override
    public boolean equals(Object obj) {
        return obj instanceof SearchAppRecord && TextUtils.equals(((SearchAppRecord) obj).input, input);
    }

    //搜索次数增加
    public void addCount() {
        count++;
    }
}
