16 lines
570 B
Python
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 |