Prechádzať zdrojové kódy

Fix: folder body other info to data class

liweihao 5 rokov pred
rodič
commit
29acb64617

+ 6 - 2
src/main/java/com/example/kdan_data_center/datacenter/folder/body/CreateFolderByNameBody.kt

@@ -4,6 +4,10 @@ package com.example.kdan_data_center.datacenter.folder.body
 data class CreateFolderByNameBody(
         val folder_name: String
 ) {
-    val parent_id: Int? = null
-    var other_infos: HashMap<String, String>? = null
+    var parent_id: Int? = null
+    var other_infos: OtherInfos? = null
+
+    data class OtherInfos(
+            val color: String
+    )
 }

+ 6 - 1
src/main/java/com/example/kdan_data_center/datacenter/folder/body/CreateFolderByPathBody.kt

@@ -4,5 +4,10 @@ package com.example.kdan_data_center.datacenter.folder.body
 data class CreateFolderByPathBody(
         val full_path: String
 ) {
-    var other_infos: HashMap<String, String>? = null
+
+    val other_infos: OtherInfos? = null
+
+    data class OtherInfos(
+            val color: String
+    )
 }

+ 7 - 3
src/main/java/com/example/kdan_data_center/datacenter/folder/body/UpdateFolderBody.kt

@@ -4,7 +4,11 @@ package com.example.kdan_data_center.datacenter.folder.body
 data class UpdateFolderBody(
         val folder_id: Int
 ) {
-    val parent_id: Int? = null
-    val folder_name: String? = null
-    val other_infos: HashMap<String, String>? = null
+    var parent_id: Int? = null
+    var folder_name: String? = null
+    var other_infos: OtherInfos? = null
+
+    data class OtherInfos(
+            val color: String
+    )
 }