package it.integry.integrywmsnative.core.data_store.db.entity;

import android.provider.BaseColumns;

import androidx.room.ColumnInfo;
import androidx.room.PrimaryKey;

import java.util.Date;

public abstract class BaseSyncDTO extends BaseRoomDTO {


    public static class Columns {
        public static final String ID = BaseColumns._ID;
        public static final String COLUMN_REMOTE_SYNC_DATE = "remote_sync_date";
    }

    /** The unique ID of the cheese. */
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(index = true, name = Columns.ID)
    private Long id;

    @ColumnInfo(name = Columns.COLUMN_REMOTE_SYNC_DATE)
    private Date remoteSyncDate;

    public Long getId() {
        return id;
    }

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

    public Date getRemoteSyncDate() {
        return remoteSyncDate;
    }

    public void setRemoteSyncDate(Date remoteSyncDate) {
        this.remoteSyncDate = remoteSyncDate;
    }

    public boolean isSyncronized() {
        return getRemoteSyncDate() != null;
    }
}
