package com.xkrs.model.entity;

import javax.persistence.*;
import java.io.Serializable;

/**
 * RelUserRole 表实体类
 * @author tajochen
 */
@Entity
@Table(name="rel_user_role")
public class RelUserRoleEntity implements Serializable {

    /**
     * 指定主键，建立自增序列，主键值取自序列
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    //@SequenceGenerator(name = "rel_user_role_seq_gen", sequenceName = "rel_user_role_id_seq")
    private Integer id;

    @Column(nullable = false)
    private Long userId;

    @Column(nullable = false)
    private Integer roleId;

    public Integer getId() {
        return id;
    }

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

    public Long getUserId() {
        return userId;
    }

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

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    @Override
    public String toString() {
        return "RelUserRoleEntity{" +
                "id=" + id +
                ", userId=" + userId +
                ", roleId=" + roleId +
                '}';
    }
}
