package com.ifish.entity;

import java.io.Serializable;

public class DeviceUserId implements Serializable {
	
	private static final long serialVersionUID = 1L;

	private Integer	userId;
	private Integer	deviceId;
	
	public DeviceUserId() {}
	
	public DeviceUserId(Integer userId, Integer deviceId) {
		this.userId = userId;
		this.deviceId = deviceId;
	}
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public Integer getDeviceId() {
		return deviceId;
	}
	public void setDeviceId(Integer deviceId) {
		this.deviceId = deviceId;
	}
	
	@Override
    public boolean equals(Object obj) {
        if(obj instanceof DeviceUserId){
        	DeviceUserId pk=(DeviceUserId)obj;
            if(this.userId.equals(pk.userId)&&this.deviceId.equals(pk.deviceId)){
                return true;
            }
        }
        return false;
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }
	
}
