mirror of
https://github.com/smyalygames/checklist-tester.git
synced 2025-05-18 14:34:12 +02:00
feat(connector): add Project entity
This commit is contained in:
parent
943023af8a
commit
4771d43788
@ -5,10 +5,10 @@ plugins {
|
||||
id("app.cash.sqldelight").version("2.0.1")
|
||||
}
|
||||
|
||||
val coroutinesVersion = "1.7.3"
|
||||
val ktorVersion = "2.3.7"
|
||||
val coroutinesVersion = "1.8.0"
|
||||
val ktorVersion = "2.3.9"
|
||||
val sqlDelightVersion = "2.0.1"
|
||||
val dateTimeVersion = "0.4.1"
|
||||
val dateTimeVersion = "0.5.0"
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
@ -29,7 +29,7 @@ kotlin {
|
||||
|
||||
sqldelight {
|
||||
databases {
|
||||
create("ConnectorDatabase") {
|
||||
create("Database") {
|
||||
packageName.set("io.anthonyberg.connector.shared.database")
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,25 @@
|
||||
package io.anthonyberg.connector.shared.entity
|
||||
|
||||
import kotlinx.datetime.TimeZone
|
||||
import kotlinx.datetime.toInstant
|
||||
import kotlinx.datetime.toLocalDateTime
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class Project(
|
||||
@SerialName("id")
|
||||
val id: Int,
|
||||
@SerialName("name")
|
||||
val name: String,
|
||||
@SerialName("aircraft_type")
|
||||
val aircraftType: String,
|
||||
@SerialName("created_utc")
|
||||
val createdUTC: String,
|
||||
@SerialName("modified_utc")
|
||||
val modifiedUTC: String?,
|
||||
) {
|
||||
// Convert String time to LocalDateTime variable
|
||||
var created = createdUTC.toInstant().toLocalDateTime(TimeZone.UTC)
|
||||
var modified = modifiedUTC?.toInstant()?.toLocalDateTime(TimeZone.UTC)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user