2020-11-18 21:12:27 +01:00
|
|
|
/* Copyright 2020 Tusky Contributors
|
|
|
|
*
|
|
|
|
* This file is a part of Tusky.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
|
|
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
|
|
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
|
|
* Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with Tusky; if not,
|
|
|
|
* see <http://www.gnu.org/licenses>. */
|
|
|
|
|
|
|
|
package com.keylesspalace.tusky.entity
|
|
|
|
|
|
|
|
import com.google.gson.annotations.SerializedName
|
2021-06-28 21:13:24 +02:00
|
|
|
import java.util.Date
|
2020-11-18 21:12:27 +01:00
|
|
|
|
|
|
|
data class Announcement(
|
2021-06-28 21:13:24 +02:00
|
|
|
val id: String,
|
2022-04-15 13:20:27 +02:00
|
|
|
val content: String,
|
2021-06-28 21:13:24 +02:00
|
|
|
@SerializedName("starts_at") val startsAt: Date?,
|
|
|
|
@SerializedName("ends_at") val endsAt: Date?,
|
|
|
|
@SerializedName("all_day") val allDay: Boolean,
|
|
|
|
@SerializedName("published_at") val publishedAt: Date,
|
|
|
|
@SerializedName("updated_at") val updatedAt: Date,
|
|
|
|
val read: Boolean,
|
|
|
|
val mentions: List<Status.Mention>,
|
|
|
|
val statuses: List<Status>,
|
|
|
|
val tags: List<HashTag>,
|
|
|
|
val emojis: List<Emoji>,
|
|
|
|
val reactions: List<Reaction>
|
2020-11-18 21:12:27 +01:00
|
|
|
) {
|
|
|
|
|
|
|
|
override fun equals(other: Any?): Boolean {
|
|
|
|
if (this === other) return true
|
|
|
|
if (other == null || javaClass != other.javaClass) return false
|
|
|
|
|
|
|
|
val announcement = other as Announcement?
|
|
|
|
return id == announcement?.id
|
|
|
|
}
|
|
|
|
|
|
|
|
override fun hashCode(): Int {
|
|
|
|
return id.hashCode()
|
|
|
|
}
|
|
|
|
|
|
|
|
data class Reaction(
|
2021-06-28 21:13:24 +02:00
|
|
|
val name: String,
|
2022-08-31 18:54:40 +02:00
|
|
|
val count: Int,
|
|
|
|
val me: Boolean,
|
2021-06-28 21:13:24 +02:00
|
|
|
val url: String?,
|
|
|
|
@SerializedName("static_url") val staticUrl: String?
|
2020-11-18 21:12:27 +01:00
|
|
|
)
|
|
|
|
}
|