package kz.cafe.db.model;

import java.util.*;
import com.google.code.morphia.annotations.*;
import kz.cafe.constants.*;
import kz.cafe.constants.InterfaceConstants.*;
import kz.cafe.db.model.anotations.*;

@Entity(value="Reservation", noClassnameStored=true, concern = "SAFE")
public class MReservation extends MAbstractEditableDataElement{
   private static final long serialVersionUID = 8054227032088193816L;
   
   
   public static final String F_UID = "UID";
   public static final String F_CONFIRMED = "confirmed";

   @AnnotationRelated(foreign = MCafe.class)
   public int CID;
   
   @AnnotationRelated(foreign = MUser.class)
   @Indexed
   public int UID;
   
   @AnnotationDate
   @Indexed
   public long date = System.currentTimeMillis();
   
   public int sits;
   
   @AnnotationMultiLangString   
   public Map<InterfaceConstants.LANGS, String> comment = new HashMap<LANGS, String>();
   
   public boolean confirmed; 
   
   
   @Override
   public String humanReadable(InterfaceConstants.LANGS lang){
//      return name.get(lang) + " [" + ID + "]";
      return "Резерв номер " + ID;
   }
}
