From 9f4fb8f4abec562cf13cb1dd225828876875c790 Mon Sep 17 00:00:00 2001 From: Sho Sakuma Date: Sun, 25 Jan 2026 16:19:24 +0900 Subject: feat: Add Channel CRUD operator --- .../engine/exception/ChannelMemberNotFoundException.kt | 5 +++++ .../engine/exception/ChannelNoOwnerPermissionException.kt | 7 +++++++ .../lunaticChat/engine/exception/ChannelNotFoundException.kt | 5 +++++ .../lunaticChat/engine/exception/ChannelNotMemberException.kt | 8 ++++++++ 4 files changed, 25 insertions(+) create mode 100644 engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelMemberNotFoundException.kt create mode 100644 engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelNoOwnerPermissionException.kt create mode 100644 engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelNotFoundException.kt create mode 100644 engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelNotMemberException.kt (limited to 'engine/src') diff --git a/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelMemberNotFoundException.kt b/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelMemberNotFoundException.kt new file mode 100644 index 0000000..8dfd6f2 --- /dev/null +++ b/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelMemberNotFoundException.kt @@ -0,0 +1,5 @@ +package dev.m1sk9.lunaticChat.engine.exception + +class ChannelMemberNotFoundException( + channelId: String, +) : Exception("Channel member not found in channel with ID $channelId.") diff --git a/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelNoOwnerPermissionException.kt b/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelNoOwnerPermissionException.kt new file mode 100644 index 0000000..2cc6625 --- /dev/null +++ b/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelNoOwnerPermissionException.kt @@ -0,0 +1,7 @@ +package dev.m1sk9.lunaticChat.engine.exception + +import java.util.UUID + +class ChannelNoOwnerPermissionException( + ownerId: UUID, +) : Exception("No permission for channel owned by player with ID $ownerId.") diff --git a/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelNotFoundException.kt b/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelNotFoundException.kt new file mode 100644 index 0000000..0f60766 --- /dev/null +++ b/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelNotFoundException.kt @@ -0,0 +1,5 @@ +package dev.m1sk9.lunaticChat.engine.exception + +class ChannelNotFoundException( + channelId: String, +) : Exception("Channel with ID $channelId not found.") diff --git a/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelNotMemberException.kt b/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelNotMemberException.kt new file mode 100644 index 0000000..b66c791 --- /dev/null +++ b/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/exception/ChannelNotMemberException.kt @@ -0,0 +1,8 @@ +package dev.m1sk9.lunaticChat.engine.exception + +import java.util.UUID + +class ChannelNotMemberException( + playerId: UUID, + channelId: String, +) : Exception("Player $playerId is not a member of channel $channelId") -- cgit v1.2.1