From fa68e164f295c5db8b3f28fd98058bcc9edadc8b Mon Sep 17 00:00:00 2001 From: spoonman01 Date: Tue, 17 Dec 2024 13:27:23 +0100 Subject: [PATCH] Silent cleanup --- src/main/kotlin/com/wire/bots/polls/dao/PollOptions.kt | 2 +- src/main/kotlin/com/wire/bots/polls/dao/Polls.kt | 2 +- src/main/kotlin/com/wire/bots/polls/dao/Votes.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/wire/bots/polls/dao/PollOptions.kt b/src/main/kotlin/com/wire/bots/polls/dao/PollOptions.kt index 546714b..d68db3f 100644 --- a/src/main/kotlin/com/wire/bots/polls/dao/PollOptions.kt +++ b/src/main/kotlin/com/wire/bots/polls/dao/PollOptions.kt @@ -23,6 +23,6 @@ object PollOptions : Table("poll_option") { */ val optionContent: Column = varchar("option_content", 256) - override val primaryKey: PrimaryKey? + override val primaryKey: PrimaryKey get() = PrimaryKey(pollId, optionOrder) } diff --git a/src/main/kotlin/com/wire/bots/polls/dao/Polls.kt b/src/main/kotlin/com/wire/bots/polls/dao/Polls.kt index 5454428..049e23c 100644 --- a/src/main/kotlin/com/wire/bots/polls/dao/Polls.kt +++ b/src/main/kotlin/com/wire/bots/polls/dao/Polls.kt @@ -41,6 +41,6 @@ object Polls : Table("polls") { */ val created: Column = datetime("time_stamp") - override val primaryKey: PrimaryKey? + override val primaryKey: PrimaryKey get() = PrimaryKey(id) } diff --git a/src/main/kotlin/com/wire/bots/polls/dao/Votes.kt b/src/main/kotlin/com/wire/bots/polls/dao/Votes.kt index 50eef5a..71e9323 100644 --- a/src/main/kotlin/com/wire/bots/polls/dao/Votes.kt +++ b/src/main/kotlin/com/wire/bots/polls/dao/Votes.kt @@ -22,6 +22,6 @@ object Votes : Table("votes") { */ val userId: Column = varchar("user_id", 36) - override val primaryKey: PrimaryKey? + override val primaryKey: PrimaryKey get() = PrimaryKey(pollId, userId) }