mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-26 00:17:42 +01:00
use data classes for models
This commit is contained in:
parent
30d21224cd
commit
1597bedf62
@ -1,5 +1,3 @@
|
|||||||
package com.simplemobiletools.calendar.models
|
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) {
|
data 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}"
|
|
||||||
}
|
|
||||||
|
@ -4,10 +4,8 @@ import com.simplemobiletools.calendar.helpers.*
|
|||||||
import org.joda.time.DateTime
|
import org.joda.time.DateTime
|
||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
|
|
||||||
class Event(var id: Int = 0, var startTS: Int = 0, var endTS: Int = 0, var title: String = "", var description: String = "",
|
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 {
|
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}"
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val serialVersionUID = -32456795132344616L
|
private val serialVersionUID = -32456795132344616L
|
||||||
|
Loading…
x
Reference in New Issue
Block a user