package kz.cafe.db.model;

import kz.cafe.db.model.anotations.*;
import com.google.code.morphia.annotations.*;

public abstract class MAbstractEditableDataElement extends MAbstractDataElement{
   private static final long serialVersionUID = 2339927771241139334L;
   
   
   @AnnotationNotExported
   public static final String F_PUBLISHED = "published";
   @AnnotationNotExported
   public static final String F_UPDATED   = "updated";
   
   
   @AnnotationDate
   @Indexed()
   public long updated = System.currentTimeMillis();
   
   
   @AnnotationNotExported
   @Indexed()
   public boolean published = false;

   @Override
   public String toString(){
      StringBuilder builder = new StringBuilder();
      builder.append(this.getClass().getName())
             .append(", ID=").append(super.ID);
      return builder.toString();
   }
   
   
   
}
