mirror of https://github.com/usbharu/Hideout.git
feat: 絵文字のエンティティとRepositoryを追加
This commit is contained in:
parent
f32102fef1
commit
55af96bd6c
|
@ -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"
|
||||
}
|
|
@ -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)
|
||||
}
|
Loading…
Reference in New Issue