All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ueboot.shiro.entity.UserRole Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
package com.ueboot.shiro.entity;

import com.ueboot.core.entity.AbstractVersionEntity;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.*;


/**
 * 用户所属角色
 * @author Neel
 */
@Setter
@Getter
@NoArgsConstructor
@Entity
@Table(name = "SYS_USER_ROLE")
public class UserRole extends AbstractVersionEntity {

    @Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ManyToOne(fetch= FetchType.LAZY)
    @JoinColumn(name="USER_ID")
    private User user;

    @ManyToOne(fetch= FetchType.LAZY)
    @JoinColumn(name="ROLE_ID")
    private Role role;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy