/**
 * File Name    : AuthGroupAuthority
 * Creator      : 20160701688
 * Created Date : 2017/04/10
 * Comment      :
 */
package com.neo.usermgr.common.model;

import org.apache.commons.lang3.builder.ToStringBuilder;

import java.io.Serializable;
import java.util.Date;

/**
 * 权限组-用户关联表
 */
public class AuthGroupUser implements Serializable{

    /**
     * 主键ID
     */
    private int id;

    /**
     * 权限组ID
     */
    private int groupId;

    /**
     * 用户ID
     */
    private String userId;

    /**
     * 创建日期
     */
    private Date dateCreate;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        this.groupId = groupId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Date getDateCreate() {
        return dateCreate;
    }

    public void setDateCreate(Date dateCreate) {
        this.dateCreate = dateCreate;
    }

    @Override
    public int hashCode() {
        return id;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null || !(obj instanceof AuthGroupUser)) {
            return false;
        }
        return id == ((AuthGroupUser) obj).id;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", id)
                .append("groupId", groupId)
                .append("userId", userId)
                .append("dateCreate", dateCreate)
                .toString();
    }
}
