diff --git a/gradle.properties b/gradle.properties index b7b5214..1f84afd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ projectName=config group=game.bible artifactDescription=The BLE Config Model (config) -version=0.0.3-SNAPSHOT +version=0.1.0-SNAPSHOT multiModule=false jiraCode=BLE \ No newline at end of file diff --git a/src/main/kotlin/game/bible/config/model/domain/BibleConfig.kt b/src/main/kotlin/game/bible/config/model/domain/BibleConfig.kt index 4e5baec..b38c4c8 100644 --- a/src/main/kotlin/game/bible/config/model/domain/BibleConfig.kt +++ b/src/main/kotlin/game/bible/config/model/domain/BibleConfig.kt @@ -30,42 +30,57 @@ class BibleConfig : Initialisable { private val log: Logger = LoggerFactory.getLogger(BibleConfig::class.java) } - private val books: List? = null + private val testaments: List? = null - fun getBooks() = books + fun getTestaments() = testaments // Note: getter required to proxy fields @JsonIgnoreProperties(ignoreUnknown = true) - class BibleBookConfig : Serializable { + class BibleTestamentConfig : Serializable { - private val book: String? = null - private val chapters: List? = null + private val name: String? = null + private val divisions: List? = null - fun getBook() = book - fun getChapters() = chapters + fun getName() = name + fun getDivisions() = divisions companion object { - @Serial private val serialVersionUID = 987654321098765432L + @Serial private val serialVersionUID = 10645876543987432L } @JsonIgnoreProperties(ignoreUnknown = true) - class BiblePassageConfig : Serializable { + class BibleDivisionConfig : Serializable { - private val chapter: Int? = null - private val title: String? = null - private val verseStart: Int? = null - private val verseEnd: Int? = null + private val name: String? = null + private val books: List? = null - fun getChapter() = chapter - fun getTitle() = title - fun getVerseStart() = verseStart - fun getVerseEnd() = verseEnd + fun getName() = name + fun getBooks() = books companion object { - @Serial private val serialVersionUID = 10645876543987432L + @Serial private val serialVersionUID = 7066743554336982L + } + + @JsonIgnoreProperties(ignoreUnknown = true) + class BibleBookConfig : Serializable { + + private val key: String? = null + private val name: String? = null + private val chapters: Int? = null + private val verses: List? = null + + fun getKey() = key + fun getName() = name + fun getChapters() = chapters + fun getVerses() = verses + + companion object { + @Serial private val serialVersionUID = 4706367545394827L + } } } } + } diff --git a/src/main/kotlin/game/bible/config/model/integration/ChatGptConfig.kt b/src/main/kotlin/game/bible/config/model/integration/ChatGptConfig.kt new file mode 100644 index 0000000..f75f1c7 --- /dev/null +++ b/src/main/kotlin/game/bible/config/model/integration/ChatGptConfig.kt @@ -0,0 +1,39 @@ +package game.bible.config.model.integration + +import game.bible.config.bean.Initialisable +import game.bible.config.bean.Reloadable +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import java.io.Serial + +/** + * ChatGPT Configuration + * + * @author J. R. Smith + * @since 30th January 2025 + */ +@Reloadable( + prefix = "chat-gpt", + path = "\${application.config.dir}") +class ChatGptConfig : Initialisable { + + init { + log.info("Created [{}]", this.javaClass.name) + } + + private val apiKey: String? = null + private val promptDeveloper: String? = null + private val promptUser: String? = null + + fun getApiKey() = apiKey + fun getPromptDeveloper() = promptDeveloper + fun getPromptUser() = promptUser + // Note: this getter is required or proxying this field fails + + companion object { + @Serial private val serialVersionUID = 3578565273432319L + + private val log: Logger = LoggerFactory.getLogger(ChatGptConfig::class.java) + } + +}