Skip to content

Commit

Permalink
Fixed Domain Model
Browse files Browse the repository at this point in the history
  • Loading branch information
uo287545 committed Apr 8, 2024
1 parent 7128d21 commit 0510505
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions docs/src/08_concepts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class Question {
class Category {
- id: Long
- name: String
- description: String
- questions: Set<Question>
+ toString(): String
+ toJson(): JsonNode
Expand All @@ -58,8 +59,16 @@ class GameSession {
- createdAt: LocalDateTime
- finishTime: LocalDateTime
- score: int
- answeredQuestions: Set<Question>
- questionsToAnswer: List<Question>
- currentQuestion: Question
+ addQuestion(correct: boolean): void
+ addAnsweredQuestion(question: Question): void
+ isAnswered(question: Question): boolean
+ getNextQuestion(): Question
+ toJson(): JsonNode
+ hasQuestionId(idQuestion: Long): boolean
+ getDuration(): String
}
class Role {
Expand Down Expand Up @@ -90,12 +99,15 @@ class RestApiAccessLog {
- details: String
}
Role "*" - "*" Player
Answer "*" - "1" Question
ApiKey "1" - "1" Player
ApiKey "1" - "*" RestApiAccessLog
Category "1" - "*" Question
Player "1" - "*" GameSession
Role "*" -- "*" Player
Answer "4 " --* "1" Question : Options
Answer "1 " -- " 1" Question : Correct Answer
ApiKey "1" --* "1" Player
ApiKey "1" *-- "*" RestApiAccessLog
Category "1" -- "*" Question
Player "1" *-- "*" GameSession
GameSession "1" -- "*" Question : Answered Questions
GameSession "1" -- "*" Question : Questions To Answer
@enduml
----
Expand Down

0 comments on commit 0510505

Please sign in to comment.