package com.vikashkothary.life.data.model;

import android.os.Parcelable;

import com.google.auto.value.AutoValue;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;

import java.util.Date;

@AutoValue
public abstract class Reminder implements Parcelable {
    public static Builder builder() {
        return new AutoValue_Reminder.Builder();
    }

    public static TypeAdapter<Reminder> typeAdapter(Gson gson) {
        return new AutoValue_Reminder.GsonTypeAdapter(gson);
    }

    public abstract long id();

    public abstract String message();

    public abstract Date datetime();

    @AutoValue.Builder
    public abstract static class Builder {
        public abstract Builder setId(long id);

        public abstract Builder setMessage(String message);

        public abstract Builder setDatetime(Date datetime);

        public abstract Reminder build();
    }
}

@@ -37,16 +37,81 @@
 model;%0A%0A
+import android.app.Notification;%0Aimport android.content.Context;%0A
 import a
@@ -263,16 +263,105 @@
 .Date;%0A%0A
+import static com.vikashkothary.life.util.NotificationFactory.createSimpleNotification;%0A%0A
 @AutoVal
@@ -665,20 +665,19 @@
 bstract 
-long
+int
  id();%0A%0A
@@ -707,56 +707,220 @@
 ing 
-message();%0A%0A    public abstract Date datetime();
+title();%0A%0A    public abstract String text();%0A%0A    public abstract Date datetime();%0A%0A    public Notification notification(Context context) %7B%0A        return createSimpleNotification(context, title(), text());%0A    %7D
 %0A%0A  
@@ -1071,14 +1071,12 @@
  set
-Messag
+Titl
 e(St
@@ -1084,15 +1084,68 @@
 ing 
-message
+title);%0A%0A        public abstract Builder setText(String text
 );%0A%0A

Add notification function to reminder model