-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VKT(Backend): Enrollment contact request backend
- Loading branch information
Showing
18 changed files
with
259 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 1 addition & 8 deletions
9
backend/vkt/src/main/java/fi/oph/vkt/api/dto/EnrollmentDTOCommonFields.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
backend/vkt/src/main/java/fi/oph/vkt/api/dto/EnrollmentDTOSkillFields.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package fi.oph.vkt.api.dto; | ||
|
||
public interface EnrollmentDTOSkillFields { | ||
Boolean oralSkill(); | ||
Boolean textualSkill(); | ||
Boolean understandingSkill(); | ||
Boolean speakingPartialExam(); | ||
Boolean speechComprehensionPartialExam(); | ||
Boolean writingPartialExam(); | ||
Boolean readingComprehensionPartialExam(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
backend/vkt/src/main/java/fi/oph/vkt/api/dto/clerk/ClerkEnrollmentAppointmentUpdateDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package fi.oph.vkt.api.dto.clerk; | ||
|
||
import fi.oph.vkt.api.dto.EnrollmentDTOSkillFields; | ||
import fi.oph.vkt.model.type.EnrollmentStatus; | ||
import fi.oph.vkt.util.StringUtil; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Size; | ||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
import lombok.Builder; | ||
import lombok.NonNull; | ||
|
||
@Builder | ||
public record ClerkEnrollmentAppointmentUpdateDTO( | ||
@NonNull @NotNull Long id, | ||
@NonNull @NotNull Integer version, | ||
@NonNull @NotNull LocalDateTime enrollmentTime, | ||
@NonNull @NotNull Boolean oralSkill, | ||
@NonNull @NotNull Boolean textualSkill, | ||
@NonNull @NotNull Boolean understandingSkill, | ||
@NonNull @NotNull Boolean speakingPartialExam, | ||
@NonNull @NotNull Boolean speechComprehensionPartialExam, | ||
@NonNull @NotNull Boolean writingPartialExam, | ||
@NonNull @NotNull Boolean readingComprehensionPartialExam, | ||
String previousEnrollment, | ||
@NonNull @NotBlank String email, | ||
@NonNull @NotBlank String firstName, | ||
@NonNull @NotBlank String lastName, | ||
String phoneNumber, | ||
@Size(max = 255) String street, | ||
@Size(max = 255) String postalCode, | ||
@Size(max = 255) String town, | ||
@Size(max = 255) String country, | ||
@NonNull @NotNull List<ClerkPaymentDTO> payments | ||
) | ||
implements EnrollmentDTOSkillFields { | ||
public ClerkEnrollmentAppointmentUpdateDTO { | ||
previousEnrollment = StringUtil.sanitize(previousEnrollment); | ||
email = StringUtil.sanitize(email); | ||
phoneNumber = StringUtil.sanitize(phoneNumber); | ||
street = StringUtil.sanitize(street); | ||
postalCode = StringUtil.sanitize(postalCode); | ||
town = StringUtil.sanitize(town); | ||
country = StringUtil.sanitize(country); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
backend/vkt/src/main/java/fi/oph/vkt/model/EnrollmentCommon.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package fi.oph.vkt.model; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.MappedSuperclass; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@MappedSuperclass | ||
public class EnrollmentCommon extends BaseEntity { | ||
|
||
@Column(name = "skill_oral") | ||
private boolean oralSkill; | ||
|
||
@Column(name = "skill_textual") | ||
private boolean textualSkill; | ||
|
||
@Column(name = "skill_understanding") | ||
private boolean understandingSkill; | ||
|
||
@Column(name = "partial_exam_speaking") | ||
private boolean speakingPartialExam; | ||
|
||
@Column(name = "partial_exam_speech_comprehension") | ||
private boolean speechComprehensionPartialExam; | ||
|
||
@Column(name = "partial_exam_writing") | ||
private boolean writingPartialExam; | ||
|
||
@Column(name = "partial_exam_reading_comprehension") | ||
private boolean readingComprehensionPartialExam; | ||
} |
11 changes: 11 additions & 0 deletions
11
backend/vkt/src/main/java/fi/oph/vkt/model/type/EnrollmentAppointmentStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package fi.oph.vkt.model.type; | ||
|
||
public enum EnrollmentAppointmentStatus { | ||
COMPLETED, | ||
AWAITING_PAYMENT, | ||
CANCELED, | ||
EXPECTING_PAYMENT, | ||
WAITING_AUTHENTICATION, | ||
CANCELED_PAYMENT, | ||
CONTACT_CREATED, | ||
} |
31 changes: 20 additions & 11 deletions
31
backend/vkt/src/main/java/fi/oph/vkt/service/AbstractEnrollmentService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.