diff --git a/database/src/main/java/com/firebase/ui/database/Timestamp.java b/database/src/main/java/com/firebase/ui/database/Timestamp.java new file mode 100644 index 000000000..7f6938c1d --- /dev/null +++ b/database/src/main/java/com/firebase/ui/database/Timestamp.java @@ -0,0 +1,25 @@ +package com.firebase.ui.database; + +import com.google.firebase.database.Exclude; +import com.google.firebase.database.PropertyName; +import com.google.firebase.database.ServerValue; + +import java.util.Map; + +public class Timestamp { + private long mTimestamp; + + @PropertyName("timestamp") + protected Map getServerValue() { + return ServerValue.TIMESTAMP; + } + + @Exclude + public long getTimestamp() { + return mTimestamp; + } + + protected void setTimestamp(long time) { + mTimestamp = time; + } +}