How do I implement a messaging system for members of my website to communicate with each other? [closed]
I have a fully functional website, to which I want to add the ability for members to email each other, kinda like facebook, but much smaller, so I won't need their need for huge traffic.
Basical开发者_如何学运维ly I need a starting point. Any suggestions?
First step is to design the tables to store the mail objects.
One approach which works is to set up a mail "hasMany" children relationship, which basically means that a single mail object will have an id column and a self-referential parent_id column like this:
mail:
id , parent_id, create_time , from_user_id , to_user_id , textual_content
or something similar.
精彩评论