package com.example.myapplication.api.model

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

@Serializable
data class UserRemote(
    var id: Int,
    val name: String,
    val login: String,
    val password: String
)

fun UserRemote.toUser(): User {
    return User(
        id,
        name,
        login,
        password
    )
}

fun User.toUserRemote(): UserRemote {
    return UserRemote(
        0,
        name,
        login,
        password
    )
}