Files
notifications-api/app
Alexey Bezhan cbce610098 Add template.service_letter_contact_id and reply_to wrapper property
Adds a relationship between Template models and service letter contact
blocks.

Depending on template type, we can have a reference to either a letter
contact block, email reply-to address or SMS sender record. This means
that in order to enforce foreign key constraints we need to define three
separate foreign key columns on the template model.

To hide this implementation detail and make it easier to access the
sender/reply-to information we define a wrapper property that returns
the value from the correct column.

The relationship and the property are only defined for letter templates
at the moment.

The setter raises an error when trying to assign a reply_to value for
non-letter templates. The exception isn't raised if the value being
assigned is `None` since it can get assigned by marshmallow schemas
and as it matches the value returned for other template types it
doesn't need to be written anywhere.
2017-11-22 14:20:53 +00:00
..
2017-11-21 14:12:35 +00:00
2017-11-10 10:49:44 +00:00
2017-11-16 17:46:41 +00:00
2017-11-21 14:12:35 +00:00
2017-11-09 14:55:45 +00:00