mirror of
https://github.com/usbharu/Hideout.git
synced 2026-09-26 06:51:09 +00:00
feat: Actorに絵文字情報を含めることが可能に
This commit is contained in:
@@ -26,7 +26,8 @@ data class Actor private constructor(
|
||||
val followersCount: Int = 0,
|
||||
val followingCount: Int = 0,
|
||||
val postsCount: Int = 0,
|
||||
val lastPostDate: Instant? = null
|
||||
val lastPostDate: Instant? = null,
|
||||
val emojis: List<Long> = emptyList()
|
||||
) {
|
||||
|
||||
@Component
|
||||
@@ -55,7 +56,8 @@ data class Actor private constructor(
|
||||
followersCount: Int = 0,
|
||||
followingCount: Int = 0,
|
||||
postsCount: Int = 0,
|
||||
lastPostDate: Instant? = null
|
||||
lastPostDate: Instant? = null,
|
||||
emojis: List<Long> = emptyList()
|
||||
): Actor {
|
||||
if (id == 0L) {
|
||||
return Actor(
|
||||
@@ -78,7 +80,8 @@ data class Actor private constructor(
|
||||
followersCount = followersCount,
|
||||
followingCount = followingCount,
|
||||
postsCount = postsCount,
|
||||
lastPostDate = lastPostDate
|
||||
lastPostDate = lastPostDate,
|
||||
emojis = emojis
|
||||
)
|
||||
}
|
||||
|
||||
@@ -188,7 +191,8 @@ data class Actor private constructor(
|
||||
followersCount = followersCount,
|
||||
followingCount = followingCount,
|
||||
postsCount = postsCount,
|
||||
lastPostDate = lastPostDate
|
||||
lastPostDate = lastPostDate,
|
||||
emojis = emojis
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -45,6 +45,7 @@ class ActorRepositoryImpl(
|
||||
it[followingCount] = actor.followingCount
|
||||
it[postsCount] = actor.postsCount
|
||||
it[lastPostAt] = actor.lastPostDate
|
||||
it[emojis] = actor.emojis.joinToString(",")
|
||||
}
|
||||
} else {
|
||||
Actors.update({ Actors.id eq actor.id }) {
|
||||
@@ -67,6 +68,7 @@ class ActorRepositoryImpl(
|
||||
it[followingCount] = actor.followingCount
|
||||
it[postsCount] = actor.postsCount
|
||||
it[lastPostAt] = actor.lastPostDate
|
||||
it[emojis] = actor.emojis.joinToString(",")
|
||||
}
|
||||
}
|
||||
return@query actor
|
||||
@@ -152,7 +154,7 @@ object Actors : Table("actors") {
|
||||
val followersCount = integer("followers_count")
|
||||
val postsCount = integer("posts_count")
|
||||
val lastPostAt = timestamp("last_post_at").nullable()
|
||||
|
||||
val emojis = varchar("emojis", 3000)
|
||||
override val primaryKey: PrimaryKey = PrimaryKey(id)
|
||||
|
||||
init {
|
||||
|
||||
Reference in New Issue
Block a user