feat: 不要になったマッピングを削除

This commit is contained in:
usbharu 2023-10-23 13:29:09 +09:00
parent fe38cd93ef
commit 2a8eaf09b4
1 changed files with 0 additions and 21 deletions

View File

@ -6,7 +6,6 @@ import org.jetbrains.exposed.dao.id.LongIdTable
import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
import org.springframework.stereotype.Repository import org.springframework.stereotype.Repository
import java.time.Instant
@Repository @Repository
class UserRepositoryImpl( class UserRepositoryImpl(
@ -106,26 +105,6 @@ object Users : Table("users") {
} }
} }
fun ResultRow.toUser(): User {
return User.of(
id = this[Users.id],
name = this[Users.name],
domain = this[Users.domain],
screenName = this[Users.screenName],
description = this[Users.description],
password = this[Users.password],
inbox = this[Users.inbox],
outbox = this[Users.outbox],
url = this[Users.url],
publicKey = this[Users.publicKey],
privateKey = this[Users.privateKey],
createdAt = Instant.ofEpochMilli((this[Users.createdAt])),
keyId = this[Users.keyId],
followers = this[Users.followers],
following = this[Users.following]
)
}
object UsersFollowers : LongIdTable("users_followers") { object UsersFollowers : LongIdTable("users_followers") {
val userId: Column<Long> = long("user_id").references(Users.id).index() val userId: Column<Long> = long("user_id").references(Users.id).index()
val followerId: Column<Long> = long("follower_id").references(Users.id) val followerId: Column<Long> = long("follower_id").references(Users.id)