/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 */
package com.runicgateway.app.data.api.dto

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

/**
 * `GET /public/posts/:category` (list) and `/public/posts/:category/:idOrSlug`
 * (detail). One shape serves both; the list omits nothing the app renders. The
 * `body` (HTML) is present on the detail response and rendered there.
 */
@Serializable
data class PostDto(
    val id: Long,
    /** Stored DB category (`news | five_on_friday | newsletter | screenshot`). */
    val category: String = "",
    val title: String = "",
    val slug: String? = null,
    val excerpt: String? = null,
    val body: String? = null,
    @SerialName("image_url") val imageUrl: String? = null,
    @SerialName("published_at") val publishedAt: String? = null,
    @SerialName("created_at") val createdAt: String? = null,
)
