-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
172 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package auth | ||
|
||
interface Authenticator { | ||
|
||
fun authenticateAs(): Boolean | ||
|
||
fun authorize():Boolean | ||
} |
18 changes: 0 additions & 18 deletions
18
src/main/kotlin/commands/CourseTakingApplicationCommand.kt
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
src/main/kotlin/commands/CourseTakingApplicationCommandHandler.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"コース": [ | ||
{ | ||
"ID": "C001", | ||
"名前": "コンピュータサイエンス入門", | ||
"講師": "山田太郎", | ||
"曜日": "月曜日", | ||
"時限": "1", | ||
"学期": "前期", | ||
"説明": "このコースは、コンピュータサイエンスの基本概念を紹介します。プログラミング言語の基本から始め、アルゴリズム、データ構造、ソフトウェア開発の基礎を網羅します。", | ||
"学年": "1年", | ||
"専攻": "コンピュータサイエンス" | ||
}, | ||
{ | ||
"ID": "C002", | ||
"名前": "データベース設計", | ||
"講師": "田中花子", | ||
"曜日": "水曜日", | ||
"時限": "3", | ||
"学期": "後期", | ||
"説明": "このコースでは、データベース設計の基本を学びます。正規化、データモデリング、SQLクエリの実行などが含まれます。", | ||
"学年": "3年", | ||
"専攻": "情報システム" | ||
}, | ||
{ | ||
"ID": "C003", | ||
"名前": "ソフトウェアエンジニアリング", | ||
"講師": "鈴木次郎", | ||
"曜日": "金曜日", | ||
"時限": "5", | ||
"学期": "前期", | ||
"説明": "このコースでは、ソフトウェアエンジニアリングの原則と実践をカバーします。ソフトウェア設計、テスト、プロジェクト管理などを理解します。", | ||
"学年": "2年", | ||
"専攻": "ソフトウェアエンジニアリング" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package data.database | ||
|
||
class Database { | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package domain | ||
|
||
typealias CourseId = Identifier<Course, String> | ||
class Course( | ||
val id: CourseId, | ||
val name: String, | ||
val capacity: Int | ||
|
||
) { | ||
fun getId():CourseId {return id} | ||
fun getName():String {return name} | ||
|
||
fun getCapacity():Int{return capacity} | ||
|
||
fun updateCapacity():Nothing = TODO("Async") | ||
|
||
suspend fun getDetail(): Nothing = TODO("Async") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package domain | ||
|
||
class CourseList() { | ||
fun getCourseList(): List<Course> = TODO() | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package domain | ||
|
||
class CourseRegistrationManager { | ||
|
||
fun drawing(courseTakingApplicationList: List<CourseTakingApplication>): List<CourseTakingApplication> | ||
= TODO("抽選") | ||
|
||
fun registerMembers(courseTakingApplicationList: List<CourseTakingApplication>):Nothing = | ||
TODO("登録する") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package domain | ||
|
||
typealias CourseTakingApplicationId = Identifier<CourseTakingApplication, String> | ||
|
||
data class CourseTakingApplication( | ||
val id: CourseTakingApplicationId, | ||
val courseId: String, | ||
val Status: Status | ||
) | ||
|
||
enum class Status{ | ||
UNCONFIRMED,CONFIRMED | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package domain | ||
|
||
class CourseTakingApplicationList() { | ||
fun getCourseTakingApplicationList(userId: String): List<CourseTakingApplication> = TODO() | ||
fun createCourseTakingApplication(application: CourseTakingApplication): Nothing = TODO() | ||
fun deleteCourseTakingApplication(applicationId: String): Nothing = TODO() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package domain | ||
|
||
class CourseTakingManager { | ||
private val FirstServedState :Boolean = TODO("先着申請に空きがあるのかどうか") | ||
|
||
suspend fun applyCourseTaking(course:CourseId):Nothing = TODO("Async " + | ||
"userからidを取ってくる" + | ||
"CourseTakingApplicationを作成する(DBとの通信はListがする?)") | ||
|
||
fun cancenCourseTaking(courseTakingApplicationId: CourseTakingApplicationId):Nothing = TODO() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package domain | ||
|
||
|
||
data class Identifier<EntityT, RawT>(val raw: RawT) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
package domain | ||
|
||
data class User (val id: String) { | ||
typealias StudentId = Identifier<Student, String> | ||
|
||
} | ||
|
||
|
||
sealed class User() | ||
class Student( | ||
val id: StudentId, | ||
val name: String | ||
): User() { | ||
fun getId(): StudentId{ | ||
return id | ||
} | ||
} | ||
class Teacher():User() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
package domain | ||
|
||
import commands.CourseTakingApplicationCommand | ||
import commands.CourseTakingApplicationCommandHandler | ||
interface CourseTakingHub{ | ||
|
||
interface CourseTakingHub { | ||
fun getApplicationList(user: User): List<Application>? | ||
fun handle(command: CourseTakingApplicationCommand): CourseTakingApplicationCommand? | ||
} | ||
|
||
/* | ||
実装クラス | ||
class CourseTakingApplicationHub( | ||
val commandHandler: CourseTakingApplicationCommandHandler | ||
):CourseTakingHub { | ||
override fun getApplicationList(user: User): List<Application>? { | ||
return null | ||
return null | ||
} | ||
override fun handle(command: CourseTakingApplicationCommand): CourseTakingApplicationCommand? { | ||
return null | ||
} | ||
} | ||
}*/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters