2016-09-20 17:35:15 +01:00
|
|
|
from app import db
|
2020-07-28 10:22:13 +01:00
|
|
|
from app.models import ServiceGuestList
|
2016-09-20 17:35:15 +01:00
|
|
|
|
2016-09-22 17:17:34 +01:00
|
|
|
|
2020-07-28 10:18:47 +01:00
|
|
|
def dao_fetch_service_guest_list(service_id):
|
2020-07-28 10:22:13 +01:00
|
|
|
return ServiceGuestList.query.filter(
|
|
|
|
|
ServiceGuestList.service_id == service_id).all()
|
2016-09-22 17:17:34 +01:00
|
|
|
|
|
|
|
|
|
2020-07-28 10:18:47 +01:00
|
|
|
def dao_add_and_commit_guest_list_contacts(objs):
|
2016-09-22 17:17:34 +01:00
|
|
|
db.session.add_all(objs)
|
|
|
|
|
db.session.commit()
|
2016-09-20 17:35:15 +01:00
|
|
|
|
|
|
|
|
|
2020-07-28 10:18:47 +01:00
|
|
|
def dao_remove_service_guest_list(service_id):
|
2020-07-28 10:22:13 +01:00
|
|
|
return ServiceGuestList.query.filter(
|
|
|
|
|
ServiceGuestList.service_id == service_id).delete()
|