feat: 絵文字のエンティティとRepositoryを追加

This commit is contained in:
usbharu 2023-12-21 18:35:53 +09:00
parent f32102fef1
commit 55af96bd6c
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,24 @@
package dev.usbharu.hideout.core.domain.model.emoji
import java.time.Instant
sealed class Emoji {
abstract val domain: String
abstract val name: String
}
data class CustomEmoji(
val id: Long,
override val name: String,
override val domain: String,
val instanceId: Long,
val url: String,
val category: String,
val createdAt: Instant
) : Emoji()
data class UnicodeEmoji(
override val name: String
) : Emoji() {
override val domain: String = "unicode.org"
}

View File

@ -0,0 +1,7 @@
package dev.usbharu.hideout.core.domain.model.emoji
interface CustomEmojiRepository {
suspend fun save(customEmoji: CustomEmoji): CustomEmoji
suspend fun findById(id: Long): CustomEmoji?
suspend fun delete(customEmoji: CustomEmoji)
}