From 80f4e9fb04b089d9d2b4ce83bf04b38fb1389c7f Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Thu, 21 Dec 2023 19:14:02 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=B5=B5=E6=96=87=E5=AD=97=E3=82=92?= =?UTF-8?q?=E8=AD=98=E5=88=A5=E3=81=99=E3=82=8BID=E3=81=AE=E7=94=9F?= =?UTF-8?q?=E6=88=90=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hideout/core/domain/model/emoji/CustomEmoji.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/core/domain/model/emoji/CustomEmoji.kt b/src/main/kotlin/dev/usbharu/hideout/core/domain/model/emoji/CustomEmoji.kt index f4e69e54..9d6598e2 100644 --- a/src/main/kotlin/dev/usbharu/hideout/core/domain/model/emoji/CustomEmoji.kt +++ b/src/main/kotlin/dev/usbharu/hideout/core/domain/model/emoji/CustomEmoji.kt @@ -5,6 +5,7 @@ import java.time.Instant sealed class Emoji { abstract val domain: String abstract val name: String + abstract fun id(): String } data class CustomEmoji( @@ -15,10 +16,17 @@ data class CustomEmoji( val url: String, val category: String, val createdAt: Instant -) : Emoji() +) : Emoji() { + override fun id(): String { + return id.toString() + } +} data class UnicodeEmoji( override val name: String ) : Emoji() { override val domain: String = "unicode.org" + override fun id(): String { + return name + } }