GenerateCRUDModel

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class GenerateCRUDModel(val registeredSupertypes: KClass<*>, val serializable: Boolean = true, val generateSerialName: Boolean = true)(source)

Use this annotation and ksp generator (module micro_utils.repos.generator) to create the next hierarchy of models:

  • New model. For example: data class NewTest

  • Registered model. For example: data class RegisteredTest

Parameters

registeredSupertypes

These KClasses will be used as supertypes for registered model

serializable

If true (default) will generate @kotlinx.serialization.SerialName for models with their names as values

See also

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val serializable: Boolean = true