I want to create users dialog
How I must do?
Create one record with sender_id and recipient_id and then “select * from table_dialog where sender_id=current.id or recipient_id =current.id” also add 2 columns deleted_by_sender and deleted_by_recipient
Or create 2 record in database for each dialog
What is the best solution? Or propose your own solution please
If by “dialog” you mean a “conversation between TWO participants”, then it is very similar to classic mailbox. The following code extract(with abbreviation) from one of my project which implements similar functionality. Maybe will be helpful.