ok
This commit is contained in:
parent
15c53ef456
commit
f4f8b32fc7
BIN
data.mv.db
BIN
data.mv.db
Binary file not shown.
@ -22,7 +22,7 @@ import com.example.demo.users.service.UserService;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(Constants.API_URL + "/group")
|
||||
@RequestMapping(Constants.API_URL + "/user/{user}/group")
|
||||
public class GroupController {
|
||||
private final GroupService groupService;
|
||||
private final UserService userService;
|
||||
|
@ -19,9 +19,10 @@ import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "groups")
|
||||
|
||||
public class GroupEntity extends BaseEntity {
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "typeId", nullable = false)
|
||||
@JoinColumn(name = "userId", nullable = false)
|
||||
private UserEntity user;
|
||||
@Column(nullable = false, length = 30)
|
||||
private String name;
|
||||
|
@ -21,7 +21,7 @@ import com.example.demo.groups.service.GroupService;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(Constants.API_URL + "/member")
|
||||
@RequestMapping(Constants.API_URL + "/user/{user}/group/{group}/member")
|
||||
public class MemberController {
|
||||
private final MemberService memberService;
|
||||
private final GroupService groupService;
|
||||
|
@ -16,7 +16,7 @@ import jakarta.persistence.Table;
|
||||
@Table(name = "members")
|
||||
public class MemberEntity extends BaseEntity {
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "typeId", nullable = false)
|
||||
@JoinColumn(name = "groupdId", nullable = false)
|
||||
private GroupEntity group;
|
||||
@Column(nullable = false, length = 50)
|
||||
private String name;
|
||||
|
Loading…
Reference in New Issue
Block a user