package com.example.myapplication.api.model

import com.example.myapplication.database.entities.Category
import kotlinx.serialization.Serializable

@Serializable
data class CategoryRemote(
    val id: Int = 0,
    val name: String,
)

fun CategoryRemote.toCategory(): Category = Category(
    id,
    name,
)

fun Category.toCategoryRemote(): CategoryRemote = CategoryRemote(
    id!!,
    name,
)