add inbound sms table

This commit is contained in:
Leo Hemsted
2017-05-22 11:26:47 +01:00
parent f7e1ccea8b
commit 4a85818c34
9 changed files with 192 additions and 14 deletions

View File

@@ -0,0 +1,7 @@
from app import db
from app.dao.dao_utils import transactional
@transactional
def dao_create_inbound_sms(inbound_sms):
db.session.add(inbound_sms)

View File

@@ -66,6 +66,12 @@ def dao_fetch_service_by_id(service_id, only_active=False):
return query.one()
def dao_fetch_services_by_sms_sender(sms_sender):
return Service.query.filter(
Service.sms_sender == sms_sender
).all()
def dao_fetch_service_by_id_with_api_keys(service_id, only_active=False):
query = Service.query.filter_by(
id=service_id