com.lightningkite.lightningserver.db.testmodels.TestThing.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of server-core Show documentation
Show all versions of server-core Show documentation
A set of tools to fill in/replace what Ktor is lacking in.
The newest version!
@file:UseContextualSerialization(UUID::class)
package com.lightningkite.lightningserver.db.testmodels
import com.lightningkite.lightningdb.*
import kotlinx.serialization.Serializable
import kotlinx.serialization.UseContextualSerialization
import java.util.*
@GenerateDataClassPaths
@Serializable
data class TestThing(override val _id: UUID = UUID.randomUUID(), val value: Int = 0) : HasId
@GenerateDataClassPaths
@Serializable
data class TempThing(override val _id: Int) : HasId
@GenerateDataClassPaths
@Serializable
data class UniqueFieldClass(
override val _id: Int,
@Unique val unique1: Int,
) : HasId
@GenerateDataClassPaths
@Serializable
@UniqueSet(["uniqueSet1", "uniqueSet2"])
data class UniqueSetClass(
override val _id: Int,
val uniqueSet1: Int,
val uniqueSet2: Int,
) : HasId
@GenerateDataClassPaths
@Serializable
@UniqueSet(["uniqueSet1", "uniqueSet2"])
data class UniqueComboClass(
override val _id: Int,
@Unique val unique1: Int,
val uniqueSet1: Int,
val uniqueSet2: Int,
) : HasId
@GenerateDataClassPaths
@Serializable
@UniqueSetJankPatch(["uniqueSet1", "uniqueSet2", ":", "uniqueSet3", "uniqueSet4"])
data class UniqueSetJankClass(
override val _id: Int,
val uniqueSet1: Int,
val uniqueSet2: Int,
val uniqueSet3: Int,
val uniqueSet4: Int,
) : HasId
@GenerateDataClassPaths
@Serializable
@UniqueSetJankPatch(["uniqueSet1", "uniqueSet2", ":", "uniqueSet3", "uniqueSet4"])
data class UniqueComboJankClass(
override val _id: Int,
@Unique val unique1: Int,
val uniqueSet1: Int,
val uniqueSet2: Int,
val uniqueSet3: Int,
val uniqueSet4: Int,
) : HasId