File tree 1 file changed +35
-0
lines changed
src/main/kotlin/usecase/repository
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2023. Smart Operating Block
3
+ *
4
+ * Use of this source code is governed by an MIT-style
5
+ * license that can be found in the LICENSE file or at
6
+ * https://opensource.org/licenses/MIT.
7
+ */
8
+
9
+ package usecase.repository
10
+
11
+ import entity.zone.Room
12
+ import entity.zone.RoomID
13
+
14
+ /* *
15
+ * Interface that models the repository to manage Rooms.
16
+ */
17
+ interface RoomRepository {
18
+ /* *
19
+ * Create a [room].
20
+ * @return null if the room already exists, the room created otherwise.
21
+ */
22
+ fun createRoom (room : Room ): Room ?
23
+
24
+ /* *
25
+ * Delete a room by its [roomId].
26
+ * @return true if correctly deleted, false otherwise.
27
+ */
28
+ fun deleteRoom (roomId : RoomID ): Boolean
29
+
30
+ /* *
31
+ * Find a room by its [roomId].
32
+ * @return the room if present, null otherwise.
33
+ */
34
+ fun findBy (roomId : RoomID ): Room ?
35
+ }
You can’t perform that action at this time.
0 commit comments