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

import androidx.room.TypeConverter;

import java.math.BigDecimal;

public class BigDecimalConverter {
    @TypeConverter
    public static BigDecimal fromFloat(Float value) {
        return value == null ? null : BigDecimal.valueOf(value.doubleValue());
    }

    @TypeConverter
    public static Float dateToTimestamp(BigDecimal value) {
        return value == null ? null : value.floatValue();
    }
}
