package com.ifish.entity;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import java.io.Serializable;

/**
 * @author: yan.y
 * @Description: tbl_tmp_push_remind 联合主键ID
 * @Date: Created in 16:45 2018/1/28
 * @Modified by:
 */
@Embeddable
public class PushRemindId implements Serializable {

	private static final long serialVersionUID = 1L;

	@Column(name = "user_id")
	private Integer	userId;

	@Column(name = "device_id")
	private Integer	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 PushRemindId){
        	PushRemindId pk=(PushRemindId)obj;
            if(this.userId.equals(pk.userId)&&this.deviceId.equals(pk.deviceId)){
                return true;
            }
        }
        return false;
    }

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