package com.zepchat.core.data;

/**
 * Created by Ziver on 2014-11-06.
 */
public class User {
    private String alias;
    private String publicKey;
    private long lastSeen;

    public User(String alias){
        this.alias = alias;
    }
    public User(String alias, String publicKey){
        this.alias = alias;
        this.publicKey = publicKey;
    }


    public boolean equals(User user){
        return publicKey == user.publicKey || publicKey != null && this.publicKey.equals(user.publicKey);
    }

    public String getPublicKey() {
        return publicKey;
    }

    public String getAlias() {
        return alias;
    }


    public void setLastSeen(long lastSeen) {
        this.lastSeen = lastSeen;
    }

    public long getLastSeen() {
        return lastSeen;
    }
}
