1
hao
2025-05-20 8e24c6fea30d9b179375ee2893710cdec2443b13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package com.system.user.entity;
 
import com.app.base.entity.BaseEntity;
import com.system.role.entity.PrimaryKey;
import com.system.role.entity.RolePermissionMap;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.DynamicUpdate;
 
import javax.persistence.*;
import javax.validation.constraints.NotNull;
 
/**
 * 用户角色关系表
 */
@Entity(name = "UserRoleMap")
@Table(name = UserRoleMap.TABLE_NAME)
//@IdClass(PrimaryKeyUser.class)
@DynamicUpdate
@ApiModel
public class UserRoleMap extends BaseEntity {
    private static final long serialVersionUID = 4625660587007894370L;
    public static final String TABLE_NAME = "app_user_role";
 
    /**
     * 用户ID
     */
    @ApiModelProperty(name = "userId", value = "用户ID")
    @Column(name = "user_id")
    @NotNull
    protected Long userId;
 
    /**
     * 角色ID
     */
    @ApiModelProperty(name = "roleId", value = "角色ID")
    @Column(name = "role_id")
    @NotNull
    protected Long roleId;
 
    public Long getUserId() {
        return userId;
    }
 
    public void setUserId(Long userId) {
        this.userId = userId;
    }
 
    public Long getRoleId() {
        return roleId;
    }
 
    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }
}