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

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

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

@Entity(tableName = "minStock")
class MinStockEntity() {

    constructor(minStockBean: MinStockBean) : this() {

        this.barcode = minStockBean.barcode
        this.quantity = minStockBean.quantity
        this.sendStatus = minStockBean.sendStatus
    }

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


    fun getBean(): MinStockBean {
        var minStockBean: MinStockBean = MinStockBean()

        minStockBean.barcode = this.barcode
        minStockBean.quantity = this.quantity
        minStockBean.sendStatus = this.sendStatus

        return minStockBean;
    }
}