| | |
| | | @Id |
| | | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| | | private Long id; |
| | | private String departmentId; |
| | | |
| | | @ManyToOne(targetEntity = User.class, fetch = FetchType.LAZY) |
| | | @JoinColumn(name="user_id") |
| | | private User user; |
| | | |
| | | public UserDepartment(){} |
| | | private Long departmentId; |
| | | private Long userId; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getDepartmentId() { |
| | | public Long getDepartmentId() { |
| | | return departmentId; |
| | | } |
| | | |
| | | public void setDepartmentId(String departmentId) { |
| | | public void setDepartmentId(Long departmentId) { |
| | | this.departmentId = departmentId; |
| | | } |
| | | |
| | | public User getUser() { |
| | | return user; |
| | | public Long getUserId() { |
| | | return userId; |
| | | } |
| | | |
| | | public void setUser(User user) { |
| | | this.user = user; |
| | | public void setUserId(Long userId) { |
| | | this.userId = userId; |
| | | } |
| | | } |