package com.yono.messeripos.models;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.room.Entity;
import androidx.room.PrimaryKey;

import com.google.gson.annotations.SerializedName;

@Entity(tableName = "paymentPending")
public class PaymentPending implements Parcelable {
    @PrimaryKey(autoGenerate = true)
    @SerializedName("id")
    private long id;

    @SerializedName("id_orders")
    private String id_orders;

    @SerializedName("transaction_time")
    private String transaction_time;

    @SerializedName("transaction_status")
    private String transaction_status;

    @SerializedName("payment_methode")
    private String payment_methode;

    @SerializedName("id_nfc")
    private String id_nfc;

    @SerializedName("gross_amount")
    private long gross_amount;

    public PaymentPending() {
    }

    public PaymentPending(long id,
                          String id_orders,
                          String  transaction_time,
                          String transaction_status,
                          String payment_methode,
                          String id_nfc,
                          long gross_amount) {
        this.id = id;
        this.id_orders = id_orders;
        this.transaction_time = transaction_time;
        this.transaction_status = transaction_status;
        this.payment_methode = payment_methode;
        this.id_nfc = id_nfc;
        this.gross_amount = gross_amount;
    }

    protected PaymentPending(Parcel in) {
        id = in.readLong();
        id_orders = in.readString();
        transaction_time = in.readString();
        transaction_status = in.readString();
        payment_methode = in.readString();
        id_nfc = in.readString();
        gross_amount = in.readLong();
    }

    public static final Creator<PaymentPending> CREATOR = new Creator<PaymentPending>() {
        @Override
        public PaymentPending createFromParcel(Parcel in) {
            return new PaymentPending(in);
        }

        @Override
        public PaymentPending[] newArray(int size) {
            return new PaymentPending[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeLong(id);
        parcel.writeString(id_orders);
        parcel.writeString(transaction_time);
        parcel.writeString(transaction_status);
        parcel.writeString(payment_methode);
        parcel.writeString(id_nfc);
        parcel.writeLong(gross_amount);
    }


    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getId_orders() {
        return id_orders;
    }

    public void setId_orders(String id_orders) {
        this.id_orders = id_orders;
    }

    public String getTransaction_time() {
        return transaction_time;
    }

    public void setTransaction_time(String transaction_time) {
        this.transaction_time = transaction_time;
    }

    public String getTransaction_status() {
        return transaction_status;
    }

    public void setTransaction_status(String transaction_status) {
        this.transaction_status = transaction_status;
    }

    public String getPayment_methode() {
        return payment_methode;
    }

    public void setPayment_methode(String payment_methode) {
        this.payment_methode = payment_methode;
    }

    public String getId_nfc() {
        return id_nfc;
    }

    public void setId_nfc(String id_nfc) {
        this.id_nfc = id_nfc;
    }

    public long getGross_amount() {
        return gross_amount;
    }

    public void setGross_amount(long gross_amount) {
        this.gross_amount = gross_amount;
    }
}
