package com.xkrs.model.entity;

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

/**
 * RelRoleAuthority 表实体类
 * @author tajochen
 */
@Entity
@Table(name="rel_role_authority")
public class RelRoleAuthorityEntity implements Serializable {

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

    @Column(nullable = false)
    private Integer roleId;

    @Column(nullable = false)
    private Integer authorityId;

    private Integer userId;

    public Integer getId() {
        return id;
    }

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

    public Integer getRoleId() {
        return roleId;
    }

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

    public Integer getAuthorityId() {
        return authorityId;
    }

    public void setAuthorityId(Integer authorityId) {
        this.authorityId = authorityId;
    }

    public Integer getUserId() {
        return userId;
    }

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

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