Chat DB Design

PHOTO EMBED

Sun Mar 06 2022 15:55:10 GMT+0000 (UTC)

Saved by @technoking #database

Inbox
id, userId(holder of this account), senderId, lastMessage

Chat
id, senderId, recieverId, message, seen, deleted

//
DB query when inbox is opened
findall where userId = senderId or userid = receiverId
content_copyCOPY