Browse Source

Fix: theme preview data for dynamic data column

liweihao 6 years ago
parent
commit
5574a4eb7b
1 changed files with 11 additions and 23 deletions
  1. 11 23
      src/main/java/com/example/bomocloud/theme/ThemePreviewUrlData.kt

+ 11 - 23
src/main/java/com/example/bomocloud/theme/ThemePreviewUrlData.kt

@@ -1,35 +1,23 @@
 package com.example.bomocloud.theme
 
+import com.google.gson.annotations.SerializedName
+
 
 data class ThemePreviewUrlData(
-        val data: Data
+        @SerializedName("data") val data: Data
 ) {
 
     data class Data(
-            val theme: String,
-            val actor: Actor,
-            val obj: Object,
-            val scene: Scene
+            @SerializedName("id") val id: Int,
+            @SerializedName("name") val name: String,
+            @SerializedName("preview_index") val previewIndex: PreviewIndex
     ) {
 
-        data class Actor(
-                val ant: String,
-                val cat_black: String,
-                val bat: String
-        )
-
-
-        data class Object(
-                val o2: String,
-                val o3: String,
-                val o1: String
-        )
-
-
-        data class Scene(
-                val s2: String,
-                val s3: String,
-                val s1: String
+        data class PreviewIndex(
+                @SerializedName("theme") val theme: String,
+                @SerializedName("actor") val actor: HashMap<String, String>,
+                @SerializedName("object") val obj: HashMap<String, String>,
+                @SerializedName("scene") val scene: HashMap<String, String>
         )
     }
 }