Browse Source

Fix: folder body other info

liweihao 5 years ago
parent
commit
ae709dfc7e

+ 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
+    )
 }

+ 8 - 4
src/main/java/com/example/kdan_data_center/datacenter/folder/body/UpdateFolderBody.kt

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