package `in`.techware.carrefour.dbUtils.entity

import `in`.techware.carrefour.model.OutOfStockBean
import android.arch.persistence.room.ColumnInfo
import android.arch.persistence.room.Entity
import android.arch.persistence.room.PrimaryKey

/**
 * Created by Jemsheer K D on 29 July, 2018.
 * Package `in`.techware.carrefour.dbUtils.entity
 * Project Carrefour
 */

@Entity(tableName = "outOfStock")
class OutOfStockEntity() {

    constructor(outOfStockBean: OutOfStockBean) : this() {

        this.barcode = outOfStockBean.barcode
        this.sendStatus = outOfStockBean.sendStatus
    }

    @ColumnInfo(name = "id")
    @PrimaryKey()
    var barcode: String = ""
    var sendStatus: Int = 0


    fun getBean(): OutOfStockBean {
        var outOfStockBean: OutOfStockBean = OutOfStockBean()

        outOfStockBean.barcode = this.barcode
        outOfStockBean.sendStatus = this.sendStatus

        return outOfStockBean;
    }
}