![]() ![]() Honestly I cannot find a way to achieve this without having columns that will be equal to null in most of the cases. Text anyone from anywhere across devices. Also, I need to tell who is sending the message (because our customer service department can send messages to registered/guest users). Messages is a simple, helpful messaging app that keeps you connected with the people who matter most. My problem is: guest users won't have a record in the users table, so I cannot just have a user_id field on the messages tables. The tables will contain a column created_at. This means I will need to store all first name, last name, email and mobile phone for them (creating redundant data in the case of registered users, because I already have that data for them) ![]() ![]() But, when we add guest users, the user_id is useless, because they are not registered (so no user id). Everything is fine when there are only registered users and customer service members: I just need to relate each message to a user_id as sender or receiver. I started the design but I'm completely stuck at the moment. This means that they can reply to messages but also can "start" the conversation (example: A message asking to confirm/update details). The customer service department can contact any user (registered or not) at any time.The customer service department needs to able to reply to any message.The messages can come from 1) a contact form available in the Contact page of the website where are asked fist name, last name, email, mobile phone, subject and message and 2) emails sent by users (then the system will receive the emails via webhook and store them properly). Web Services Reliable Messaging (WSRM) ensures that message exchange is performed correctly - without messages getting lost or being duplicated.The messages will be received by the customer service department (this means that customers can't send messages to other customers).The system needs to allow both registered users and guests send messages.I'm trying to create a very simple messaging system using PHP and MySQL but I'm having some issues to decide how to structure things here.
0 Comments
Leave a Reply. |