All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lightningkite.lightningserver.tasks.ActionHasOccurredFields.kt Maven / Gradle / Ivy

The newest version!
@file:UseContextualSerialization(Instant::class)
@file:OptIn(ExperimentalSerializationApi::class, InternalSerializationApi::class)

package com.lightningkite.lightningserver.tasks

import com.lightningkite.lightningdb.*
import com.lightningkite.lightningserver.core.LightningServerDsl
import com.lightningkite.lightningserver.serialization.Serialization
import kotlinx.coroutines.CoroutineScope
import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializable
import kotlinx.serialization.UseContextualSerialization
import kotlinx.serialization.serializer
import java.time.Instant
import kotlin.reflect.*
import kotlinx.serialization.*
import kotlinx.serialization.builtins.*
import kotlinx.serialization.internal.GeneratedSerializer
import java.time.*
import java.util.*

fun prepareActionHasOccurredFields() {
    ActionHasOccurred::_id.setCopyImplementation { original, value -> original.copy(_id = value) }
    ActionHasOccurred::started.setCopyImplementation { original, value -> original.copy(started = value) }
    ActionHasOccurred::completed.setCopyImplementation { original, value -> original.copy(completed = value) }
    ActionHasOccurred::errorMessage.setCopyImplementation { original, value -> original.copy(errorMessage = value) }
}
val  DataClassPath._id: DataClassPath get() = this[ActionHasOccurred::_id]
val  DataClassPath.started: DataClassPath get() = this[ActionHasOccurred::started]
val  DataClassPath.completed: DataClassPath get() = this[ActionHasOccurred::completed]
val  DataClassPath.errorMessage: DataClassPath get() = this[ActionHasOccurred::errorMessage]
inline val ActionHasOccurred.Companion.path: DataClassPath get() = path()




© 2015 - 2024 Weber Informatics LLC | Privacy Policy