This relation is to serve as a cache for wildapricot contact data. This allows us to avoid doing an api request to wildapricot and running into their api request limits. It also affords us proper audit capabilities.
id is the erlef_app_id that is currently generated and stored as an attr in wildapricot. Data is the member struct serialized as json and most likely encrypted. Note that data that is useful for queries and that is not PII will be added as regular columns on said table.
Webhook support is in place atm, but not currently utilized. In addition polling will be put in place to act as a fail safe in case webhooks failed (which they can).
Rules for MVP:
Upon successful login
A member record will be created if one does not exist
Any data that can be considered PII will go into the data column. This column will be an encrypted json string. When a member record is fetched the json string must be decrypted on loaded on to the member struct as Data. A custom ecto typo for this record will probably serve us best so that loading and dumping of data happens automagically. It may be best to use cloak_ecto
the member record will be updated if one exists
It may be we want to do a diff of sorts between the record found and the wildapricot record,
would probably punt on this for now
A if a member is found to be suspended, the record will be set to reflect that the account is deactivated and the member will be redirected to the home page without a session, but with a message informing them their account is deactivated and what to do about it.
This relation is to serve as a cache for wildapricot contact data. This allows us to avoid doing an api request to wildapricot and running into their api request limits. It also affords us proper audit capabilities.
The table would be thus:
{id, data, deactivated, deactivated_at, inserted_at, updated_at}
id is the erlef_app_id that is currently generated and stored as an attr in wildapricot. Data is the member struct serialized as json and most likely encrypted. Note that data that is useful for queries and that is not PII will be added as regular columns on said table.
Webhook support is in place atm, but not currently utilized. In addition polling will be put in place to act as a fail safe in case webhooks failed (which they can).
Rules for MVP:
Data
. A custom ecto typo for this record will probably serve us best so that loading and dumping of data happens automagically. It may be best to use cloak_ecto