Files

18 lines
462 B
Python
Raw Permalink Normal View History

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
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-20 17:35:15 +01:00
2020-07-28 10:18:47 +01:00
def dao_add_and_commit_guest_list_contacts(objs):
db.session.add_all(objs)
db.session.commit()
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()