|
|
@@ -22,10 +22,14 @@ public class Team extends BaseEntity<Long> { |
|
|
|
|
|
|
|
@NotNull |
|
|
|
@OneToOne |
|
|
|
@JsonBackReference("staff-team") |
|
|
|
@JsonBackReference |
|
|
|
@JoinColumn(name = "teamLead", unique = true) |
|
|
|
private Staff staff; |
|
|
|
|
|
|
|
// @NotNull |
|
|
|
@OneToOne(mappedBy = "team", cascade = CascadeType.ALL, orphanRemoval = true) |
|
|
|
private Staff teamLead; |
|
|
|
|
|
|
|
public String getDescription() { |
|
|
|
return description; |
|
|
|
} |
|
|
@@ -53,4 +57,6 @@ public class Team extends BaseEntity<Long> { |
|
|
|
public Staff getStaff() { return staff;} |
|
|
|
|
|
|
|
public void setStaff(Staff staff) { this.staff = staff; } |
|
|
|
|
|
|
|
public Staff getTeamLead() { return teamLead;} |
|
|
|
} |