package com.example.myapplication.api.bike.remote

import com.example.myapplication.database.room.model.bike.Bike
import kotlinx.serialization.Serializable

@Serializable
data class BikeRemote(
    val id: Int = 0,
    val name: String = "",
    val description: String = "",
    val image: ByteArray? = null
)

fun BikeRemote.toBike(): Bike = Bike(
    id,
    name,
    description,
    image
)

fun Bike.toBikeRemote(): BikeRemote = BikeRemote(
    uid,
    name,
    description,
    image
)