-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
353 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package data.dto | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class DefaultDictionaryDto( | ||
val id: String, | ||
val name: String, | ||
val description: String, | ||
val terms: List<DefaultTermDto>, | ||
) | ||
|
||
@Serializable | ||
data class DefaultTermDto( | ||
val name: String, | ||
val description: String, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package data.dto | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class DictionaryCollectionDto( | ||
val id: String, | ||
val name: String, | ||
val dictionaryCount: Int, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
server/src/main/kotlin/com/krushiler/data/storage/dbo/DictionaryCollectionDbo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.krushiler.data.storage.dbo | ||
|
||
import org.jetbrains.exposed.sql.ResultRow | ||
import org.jetbrains.exposed.sql.Table | ||
|
||
data class DictionaryCollectionDbo( | ||
val id: String, | ||
val name: String, | ||
) | ||
|
||
object DictionaryCollections : Table() { | ||
val id = varchar("id", 128) | ||
val name = varchar("name", 128) | ||
|
||
override val primaryKey = PrimaryKey(id) | ||
|
||
fun resultRowToDictionaryCollection(row: ResultRow) = DictionaryCollectionDbo( | ||
id = row[id], | ||
name = row[name], | ||
) | ||
} | ||
|
||
object DictionaryCollectionDictionaries : Table() { | ||
val id = varchar("id", 128) | ||
val dictionaryId = varchar("dictionaryId", 128).references(Dictionaries.id) | ||
val collectionId = varchar("collectionId", 128).references(DictionaryCollections.id) | ||
|
||
override val primaryKey = PrimaryKey(id) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.