From dff3397bab517996104959364ad08e8a350435d7 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Tue, 15 Aug 2023 15:37:56 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20DB=E3=81=AE=E5=AE=9A=E7=BE=A9=E3=82=92?= =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=95=E3=82=A3=E3=82=B0=E3=81=8B=E3=82=89?= =?UTF-8?q?=E7=94=9F=E6=88=90=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hideout/repository/UserRepositoryImpl.kt | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/repository/UserRepositoryImpl.kt b/src/main/kotlin/dev/usbharu/hideout/repository/UserRepositoryImpl.kt index 86f0725a..961a089c 100644 --- a/src/main/kotlin/dev/usbharu/hideout/repository/UserRepositoryImpl.kt +++ b/src/main/kotlin/dev/usbharu/hideout/repository/UserRepositoryImpl.kt @@ -1,5 +1,6 @@ package dev.usbharu.hideout.repository +import dev.usbharu.hideout.config.Config import dev.usbharu.hideout.domain.model.hideout.entity.User import dev.usbharu.hideout.service.core.IdGenerateService import org.jetbrains.exposed.dao.id.LongIdTable @@ -82,16 +83,16 @@ class UserRepositoryImpl(private val database: Database, private val idGenerateS object Users : Table("users") { val id = long("id") - val name = varchar("name", length = 64) - val domain = varchar("domain", length = 255) - val screenName = varchar("screen_name", length = 64) - val description = varchar("description", length = 600) + val name = varchar("name", length = Config.configData.characterLimit.account.id) + val domain = varchar("domain", length = Config.configData.characterLimit.general.domain) + val screenName = varchar("screen_name", length = Config.configData.characterLimit.account.name) + val description = varchar("description", length = Config.configData.characterLimit.account.description) val password = varchar("password", length = 255).nullable() - val inbox = varchar("inbox", length = 255).uniqueIndex() - val outbox = varchar("outbox", length = 255).uniqueIndex() - val url = varchar("url", length = 255).uniqueIndex() - val publicKey = varchar("public_key", length = 10000) - val privateKey = varchar("private_key", length = 10000).nullable() + val inbox = varchar("inbox", length = Config.configData.characterLimit.general.url).uniqueIndex() + val outbox = varchar("outbox", length = Config.configData.characterLimit.general.url).uniqueIndex() + val url = varchar("url", length = Config.configData.characterLimit.general.url).uniqueIndex() + val publicKey = varchar("public_key", length = Config.configData.characterLimit.general.publicKey) + val privateKey = varchar("private_key", length = Config.configData.characterLimit.general.privateKey).nullable() val createdAt = long("created_at") override val primaryKey: PrimaryKey = PrimaryKey(id)