I am building a project in which i make use of status messages
There are two entity groups - Restaurants and Users.
Both can have status messages and both can comment on each other. I am in a fix as to how to get it working with these two entity blocks..
Here goes my try
restaurants (id, name, ...... )
users (id, name, .... )
status_messsage (id, message, timestamp )
status_owner (id, status_message_id, by_type, by_id)
by_type ( id, group_name ) => (1, users), (2, restaurants)
by_id => will be the user id or restaurant_id
i feel this is a little messed up. is there a better solution.