From a9c67f2abe31d6777c01e1f59a3d2f7289e545d6 Mon Sep 17 00:00:00 2001 From: "Notmoo-PC\\Notmoo" Date: Tue, 23 Jan 2018 17:23:36 +0100 Subject: [PATCH] [CORE] Ajout package common_ressources.statistics --- .../statistics/StatisticFieldType.java | 6 ++++ .../statistics/StatisticFields.java | 29 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 Workspace/core/src/main/java/com/pqt/core/common_resources/statistics/StatisticFieldType.java create mode 100644 Workspace/core/src/main/java/com/pqt/core/common_resources/statistics/StatisticFields.java diff --git a/Workspace/core/src/main/java/com/pqt/core/common_resources/statistics/StatisticFieldType.java b/Workspace/core/src/main/java/com/pqt/core/common_resources/statistics/StatisticFieldType.java new file mode 100644 index 00000000..0e90a064 --- /dev/null +++ b/Workspace/core/src/main/java/com/pqt/core/common_resources/statistics/StatisticFieldType.java @@ -0,0 +1,6 @@ +package com.pqt.core.common_resources.statistics; + +public enum StatisticFieldType { + SIMPLE, + LIST +} diff --git a/Workspace/core/src/main/java/com/pqt/core/common_resources/statistics/StatisticFields.java b/Workspace/core/src/main/java/com/pqt/core/common_resources/statistics/StatisticFields.java new file mode 100644 index 00000000..e09f7342 --- /dev/null +++ b/Workspace/core/src/main/java/com/pqt/core/common_resources/statistics/StatisticFields.java @@ -0,0 +1,29 @@ +package com.pqt.core.common_resources.statistics; + +public enum StatisticFields { + + TOTAL_SALE_WORTH("total_sale_worth", StatisticFieldType.SIMPLE), + TOTAL_SALE_AMOUNT("total_sale_amount", StatisticFieldType.SIMPLE), + TOTAL_MONEY_MADE("total_money_made", StatisticFieldType.SIMPLE), + TOP_POPULAR_PRODUCTS("top_popular_products", StatisticFieldType.LIST), + STAFF_SALE_WORTH("staff_sale_worth", StatisticFieldType.SIMPLE), + STAFF_SALE_AMOUNT("staff_sale_amount", StatisticFieldType.SIMPLE), + GUEST_SALE_WORTH("guest_sale_worth", StatisticFieldType.SIMPLE), + GUEST_SALE_AMOUNT("guest_sale_amount", StatisticFieldType.SIMPLE); + + private final String str; + private final StatisticFieldType type; + + StatisticFields(String str, StatisticFieldType type) { + this.str = str; + this.type = type; + } + + public String getStr() { + return str; + } + + public StatisticFieldType getType() { + return type; + } +}