flaschengeist/geruecht/controller/mainController/mainFreeDrinkListConfigCont...

52 lines
1.9 KiB
Python

import geruecht.controller.databaseController as dc
from geruecht.logger import getDebugLogger
from datetime import datetime
db = dc.DatabaseController()
debug = getDebugLogger()
class Base:
def get_free_drink_list_configs(self):
return db.get_free_drink_list_configs()
def set_free_drink_list_config(self, data):
return db.set_free_drink_list_config(data)
def update_free_drink_list_config(self, data):
return db.update_free_drink_list_config(data)
def delete_free_drink_list_config(self, data):
return db.delete_free_drink_list_config(data)
def set_free_drink_list_history(self, user, data):
return db.set_free_drink_list_history(user, data)
def get_free_drink_list_history(self, user):
return db.get_free_drink_list_history_by_user(user)
def delete_free_drink_list_history(self, data):
return db.delete_free_drink_list_history(data)
def update_free_drink_list_history(self, user, data):
db.update_free_drink_list_history(data)
return db.get_free_drink_list_history_by_user(user)
def get_free_drink_list_history_from_to(self, data):
from_date = datetime(data["from_date"]["year"], data["from_date"]["month"], data["from_date"]["day"])
to_date = datetime(data["to_date"]["year"], data["to_date"]["month"], data["to_date"]["day"])
return db.get_free_drink_list_history_from_to(from_date, to_date)
def get_free_drink_list_reasons(self):
return db.get_free_drink_list_reasons()
def set_free_drink_list_reason(self, data):
return db.set_free_drink_list_reason(data)
def update_free_drink_list_reason(self, data):
return db.update_free_drink_list_reason(data)
def delete_free_drink_list_reason(self, data):
return db.delete_free_drink_list_reason(data)
def get_free_drink_types(self):
return db.get_free_drink_list_types()