| 1 | package edu.ucsb.cs156.happiercows.models; | |
| 2 | ||
| 3 | import edu.ucsb.cs156.happiercows.entities.Student; | |
| 4 | import lombok.*; | |
| 5 | ||
| 6 | @Data | |
| 7 | @AllArgsConstructor | |
| 8 | @NoArgsConstructor(access = AccessLevel.PROTECTED) | |
| 9 | @Builder | |
| 10 | public class StudentDTO { | |
| 11 | private String lastName; | |
| 12 | private String firstMiddleName; | |
| 13 | private String email; | |
| 14 | private String perm; | |
| 15 | private Long courseId; | |
| 16 | ||
| 17 | public Student toStudent() { | |
| 18 |
1
1. toStudent : replaced return value with null for edu/ucsb/cs156/happiercows/models/StudentDTO::toStudent → KILLED |
return Student.builder() |
| 19 | .lastName(lastName) | |
| 20 | .firstMiddleName(firstMiddleName) | |
| 21 | .email(email) | |
| 22 | .perm(perm) | |
| 23 | .courseId(courseId) | |
| 24 | .build(); | |
| 25 | } | |
| 26 | } | |
Mutations | ||
| 18 |
1.1 |