File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
src/main/kotlin/application/presenter/api/model Expand file tree Collapse file tree 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 application.presenter.api.model
10
+
11
+ import kotlinx.serialization.SerialName
12
+ import kotlinx.serialization.Serializable
13
+
14
+ /* *
15
+ * Presenter class to be able to deserialize data that comes from API.
16
+ * It deserializes [id], [name], [zoneId] and the [type] of the room.
17
+ */
18
+ @Serializable
19
+ data class RoomApiDto (
20
+ val id : String ,
21
+ val name : String ,
22
+ @SerialName(" zone-id" ) val zoneId : String ,
23
+ val type : RoomApiDtoType
24
+ )
25
+
26
+ /* *
27
+ * Presenter enum class to deserialize room type that comes from API.
28
+ */
29
+ @Serializable
30
+ enum class RoomApiDtoType {
31
+ /* * Operating room type. */
32
+ OPERATING_ROOM ,
33
+ /* * Pre-operating room type. */
34
+ PRE_OPERATING_ROOM
35
+ }
You can’t perform that action at this time.
0 commit comments