Skip to content

Commit 226944f

Browse files
authored
Merge pull request #67 from EntryDSM/feature/66-ad-application-field
Feature/66 add application field
2 parents b2e6a82 + 585f9b2 commit 226944f

6 files changed

Lines changed: 27 additions & 4 deletions

File tree

casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/application/domain/entity/ApplicationJpaEntity.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,19 @@ class ApplicationJpaEntity(
6969
val parentRelation: String?,
7070
@Column(name = "postal_code", length = 10)
7171
val postalCode: String?,
72+
@Column(name = "street_address")
73+
val streetAddress: String?,
7274
@Column(name = "detail_address", length = 500)
7375
val detailAddress: String?,
7476
// ===== 자기소개 및 학업계획 =====
7577
@Column(name = "study_plan", columnDefinition = "TEXT")
7678
val studyPlan: String?,
7779
@Column(name = "self_introduce", columnDefinition = "TEXT")
7880
val selfIntroduce: String?,
81+
@Column(name = "national_merit_child")
82+
val nationalMeritChild: Boolean?,
83+
@Column(name = "special_admission_target")
84+
val specialAdmissionTarget: Boolean?,
7985
@Column(name = "school_code", length = 20)
8086
val schoolCode: String?,
8187
// ===== 성적 데이터 (JSON) =====
@@ -127,9 +133,12 @@ class ApplicationJpaEntity(
127133
parentTel = null,
128134
parentRelation = null,
129135
postalCode = null,
136+
streetAddress = null,
130137
detailAddress = null,
131138
studyPlan = null,
132139
selfIntroduce = null,
140+
nationalMeritChild = null,
141+
specialAdmissionTarget = null,
133142
schoolCode = null,
134143
scoresData = "{}",
135144
totalScore = null,

casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/application/domain/mapper/ApplicationMapper.kt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,12 @@ class ApplicationMapper(
9393
parentTel = model.parentTel,
9494
parentRelation = model.parentRelation,
9595
postalCode = model.postalCode,
96+
streetAddress = model.streetAddress,
9697
detailAddress = model.detailAddress,
9798
studyPlan = model.studyPlan,
9899
selfIntroduce = model.selfIntroduce,
100+
nationalMeritChild = model.nationalMeritChild,
101+
specialAdmissionTarget = model.specialAdmissionTarget,
99102
schoolCode = model.schoolCode,
100103
scoresData = scoresDataJson,
101104
totalScore = model.totalScore,
@@ -133,7 +136,7 @@ class ApplicationMapper(
133136
birthDate = entity.birthDate,
134137
applicationType = entity.applicationType,
135138
educationalStatus = entity.educationalStatus,
136-
streetAddress = null,
139+
streetAddress = entity.streetAddress,
137140
submittedAt = entity.submittedAt,
138141
reviewedAt = entity.reviewedAt,
139142
createdAt = entity.createdAt,
@@ -146,10 +149,10 @@ class ApplicationMapper(
146149
studyPlan = entity.studyPlan,
147150
selfIntroduce = entity.selfIntroduce,
148151
schoolCode = entity.schoolCode,
149-
nationalMeritChild = null,
150-
specialAdmissionTarget = null,
152+
nationalMeritChild = entity.nationalMeritChild,
153+
specialAdmissionTarget = entity.specialAdmissionTarget,
151154
graduationDate = null,
152-
applicantGender = null,
155+
applicantGender = entity.applicantGender,
153156
guardianGender = null,
154157
schoolName = null,
155158
studentId = null,

casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/application/presentation/ApplicationSubmissionController.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ class ApplicationSubmissionController(
9191
request.postalCode?.let { applicationData["postalCode"] = it }
9292
request.schoolCode?.let { applicationData["schoolCode"] = it }
9393
request.applicantGender?.let { applicationData["applicantGender"] = it }
94+
request.nationalMeritChild?.let { applicationData["nationalMeritChild"] = it }
95+
request.specialAdmissionTarget?.let { applicationData["specialAdmissionTarget"] = it }
9496

9597
// 성적 정보 - 3학년 1학기
9698
request.korean_3_1?.let { scoresData["korean_3_1"] = it }

casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/application/presentation/dto/response/ApplicationDetailResponse.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ data class ApplicationDetailResponse(
3030
// 점수 정보
3131
val scores: ScoreInfo?,
3232
val applicantGender: Gender?,
33+
val streetAddress: String?,
34+
val nationalMeritChild: Boolean?,
35+
val specialAdmissionTarget: Boolean?,
3336
)
3437

3538
data class ScoreInfo(

casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/application/usecase/ApplicationPersistenceService.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,12 @@ class ApplicationPersistenceService(
111111
parentTel = extractStringValue(applicationData, "parentTel"),
112112
parentRelation = extractStringValue(applicationData, "parentRelation"),
113113
postalCode = extractStringValue(applicationData, "postalCode"),
114+
streetAddress = extractStringValue(applicationData, "streetAddress"),
114115
detailAddress = extractStringValue(applicationData, "detailAddress"),
115116
studyPlan = extractStringValue(applicationData, "studyPlan"),
116117
selfIntroduce = extractStringValue(applicationData, "selfIntroduce"),
118+
nationalMeritChild = extractBooleanValue(applicationData, "nationalMeritChild") ?: false,
119+
specialAdmissionTarget = extractBooleanValue(applicationData, "specialAdmissionTarget") ?: false,
117120
schoolCode = extractStringValue(applicationData, "schoolCode"),
118121
scoresData = scoresJson,
119122
totalScore = scoreResult.totalScore?.toBigDecimal(),

casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/application/usecase/ApplicationQueryUseCase.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ class ApplicationQueryUseCase(
7777
studyPlan = application.studyPlan,
7878
selfIntroduce = application.selfIntroduce,
7979
isDaejeon = application.isDaejeon,
80+
streetAddress = application.streetAddress,
81+
nationalMeritChild = application.nationalMeritChild,
82+
specialAdmissionTarget = application.specialAdmissionTarget,
8083
scores =
8184
ApplicationDetailResponse.ScoreInfo(
8285
totalScore = application.totalScore?.toDouble(),

0 commit comments

Comments
 (0)