package com.example.myapplication.api.rent.remote

import com.example.myapplication.api.item.remote.ItemFromRentRemote
import com.example.myapplication.database.room.model.rent.Rent
import kotlinx.serialization.Serializable

@Serializable
data class RentRemote(
    val id: Int = 0, val userId: Int = 0, var items: List<ItemFromRentRemote> = emptyList()
)

fun RentRemote.toRent(): Rent = Rent(
    id, userId
)

fun Rent.toRentRemote(): RentRemote = RentRemote(
    uid, userId!!, items = emptyList()
)