package dev.inmo.postssystem.features.content.common

import kotlinx.serialization.Serializable
import kotlinx.serialization.modules.PolymorphicModuleBuilder

/**
 * That is a content which in fact just a link to another content. It would be useful in case when user wish to reuse
 * some content
 */
@Serializable
data class OtherContentLinkContent(
    val otherId: ContentId
) : Content

object OtherContentSerializerModuleConfigurator : ContentSerializersModuleConfigurator.Element {
    override fun PolymorphicModuleBuilder<Content>.invoke() {
        subclass(OtherContentLinkContent::class, OtherContentLinkContent.serializer())
    }
}
