-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRole.java
More file actions
54 lines (42 loc) · 901 Bytes
/
Copy pathRole.java
File metadata and controls
54 lines (42 loc) · 901 Bytes
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
package com.codeemma.model;
import javax.persistence.*;
/**
* Created by emmanuel on 10/27/17.
*/
@Entity
@Table(name = "roles")
public class Role {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
@Column
private User user;
@Column
@Enumerated
private RoleType roleType;
public Role() {
}
public Role(User user, RoleType roleType) {
this.user = user;
this.roleType = roleType;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public RoleType getRoleType() {
return roleType;
}
public void setRoleType(RoleType roleType) {
this.roleType = roleType;
}
}