Skip to content

Commit

Permalink
Convert models back into separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindavi committed Aug 6, 2018
1 parent 60037a8 commit f900fe9
Show file tree
Hide file tree
Showing 12 changed files with 116 additions and 85 deletions.
10 changes: 10 additions & 0 deletions app/src/main/java/eu/rickvanschijndel/solargraph/models/Address.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// generated using https://github.com/wuseal/JsonToKotlinClass

package eu.rickvanschijndel.solargraph.models

data class Address(
val address_line_1: String,
val city: String,
val state: String,
val country: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// generated using https://github.com/wuseal/JsonToKotlinClass

package eu.rickvanschijndel.solargraph.models

data class Graphs(
val realtime_power: Map<String, Double>,
val daily_output: Map<String, Double>,
val monthly_output: Map<String, Double>
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// generated using https://github.com/wuseal/JsonToKotlinClass

package eu.rickvanschijndel.solargraph.models

data class Inverter(
val inverternr: Int,
val product_code: String,
val serial_number: String,
val comm_type: String,
val comm_identifier: String,
val dt_installed: String,
val dt_replaced: Any,
val mppts: Map<Int, Mppt>,
val dma_device_type: String
)
11 changes: 11 additions & 0 deletions app/src/main/java/eu/rickvanschijndel/solargraph/models/Kpis.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

// generated using https://github.com/wuseal/JsonToKotlinClass

package eu.rickvanschijndel.solargraph.models

data class Kpis(
val current_production: Int,
val output_today: Int,
val output_month: Int,
val output_to_date: Int
)
85 changes: 0 additions & 85 deletions app/src/main/java/eu/rickvanschijndel/solargraph/models/Models.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// generated using https://github.com/wuseal/JsonToKotlinClass

package eu.rickvanschijndel.solargraph.models

data class MonitorData(
val dt_first_msg: String,
val dt_latest_msg: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// generated using https://github.com/wuseal/JsonToKotlinClass

package eu.rickvanschijndel.solargraph.models

data class Mppt(
val mpptnr: String,
val module_group: String,
val strings: List<Any>
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// generated using https://github.com/wuseal/JsonToKotlinClass

package eu.rickvanschijndel.solargraph.models

data class ProductionResponse(
val site: Site,
val inverters: List<MonitorData>,
val stats: Stats
)
14 changes: 14 additions & 0 deletions app/src/main/java/eu/rickvanschijndel/solargraph/models/Site.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// generated using https://github.com/wuseal/JsonToKotlinClass

package eu.rickvanschijndel.solargraph.models

data class Site(
val public_key: String,
val name: String,
val address: Address,
val timezone: String,
val nominal_pv_power: String,
val systems: List<System>,
val dt_created: String,
val dt_updated: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// generated using https://github.com/wuseal/JsonToKotlinClass

package eu.rickvanschijndel.solargraph.models

data class SiteResponse(
val public_key: String,
val name: String,
val address: String,
val date: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// generated using https://github.com/wuseal/JsonToKotlinClass

package eu.rickvanschijndel.solargraph.models

data class Stats(
val graphs: Graphs,
val kpis: Kpis
)
13 changes: 13 additions & 0 deletions app/src/main/java/eu/rickvanschijndel/solargraph/models/System.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// generated using https://github.com/wuseal/JsonToKotlinClass

package eu.rickvanschijndel.solargraph.models

data class System(
val name: String,
val retailer: String,
val acpog_number: String,
val nominal_power: Int,
val inverters: List<Inverter>,
val dt_created: String,
val dt_updated: String
)

0 comments on commit f900fe9

Please sign in to comment.