Browse Source

Fix: theme download data for dynamic data column

liweihao 6 years ago
parent
commit
d62f9f11de
1 changed files with 20 additions and 150 deletions
  1. 20 150
      src/main/java/com/example/bomocloud/theme/ThemeDownloadData.kt

+ 20 - 150
src/main/java/com/example/bomocloud/theme/ThemeDownloadData.kt

@@ -1,171 +1,41 @@
 package com.example.bomocloud.theme
 
+import com.google.gson.annotations.SerializedName
+
 
 data class ThemeDownloadData(
-        val data: Data
+        @SerializedName("data") val data: Data
 ) {
 
     data class Data(
-            val id: Int,
-            val source_path_url: String,
-            val cover_img_url: String,
-            val index: Index
+            @SerializedName("id") val id: Int,
+            @SerializedName("source_path_url") val sourcePathUrl: String,
+            @SerializedName("cover_img_url") val coverImgUrl: String,
+            @SerializedName("index") val index: Index
     ) {
 
         data class Index(
-                val name: String,
-                val source_path: String,
-                val key: String,
-                val large_file: String,
-                val small_file: String,
-                val contains: Contains
+                @SerializedName("name") val name: String,
+                @SerializedName("source_path") val sourcePath: String,
+                @SerializedName("key") val key: String,
+                @SerializedName("large_file") val largeFile: String,
+                @SerializedName("small_file") val smallFile: String,
+                @SerializedName("contains") val contains: Contains
         ) {
 
             data class Contains(
-                    val actor: Actor,
-                    val music: Music,
-                    val obj: Object,
-                    val scene: Scene
+                    @SerializedName("actor") val actor: HashMap<String, HashMap<String, FilePath>>,
+                    @SerializedName("music") val music: HashMap<String, String>,
+                    @SerializedName("object") val obj: HashMap<String, FilePath>,
+                    @SerializedName("scene") val scene: HashMap<String, FilePath>
             ) {
 
-                data class Music(
-                        val silver: String,
-                        val smokinSticks: String,
-                        val watchMe: String,
-                        val happyBoyendTheme: String
+                data class FilePath(
+                        @SerializedName("large_file") val largeFile: String,
+                        @SerializedName("small_file") val smallFile: String
                 )
 
 
-                data class Actor(
-                        val bat: Bat,
-                        val cat_black: CatBlack,
-                        val ant: Ant
-                ) {
-
-                    data class Bat(
-                            val act3: Act3,
-                            val act1: Act1,
-                            val act2: Act2
-                    ) {
-
-                        data class Act2(
-                                val large_file: String,
-                                val small_file: String
-                        )
-
-
-                        data class Act3(
-                                val large_file: String,
-                                val small_file: String
-                        )
-
-
-                        data class Act1(
-                                val large_file: String,
-                                val small_file: String
-                        )
-                    }
-
-
-                    data class CatBlack(
-                            val act3: Act3,
-                            val act1: Act1,
-                            val act2: Act2
-                    ) {
-
-                        data class Act2(
-                                val large_file: String,
-                                val small_file: String
-                        )
-
-
-                        data class Act3(
-                                val large_file: String,
-                                val small_file: String
-                        )
-
-
-                        data class Act1(
-                                val large_file: String,
-                                val small_file: String
-                        )
-                    }
-
-
-                    data class Ant(
-                            val act3: Act3,
-                            val act1: Act1,
-                            val act2: Act2
-                    ) {
-
-                        data class Act2(
-                                val large_file: String,
-                                val small_file: String
-                        )
-
-
-                        data class Act3(
-                                val large_file: String,
-                                val small_file: String
-                        )
-
-
-                        data class Act1(
-                                val large_file: String,
-                                val small_file: String
-                        )
-                    }
-                }
-
-
-                data class Object(
-                        val o3: O3,
-                        val o2: O2,
-                        val o1: O1
-                ) {
-
-                    data class O3(
-                            val large_file: String,
-                            val small_file: String
-                    )
-
-
-                    data class O2(
-                            val large_file: String,
-                            val small_file: String
-                    )
-
-
-                    data class O1(
-                            val large_file: String,
-                            val small_file: String
-                    )
-                }
-
-
-                data class Scene(
-                        val s1: S1,
-                        val s2: S2,
-                        val s3: S3
-                ) {
-
-                    data class S3(
-                            val large_file: String,
-                            val small_file: String
-                    )
-
-
-                    data class S1(
-                            val large_file: String,
-                            val small_file: String
-                    )
-
-
-                    data class S2(
-                            val large_file: String,
-                            val small_file: String
-                    )
-                }
             }
         }
     }