mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -05:00
add inbound sms table
This commit is contained in:
7
app/dao/inbound_sms_dao.py
Normal file
7
app/dao/inbound_sms_dao.py
Normal 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)
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user