how to name polimorphic table

Published 2 weeks ago by jimmy0699

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

AdrianHernandezLopez

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

jimmy0699

or user_saw, or just seen cant decide ;(

martinbean

@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.