Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.example.solidconnection.university.domain.LanguageRequirement;
import com.example.solidconnection.university.domain.LanguageTestType;
import com.example.solidconnection.university.domain.SemesterAvailableForDispatch;
import com.example.solidconnection.university.domain.TuitionFeeType;
import com.example.solidconnection.university.domain.UnivApplyInfo;
import com.example.solidconnection.university.repository.HostUniversityRepository;
import com.example.solidconnection.university.repository.UnivApplyInfoRepository;
Expand Down Expand Up @@ -55,17 +54,12 @@ public String save(
homeUniversity,
data.universityKoreanName,
data.studentCapacity,
data.tuitionFeeType,
data.semesterAvailableForDispatch,
data.semesterRequirement,
data.detailsForLanguage,
data.gpaRequirement,
data.gpaRequirementCriteria,
data.detailsForApply,
data.detailsForMajor,
data.detailsForAccommodation,
data.detailsForEnglishCourse,
data.details,
data.extraInfo.isEmpty() ? null : data.extraInfo,
new HashSet<>(),
hostUniversity
Expand Down Expand Up @@ -124,14 +118,6 @@ private void applyStructuredField(ImportData data, String header, String fieldNa
throw new CustomException(INVALID_INPUT, "선발 인원은 정수여야 합니다: '" + value + "'");
}
}
case "tuitionFeeType" -> {
try {
data.tuitionFeeType = TuitionFeeType.valueOf(value);
} catch (IllegalArgumentException e) {
throw new CustomException(INVALID_INPUT,
"유효하지 않은 등록금 유형입니다. 가능한 값: " + validEnumValues(TuitionFeeType.values()));
}
}
case "semesterAvailableForDispatch" -> {
try {
data.semesterAvailableForDispatch = SemesterAvailableForDispatch.valueOf(value);
Expand All @@ -144,11 +130,7 @@ private void applyStructuredField(ImportData data, String header, String fieldNa
case "detailsForLanguage" -> applyWithLength(value, 2000, s -> data.detailsForLanguage = s);
case "gpaRequirement" -> applyWithLength(value, 100, s -> data.gpaRequirement = s);
case "gpaRequirementCriteria" -> applyWithLength(value, 100, s -> data.gpaRequirementCriteria = s);
case "detailsForApply" -> applyWithLength(value, 3000, s -> data.detailsForApply = s);
case "detailsForMajor" -> applyWithLength(value, 3000, s -> data.detailsForMajor = s);
case "detailsForAccommodation" -> applyWithLength(value, 2000, s -> data.detailsForAccommodation = s);
case "detailsForEnglishCourse" -> applyWithLength(value, 1000, s -> data.detailsForEnglishCourse = s);
case "details" -> applyWithLength(value, 3000, s -> data.details = s);
default -> data.extraInfo.put(header, value);
}
}
Expand Down Expand Up @@ -209,17 +191,12 @@ private static class ImportData {
String accommodationUrl;
String detailsForLocal;
Integer studentCapacity;
TuitionFeeType tuitionFeeType;
SemesterAvailableForDispatch semesterAvailableForDispatch;
String semesterRequirement;
String detailsForLanguage;
String gpaRequirement;
String gpaRequirementCriteria;
String detailsForApply;
String detailsForMajor;
String detailsForAccommodation;
String detailsForEnglishCourse;
String details;
Map<String, String> extraInfo = new HashMap<>();
Map<LanguageTestType, String> languageRequirements = new HashMap<>();
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ public class UnivApplyInfo extends BaseEntity {
@Column(name = "student_capacity")
private Integer studentCapacity;

@Column(name = "tuition_fee_type")
@Enumerated(EnumType.STRING)
private TuitionFeeType tuitionFeeType;

@Column(name = "semester_available_for_dispatch")
@Enumerated(EnumType.STRING)
private SemesterAvailableForDispatch semesterAvailableForDispatch;
Expand All @@ -71,21 +67,9 @@ public class UnivApplyInfo extends BaseEntity {
@Column(name = "gpa_requirement_criteria", length = 100)
private String gpaRequirementCriteria;

@Column(name = "details_for_apply", length = 3000)
private String detailsForApply;

@Column(name = "details_for_major", length = 3000)
private String detailsForMajor;

@Column(name = "details_for_accommodation", length = 2000)
private String detailsForAccommodation;

@Column(name = "details_for_english_course", length = 1000)
private String detailsForEnglishCourse;

@Column(name = "details", length = 3000)
private String details;

@JdbcTypeCode(SqlTypes.JSON)
@Column(name = "extra_info", columnDefinition = "JSON")
private Map<String, String> extraInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,12 @@ public enum UnivApplyInfoColumn {
UNIVERSITY_ACCOMMODATION_URL("universityAccommodationUrl"),
UNIVERSITY_DETAILS_FOR_LOCAL("universityDetailsForLocal"),
STUDENT_CAPACITY("studentCapacity"),
TUITION_FEE_TYPE("tuitionFeeType"),
SEMESTER_AVAILABLE_FOR_DISPATCH("semesterAvailableForDispatch"),
SEMESTER_REQUIREMENT("semesterRequirement"),
DETAILS_FOR_LANGUAGE("detailsForLanguage"),
GPA_REQUIREMENT("gpaRequirement"),
GPA_REQUIREMENT_CRITERIA("gpaRequirementCriteria"),
DETAILS_FOR_APPLY("detailsForApply"),
DETAILS_FOR_MAJOR("detailsForMajor"),
DETAILS_FOR_ACCOMMODATION("detailsForAccommodation"),
DETAILS_FOR_ENGLISH_COURSE("detailsForEnglishCourse"),
DETAILS("details"),
;

private final String fieldName;
Expand Down
Loading
Loading