1
0
Fork 0
mirror of https://github.com/MatomoCamp/matomocamp-companion-android.git synced 2024-09-19 16:13:46 +02:00

simplify the Link class by removing secondary constructor

This commit is contained in:
Christophe Beyls 2020-01-29 23:29:24 +01:00
parent 9db6ec56ad
commit a37e102cd5

View file

@ -11,15 +11,13 @@ import kotlinx.android.parcel.Parcelize
@Parcelize
data class Link(
@PrimaryKey(autoGenerate = true)
val id: Long,
val id: Long = 0L,
@ColumnInfo(name = "event_id")
val eventId: Long,
val url: String,
val description: String?
) : Parcelable {
constructor(eventId: Long, url: String, description: String?) : this(0L, eventId, url, description)
companion object {
const val TABLE_NAME = "links"
}