how to name polimorphic table

Published 8 months ago by jimmy0699

how to name polimorphic table with info about user have see/read things ? like message, notifcation, article etc...


Hi @jimmy0699

What about user_has_seen? user_id, model, model_id ... Something that give enough meaning just reading the table.

Hope this helps.

Regards, Adrian


or user_saw, or just seen cant decide ;(


@jimmy0699 You could go with something like user_content_views with the following columns:

  • user_id
  • content_id
  • content_type

And then use the created_at column to determine when they read/saw the message, notification, article etc.

Please sign in or create an account to participate in this conversation.