Generate question bank domain model from JDL

This commit is contained in:
jieun committed 2026-10-20 18:46:29 +09:00
1 parent 1d97cc4e31
commit 1d74d8f04b
160 files changed
+26900 -2

No files matched your search

+62
View File
@@ -0,0 +1,62 @@
enum OptionKey {
A,
B,
C,
D
}
enum AttemptStatus {
IN_PROGRESS,
SUBMITTED
}
entity Subject {
name String required minlength(2) maxlength(100),
description String maxlength(1000),
active Boolean required
}
entity Question {
prompt String required minlength(5) maxlength(2000),
explanation String maxlength(2000),
active Boolean required
}
entity Choice {
optionKey OptionKey required,
content String required maxlength(500),
displayOrder Integer required min(1) max(4),
correct Boolean required
}
entity ExamAttempt {
startedAt Instant required,
submittedAt Instant,
status AttemptStatus required,
score Integer min(0)
}
entity ExamAnswer {
questionTextSnapshot String required maxlength(2000),
explanationSnapshot String maxlength(2000),
selectedOption OptionKey,
selectedContentSnapshot String maxlength(500),
correct Boolean,
awardedPoints Integer min(0)
}
relationship OneToMany {
Question{choice} to Choice{question required}
ExamAttempt{answer} to ExamAnswer{attempt required}
}
relationship ManyToOne {
Question{subject(name) required} to Subject
ExamAttempt{subject(name) required} to Subject
ExamAttempt{user(login) required} to User with builtInEntity
ExamAnswer{question required} to Question
}
dto Subject, Question, Choice, ExamAttempt, ExamAnswer with mapstruct
service Subject, Question, Choice, ExamAttempt, ExamAnswer with serviceClass
paginate Subject, Question, ExamAttempt with pagination