Maybe what asking for is easy but I think on wrong why or not,
I want make chat page
my couchdb
is like this:
I had a document "sport" inside it there are many documents for many sport wear company each company had a document on "sport" like document for "Nike" , "Puma" , "Addides" each doc had a rows and there are members for that company:
{
"_id": "nike",
"_rev": "3-74b1cbdb3d7869ee364deb7d28e07895",
"attatch": "Uupload/nike.jpg",
"rows": [
["1", "jack", "12345", "20-11-1978", "100", "jack@yahoo.com"],
["2", "jams", "23578", "20-11-1972", "1", "jams@gmail.com"],
} {
"_id": "puma",
"_rev": "4-74b1cbdb3d7869ee364deb7d28e0778",
"attatch": "Uupload/puma.jpg",
"rows": [
["1", "smath", "12345", "20-8-1974", "2", "smath@yahoo.com"],
["2", "puter", "23578", "7-7-1980", "1", "puter@gmail.com"],
}
what i want is chat room but every one login must just chat with his ppl on his doc , mean the ppl on "pume" just talk with each other no one from "nike" inter there session, i handle login issue , the ppl when they login they must be chose the company like "nike" and user "jack" pw "12345" its ok with that but that will not work with chat all will be in the page
if i create a user on _users doc it will make a session but just for user not for company, and if i do that how can i handle grouping the ppl on same company