英文:
How can I share album between 2 users
问题
我正在使用Android/Java创建一个应用程序,我卡在一个地方,需要在两个用户之间建立连接。
医生和患者之间是一对一的关系,一个医生只能有一个患者,反之亦然。
用户到相册(画廊)之间是一对多的关系,一个用户可以创建多个所需的相册。
现在我的问题是,如何使患者相册在医生的页面上可见,医生的相册应在患者的页面上可见。
我的Firebase现在是这样的,
(图片请参考提供的链接)
现在医生创建的相册是为了患者,因为医生在帮助患者维护他的部分。
我需要知道如何使他们都能查看由他们创建的所有相册。
注意:这两个用户将能够看到这些相册,而新用户将与他们的搭档共享。
英文:
I am creating an application using Android/Java, and I am stuck at a place where I need to make connection between 2 users.
Doctor and patient it is 1-to-1 relation 1 doctor can only have 1 patient and vice versa.
User to Album(Gallery) it is 1 to many relation 1 user can create as many albums as he needs..
Now my query is how can i make patient album to be visible with doctors page and doctor's album should be visible on patients page.
My Firebase looks like this now,
Now album made by doctor are for patient as doctor is helping patient maintaining his part.
I need to know how can I make both of them view all albums created by them.
NOTE: the albums will be visible to these 2 users and not to new users, new users will be sharing with their pair mate.
专注分享java语言的经验与见解,让所有开发者获益!
评论