-
Notifications
You must be signed in to change notification settings - Fork 2
/
Test.kt
36 lines (29 loc) · 868 Bytes
/
Test.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package dev.inmo.micro_utils.repos.generator.test
import dev.inmo.micro_utils.repos.annotations.GenerateCRUDModel
import dev.inmo.micro_utils.repos.annotations.GenerateCRUDModelExcludeOverride
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmInline
@Serializable
@JvmInline
value class TestId(
val long: Long
)
typealias ParentTypeId = TestId
@GenerateCRUDModel(IRegisteredTest::class)
sealed interface Test {
val property1: String
val property2: Int
@Serializable
@SerialName("custom_parent_name")
val parent: ParentTypeId?
@GenerateCRUDModelExcludeOverride
val excludedProperty: String
get() = "excluded"
}
sealed interface IRegisteredTest : Test {
val id: TestId
@GenerateCRUDModelExcludeOverride
val excludedProperty2: Boolean
get() = false
}