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
4 changes: 3 additions & 1 deletion systems/application/application-application/deps.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
KOTLIN_DEPS = []
KOTLIN_DEPS = [
"//systems/application/application-domain:main",
]
Comment thread
wlyoon921 marked this conversation as resolved.

TEST_DEPS = [
"@maven//:junit_junit",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package hs.kr.entrydsm.application.application.exception

class ApplicantAccessDeniedException(
applicantId: Long,
) : RuntimeException("Applicant access denied: $applicantId")
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package hs.kr.entrydsm.application.application.exception

class ApplicantNotFoundException(
applicantId: Long,
) : RuntimeException("Applicant not found: $applicantId")
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package hs.kr.entrydsm.application.application.exception

class AuthenticationRequiredException : RuntimeException("authentication is required")
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package hs.kr.entrydsm.application.application.port.`in`

import hs.kr.entrydsm.application.application.port.`in`.command.CreateApplicantCommand
import hs.kr.entrydsm.application.application.port.`in`.command.SubmitApplicationCommand
import hs.kr.entrydsm.application.application.port.`in`.command.UpdateFamilyCommand
import hs.kr.entrydsm.application.application.port.`in`.command.UpdateIntroductionCommand
import hs.kr.entrydsm.application.application.port.`in`.command.UpdateMiddleSchoolCommand
import hs.kr.entrydsm.application.application.port.`in`.command.UpdatePersonalCommand
import hs.kr.entrydsm.application.application.port.`in`.command.UpdateStudyPlanCommand
import hs.kr.entrydsm.application.application.port.`in`.command.UpdateTypeCommand
import hs.kr.entrydsm.application.application.port.`in`.result.CreateApplicantResult
import hs.kr.entrydsm.application.application.port.`in`.result.LandingResult

interface ApplicationPort {
fun createApplicant(command: CreateApplicantCommand): CreateApplicantResult
fun updateType(command: UpdateTypeCommand)
fun updatePersonal(command: UpdatePersonalCommand)
fun updateFamily(command: UpdateFamilyCommand)
fun updateMiddleSchool(command: UpdateMiddleSchoolCommand)
fun updateIntroduction(command: UpdateIntroductionCommand)
fun updateStudyPlan(command: UpdateStudyPlanCommand)
fun submit(command: SubmitApplicationCommand)
fun getLanding(accountId: Long?): LandingResult
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package hs.kr.entrydsm.application.application.port.`in`

import hs.kr.entrydsm.application.application.port.`in`.command.CalculateEvaluationCommand
import hs.kr.entrydsm.application.application.port.`in`.command.SaveAcademicRecordCommand
import hs.kr.entrydsm.application.application.port.`in`.command.SaveCertificatesCommand
import hs.kr.entrydsm.application.application.port.`in`.command.SaveGedScoresCommand
import hs.kr.entrydsm.application.application.port.`in`.command.SaveSubjectGradesCommand
import hs.kr.entrydsm.application.application.port.`in`.result.AcademicRecordResult

interface EvaluationPort {
fun saveSubjectGrades(command: SaveSubjectGradesCommand)
fun saveGedScores(command: SaveGedScoresCommand)
fun saveAcademicRecord(command: SaveAcademicRecordCommand): AcademicRecordResult
fun saveCertificates(command: SaveCertificatesCommand)
fun calculateResult(command: CalculateEvaluationCommand)
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package hs.kr.entrydsm.application.application.port.`in`.command

data class CalculateEvaluationCommand(
val userId: Long? = null,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package hs.kr.entrydsm.application.application.port.`in`.command

data class CreateApplicantCommand(
val userId: Long? = null,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package hs.kr.entrydsm.application.application.port.`in`.command

data class SaveAcademicRecordCommand(
val userId: Long? = null,
val absentCount: Int,
val earlyLeaveCount: Int,
val lateCount: Int,
val classAbsenceCount: Int,
val volunteerTime: Int,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package hs.kr.entrydsm.application.application.port.`in`.command

data class SaveCertificatesCommand(
val userId: Long? = null,
val isDsmAlgorithmAwarded: Boolean,
val isProgrammingCertified: Boolean,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package hs.kr.entrydsm.application.application.port.`in`.command

import hs.kr.entrydsm.application.domain.model.GedScores

data class SaveGedScoresCommand(
val userId: Long? = null,
val gedScores: GedScores,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package hs.kr.entrydsm.application.application.port.`in`.command

import hs.kr.entrydsm.application.domain.enum.SchoolSemester
import hs.kr.entrydsm.application.domain.model.SubjectGrades

data class SaveSubjectGradesCommand(
val userId: Long? = null,
val schoolSemester: SchoolSemester,
val subjectGrades: SubjectGrades,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package hs.kr.entrydsm.application.application.port.`in`.command

data class SubmitApplicationCommand(
val userId: Long? = null,
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package hs.kr.entrydsm.application.application.port.`in`.command

import hs.kr.entrydsm.application.domain.enum.Gender
import hs.kr.entrydsm.application.domain.enum.GuardianRelation

data class UpdateFamilyCommand(
val applicantId: Long,
val userId: Long? = null,
val guardianName: String,
val guardianPhoneNumber: String,
val guardianGender: Gender,
val guardianRelation: GuardianRelation,
val zipCode: String,
val addressBase: String,
val addressDetail: String,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package hs.kr.entrydsm.application.application.port.`in`.command

data class UpdateIntroductionCommand(
val applicantId: Long,
val userId: Long? = null,
val introduction: String,
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package hs.kr.entrydsm.application.application.port.`in`.command

data class UpdateMiddleSchoolCommand(
val applicantId: Long,
val userId: Long? = null,
val schoolName: String,
val studentNumber: String,
val schoolPhone: String,
val teacherName: String,
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package hs.kr.entrydsm.application.application.port.`in`.command

import hs.kr.entrydsm.application.domain.enum.Gender
import hs.kr.entrydsm.application.domain.enum.SpecialAdmissionType
import java.time.LocalDate

data class UpdatePersonalCommand(
val applicantId: Long,
val userId: Long? = null,
val photoFileId: Long,
val name: String,
val phoneNumber: String,
val gender: Gender,
val birthdate: LocalDate,
val specialAdmissionType: SpecialAdmissionType,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package hs.kr.entrydsm.application.application.port.`in`.command

data class UpdateStudyPlanCommand(
val applicantId: Long,
val userId: Long? = null,
val studyPlan: String,
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package hs.kr.entrydsm.application.application.port.`in`.command

import hs.kr.entrydsm.application.domain.enum.AdmissionType
import hs.kr.entrydsm.application.domain.enum.GraduationType
import hs.kr.entrydsm.application.domain.enum.Region
import java.time.YearMonth

data class UpdateTypeCommand(
val applicantId: Long,
val userId: Long? = null,
val admissionType: AdmissionType,
val region: Region,
val graduationType: GraduationType,
val graduationDate: YearMonth?,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package hs.kr.entrydsm.application.application.port.`in`.result

data class AcademicRecordResult(
val absentCount: Int,
val earlyLeaveCount: Int,
val lateCount: Int,
val classAbsenceCount: Int,
val volunteerTime: Int,
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package hs.kr.entrydsm.application.application.port.`in`.result

data class CreateApplicantResult(
val applicantId: Long,
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package hs.kr.entrydsm.application.application.port.`in`.result

data class LandingResult(
val applicantName: String?,
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package hs.kr.entrydsm.application.application.port.out

import hs.kr.entrydsm.application.domain.model.Applicant

interface ApplicantRepository {
fun save(applicant: Applicant): Applicant
fun findById(id: Long): Applicant?
fun findByAccountId(accountId: Long): Applicant?
}
Loading
Loading