package kz.cafe.admin;

import java.util.*;
import kz.cafe.admin.constants.AccessConstants.EditMode;
import kz.cafe.admin.panels.model.*;
import kz.cafe.db.model.*;

public abstract class TabAbstractStatistics extends AbstractTab{
   
   private static final long serialVersionUID = 256003898599429323L;



   public TabAbstractStatistics(AdminMain application, Set<EditMode> setMode){
      super(application, setMode);
   }
   
   

   public static void common(CustomDescriptor dscr){     
      
      CustomField field = new CustomField();
      field.visible = true;
      field.search.mode = CustomField.Search.SEARCH_MODES.NONE;
      field.name = "Всего запросов";
      field.db = MAbstractStatistics.F_TOTAL;
      field.isEditable = false;
      field.style.width = 100;
      field.isSortable = true;
      field.search.row = 0;
      dscr.addField(field);
      
      
      
      field = new CustomField();
      field.visible = true;
      field.search.mode = CustomField.Search.SEARCH_MODES.NONE;
      field.name = "Новых Пользователей";
      field.db = MAbstractStatistics.F_USER_NEW;
      field.isEditable = false;
      field.style.width = 100;
      field.isSortable = true;
      field.search.row = 0;
      dscr.addField(field);
      
      
      
      field = new CustomField();
      field.visible = true;
      field.search.mode = CustomField.Search.SEARCH_MODES.NONE;
      field.name = "Попыток входа";
      field.db = MAbstractStatistics.F_LOGINS;
      field.isEditable = false;
      field.style.width = 100;
      field.isSortable = true;
      field.search.row = 0;
      dscr.addField(field);
      
      
      
      field = new CustomField();
      field.visible = true;
      field.search.mode = CustomField.Search.SEARCH_MODES.NONE;
      field.name = "Из них успешных";
      field.db = MAbstractStatistics.F_LOGIN_SUCCESS;
      field.isEditable = false;
      field.style.width = 100;
      field.isSortable = true;
      field.search.row = 0;
      dscr.addField(field);
      
      
      
      
      field = new CustomField();
      field.visible = true;
      field.search.mode = CustomField.Search.SEARCH_MODES.NONE;
      field.name = "Новых Заказов";
      field.db = MAbstractStatistics.F_ORDER_NEW;
      field.isEditable = false;
      field.style.width = 100;
      field.isSortable = true;
      field.search.row = 0;
      dscr.addField(field);
      
      
      
      field = new CustomField();
      field.visible = true;
      field.search.mode = CustomField.Search.SEARCH_MODES.NONE;
      field.name = "Новых Отзывов";
      field.db = MAbstractStatistics.F_FEEDBACK_NEW;
      field.isEditable = false;
      field.style.width = 100;
      field.isSortable = true;
      field.search.row = 0;
      dscr.addField(field);
      
      
      
      field = new CustomField();
      field.visible = true;
      field.search.mode = CustomField.Search.SEARCH_MODES.NONE;
      field.name = "Меню";
      field.db = MAbstractStatistics.F_MENU;
      field.isEditable = false;
      field.style.width = 100;
      field.isSortable = true;
      field.search.row = 0;
      dscr.addField(field);
      

      
      field = new CustomField();
      field.visible = true;
      field.search.mode = CustomField.Search.SEARCH_MODES.NONE;
      field.name = "Отзывы";
      field.db = MAbstractStatistics.F_FEEDBACKS;
      field.isEditable = false;
      field.style.width = 100;
      field.isSortable = true;
      field.search.row = 0;
      dscr.addField(field);
      
      
      field = new CustomField();
      field.visible = true;
      field.search.mode = CustomField.Search.SEARCH_MODES.NONE;
      field.name = "Новости";
      field.db = MAbstractStatistics.F_NEWS;
      field.isEditable = false;
      field.style.width = 100;
      field.isSortable = true;
      field.search.row = 0;
      dscr.addField(field);

      
      field = new CustomField();
      field.visible = true;
      field.search.mode = CustomField.Search.SEARCH_MODES.NONE;
      field.name = "Распродажи";
      field.db = MAbstractStatistics.F_SALES;
      field.isEditable = false;
      field.style.width = 100;
      field.isSortable = true;
      field.search.row = 0;
      dscr.addField(field);
   }
}

