use data classes for models

This commit is contained in:
tibbi 2017-01-02 22:08:10 +01:00
parent 30d21224cd
commit 1597bedf62
2 changed files with 3 additions and 7 deletions

View File

@ -1,5 +1,3 @@
package com.simplemobiletools.calendar.models
class Day(val value: Int, val isThisMonth: Boolean, val isToday: Boolean, val code: String, var hasEvent: Boolean, val weekOfYear: Int) {
override fun toString() = "Day {value=$value, isThisMonth=$isThisMonth, itToday=$isToday, code=$code, hasEvent=$hasEvent, weekOfYear=$weekOfYear}"
}
data class Day(val value: Int, val isThisMonth: Boolean, val isToday: Boolean, val code: String, var hasEvent: Boolean, val weekOfYear: Int)

View File

@ -4,10 +4,8 @@ import com.simplemobiletools.calendar.helpers.*
import org.joda.time.DateTime
import java.io.Serializable
class Event(var id: Int = 0, var startTS: Int = 0, var endTS: Int = 0, var title: String = "", var description: String = "",
var reminderMinutes: Int = 0, var repeatInterval: Int = 0) : Serializable {
override fun toString() = "Event {id=$id, startTS=$startTS, endTS=$endTS, title=$title, description=$description, " +
"reminderMinutes=$reminderMinutes, repeatInterval=$repeatInterval}"
data class Event(var id: Int = 0, var startTS: Int = 0, var endTS: Int = 0, var title: String = "", var description: String = "",
var reminderMinutes: Int = 0, var repeatInterval: Int = 0) : Serializable {
companion object {
private val serialVersionUID = -32456795132344616L