diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorRepository.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorRepository.kt index 717fdd7a..821d4f73 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorRepository.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedActorRepository.kt @@ -5,6 +5,7 @@ import dev.usbharu.hideout.core.domain.model.support.domain.Domain import dev.usbharu.hideout.core.domain.shared.domainevent.DomainEventPublisher import dev.usbharu.hideout.core.domain.shared.repository.DomainEventPublishableRepository import dev.usbharu.hideout.core.infrastructure.exposed.QueryMapper +import dev.usbharu.hideout.core.infrastructure.exposed.uri import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.javatime.timestamp @@ -30,15 +31,15 @@ class ExposedActorRepository( it[domain] = actor.domain.domain it[screenName] = actor.screenName.screenName it[description] = actor.description.description - it[inbox] = actor.inbox.toString() - it[outbox] = actor.outbox.toString() - it[url] = actor.url.toString() + it[inbox] = actor.inbox + it[outbox] = actor.outbox + it[url] = actor.url it[publicKey] = actor.publicKey.publicKey it[privateKey] = actor.privateKey?.privateKey it[createdAt] = actor.createdAt it[keyId] = actor.keyId.keyId - it[following] = actor.followingEndpoint?.toString() - it[followers] = actor.followersEndpoint?.toString() + it[following] = actor.followingEndpoint + it[followers] = actor.followersEndpoint it[instance] = actor.instance.instanceId it[locked] = actor.locked it[followingCount] = actor.followingCount?.relationshipCount @@ -126,15 +127,15 @@ object Actors : Table("actors") { val domain = varchar("domain", Domain.LENGTH) val screenName = varchar("screen_name", ActorScreenName.LENGTH) val description = varchar("description", ActorDescription.LENGTH) - val inbox = varchar("inbox", 1000).uniqueIndex() - val outbox = varchar("outbox", 1000).uniqueIndex() - val url = varchar("url", 1000).uniqueIndex() + val inbox = uri("inbox", 1000).uniqueIndex() + val outbox = uri("outbox", 1000).uniqueIndex() + val url = uri("url", 1000).uniqueIndex() val publicKey = varchar("public_key", 10000) val privateKey = varchar("private_key", 100000).nullable() val createdAt = timestamp("created_at") val keyId = varchar("key_id", 1000) - val following = varchar("following", 1000).nullable() - val followers = varchar("followers", 1000).nullable() + val following = uri("following", 1000).nullable() + val followers = uri("followers", 1000).nullable() val instance = long("instance").references(Instance.id) val locked = bool("locked") val followingCount = integer("following_count").nullable()