Added person id in GroupMemberDto.
This commit is contained in:
parent
95394dcdeb
commit
9fb3f26341
@ -7,19 +7,23 @@ import java.io.Serializable;
|
|||||||
@Data
|
@Data
|
||||||
public class GroupMemberDto implements Serializable {
|
public class GroupMemberDto implements Serializable {
|
||||||
|
|
||||||
public GroupMemberDto(Long id, Long studentId, Long groupId) {
|
public GroupMemberDto(Long id, Long studentId, Long groupId, Long personId) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.studentId = studentId;
|
this.studentId = studentId;
|
||||||
this.groupId = groupId;
|
this.groupId = groupId;
|
||||||
|
this.personId = personId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GroupMemberDto() {
|
public GroupMemberDto() {
|
||||||
this.id = null;
|
this.id = null;
|
||||||
this.studentId = null;
|
this.studentId = null;
|
||||||
this.groupId = null;
|
this.groupId = null;
|
||||||
|
this.personId = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Long id;
|
private final Long id;
|
||||||
private final Long studentId;
|
private final Long studentId;
|
||||||
private final Long groupId;
|
private final Long groupId;
|
||||||
|
|
||||||
|
private final Long personId;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ public class GroupMember {
|
|||||||
return new GroupMemberDto(
|
return new GroupMemberDto(
|
||||||
getId(),
|
getId(),
|
||||||
getStudent().getId(),
|
getStudent().getId(),
|
||||||
getGroup().getId()
|
getGroup().getId(),
|
||||||
);
|
getStudent().getPerson().getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,8 +85,8 @@ public class StudentsGroup {
|
|||||||
GroupMemberDto groupMemberDto = new GroupMemberDto(
|
GroupMemberDto groupMemberDto = new GroupMemberDto(
|
||||||
groupMember.getId(),
|
groupMember.getId(),
|
||||||
groupMember.getStudent().getId(),
|
groupMember.getStudent().getId(),
|
||||||
getId()
|
getId(),
|
||||||
);
|
groupMember.getStudent().getPerson().getId());
|
||||||
studentsGroupDto.getGroupMembers().add(groupMemberDto);
|
studentsGroupDto.getGroupMembers().add(groupMemberDto);
|
||||||
});
|
});
|
||||||
return studentsGroupDto;
|
return studentsGroupDto;
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
export class GroupMember {
|
export class GroupMember {
|
||||||
id: number;
|
id: number | null;
|
||||||
studentId: number;
|
studentId: number;
|
||||||
groupId: number;
|
groupId: number | null;
|
||||||
|
personId: number;
|
||||||
|
|
||||||
constructor(id: number, studentId: number, groupId: number) {
|
constructor(id: number | null, studentId: number, groupId: number | null, personId: number) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.studentId = studentId;
|
this.studentId = studentId;
|
||||||
this.groupId = groupId;
|
this.groupId = groupId;
|
||||||
|
this.personId = personId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user