From 07926ef0c12254668c32c6dd83d2c6c850202872 Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 27 Aug 2024 23:20:32 +0200 Subject: [PATCH] Forgot to commit MessageLogEntry --- .../codinux/banking/client/model/MessageLogEntry.kt | 12 ++++++++++++ .../banking/client/model/MessageLogEntryType.kt | 9 +++++++++ 2 files changed, 21 insertions(+) create mode 100644 BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/MessageLogEntry.kt create mode 100644 BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/MessageLogEntryType.kt diff --git a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/MessageLogEntry.kt b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/MessageLogEntry.kt new file mode 100644 index 00000000..d8eebe08 --- /dev/null +++ b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/MessageLogEntry.kt @@ -0,0 +1,12 @@ +package net.codinux.banking.client.model + +import kotlinx.datetime.Clock +import kotlinx.datetime.Instant + +open class MessageLogEntry( + open val type: MessageLogEntryType, + open val message: String, + open val messageTrace: String? = null, + open val error: Throwable? = null, + open val time: Instant = Clock.System.now() +) \ No newline at end of file diff --git a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/MessageLogEntryType.kt b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/MessageLogEntryType.kt new file mode 100644 index 00000000..eaa77080 --- /dev/null +++ b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/MessageLogEntryType.kt @@ -0,0 +1,9 @@ +package net.codinux.banking.client.model + +enum class MessageLogEntryType { + Sent, + + Received, + + Error +} \ No newline at end of file