I'm designing a notification system for our company, where users can specify if they want to send notifications for different actions or not.
I'm wondering what is the name for this Design Patter, so I can read on it and follow the do and dont's.
Story(requirements): When user takes different actions on our site (app), the actions get posted to their facebook and twitter accounts and and we emailed him also. There are a lot of actions, 6 under Facebook, 6 under Twitter and 12 under email. So it doesn't make sense to make a separate column for each action, specially that their value is by default true.
So for example when user uploads a new image to their page on our website we want to post to their facebook and twitter, that they just upload an image to our app.
My desing for this is a meta_data table with these columns (with examples rows):
id, user_id, namespace, notification, value
0, 1, 'facebook', 'image_upload', false
1, 1, 'twitter', 'video_post', false
2, 10, 'email', 'send_money', false
also for all the actions and their namespaces I add some rows by default to the database when creating the table, where I set all the values to true. Then in users setting page he can see check-boxes for these settings that are all checked by default. Every time the user creates uncheck one, then I create a new row for that user, action and namespace with the value to be false.