workouttest_backoffice/aitrainer_backoffice/controlling/automation/notification_hook.py
Tibor Bossanyi (Freelancer) 696ce5a368 V1.30 notification
2021-10-01 15:53:20 +02:00

16 lines
570 B
Python

from ..models.customer import Customer
import datetime
class NotificationHook:
def __init__(self) -> None:
pass
def NotificationSelectAdmins(self):
print(datetime.datetime.now(), " *** START automation NotificationSelectAdmins ")
qs = Customer.objects.raw('SELECT customer_id, firebase_reg_token from customer WHERE admin = 1')
return qs
def NotificationCommonSQL(self, sql):
print(datetime.datetime.now(), " *** START automation NotificationCommonSQL ")
qs = Customer.objects.raw(sql)
return qs