package com.gh.vspace.db

import android.os.Parcelable
import androidx.room.Entity
import androidx.room.PrimaryKey
import com.lightgame.download.DownloadEntity
import kotlinx.parcelize.Parcelize

@Parcelize
@Entity(tableName = "v_game")
data class VGameEntity(
    @PrimaryKey
    var packageName: String,
    var downloadEntity: DownloadEntity,
) : Parcelable {
    companion object {
        fun from(downloadEntity: DownloadEntity): VGameEntity {
            return VGameEntity(downloadEntity.packageName, downloadEntity)
        }
    }
}