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

com.c0x12c.featureflag.entity.FeatureFlag.kt Maven / Gradle / Ivy

There is a newer version: 0.3.0
Show newest version
package com.c0x12c.featureflag.entity

import com.c0x12c.featureflag.models.FeatureFlagType
import com.c0x12c.featureflag.models.MetadataContent
import com.c0x12c.featureflag.serializer.InstantSerializer
import com.c0x12c.featureflag.serializer.UuidSerializer
import kotlinx.serialization.Serializable
import java.time.Instant
import java.util.UUID

@Serializable
data class FeatureFlag(
  @Serializable(with = UuidSerializer::class)
  val id: UUID = UUID.randomUUID(),
  val name: String,
  val code: String,
  val description: String? = null,
  val enabled: Boolean = false,
  val type: FeatureFlagType = FeatureFlagType.TOGGLE,
  val metadata: MetadataContent? = null,
  @Serializable(with = InstantSerializer::class)
  val createdAt: Instant = Instant.now(),
  @Serializable(with = InstantSerializer::class)
  val updatedAt: Instant? = null,
  @Serializable(with = InstantSerializer::class)
  val deletedAt: Instant? = null
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy