-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
80 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 10 additions & 13 deletions
23
app/src/main/java/com/crazylegend/setofusefulkotlinextensions/adapter/TestModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
package com.crazylegend.setofusefulkotlinextensions.adapter | ||
|
||
|
||
import android.os.Parcelable | ||
import androidx.room.ColumnInfo | ||
import androidx.room.Entity | ||
import androidx.room.PrimaryKey | ||
import com.squareup.moshi.JsonClass | ||
import kotlinx.parcelize.Parcelize | ||
|
||
@Parcelize | ||
@Entity(tableName = "tests") | ||
@JsonClass(generateAdapter = true) | ||
data class TestModel( | ||
@ColumnInfo(name = "body") | ||
val body: String, | ||
@ColumnInfo(name = "id") | ||
@PrimaryKey | ||
val id: Int, | ||
@ColumnInfo(name = "title") | ||
val title: String, | ||
@ColumnInfo(name = "userId") | ||
val userId: Int | ||
) : Parcelable | ||
@ColumnInfo(name = "body") | ||
val body: String, | ||
@ColumnInfo(name = "id") | ||
@PrimaryKey | ||
val id: Int, | ||
@ColumnInfo(name = "title") | ||
val title: String, | ||
@ColumnInfo(name = "userId") | ||
val userId: Int | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 8 additions & 10 deletions
18
common/src/main/java/com/crazylegend/common/BatteryStatusModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 8 additions & 10 deletions
18
...tensions/src/main/java/com/crazylegend/kotlinextensions/location/ObtainedLocationModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
package com.crazylegend.kotlinextensions.location | ||
|
||
import android.os.Parcelable | ||
import kotlinx.parcelize.Parcelize | ||
|
||
|
||
/** | ||
* Created by crazy on 3/30/19 to long live and prosper ! | ||
*/ | ||
|
||
@Parcelize | ||
data class ObtainedLocationModel(var address: String = "", | ||
var city: String = "", | ||
var state: String = "", | ||
var country: String = "", | ||
var postalCode: String = "", | ||
var knownName: String = "") : Parcelable | ||
data class ObtainedLocationModel( | ||
var address: String? = null, | ||
var city: String? = null, | ||
var state: String? = null, | ||
var country: String? = null, | ||
var postalCode: String? = null, | ||
var knownName: String? = null | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters