ortonomy / fling-server

fling-server is a node.js postgraphql backend for a flingapp front-end.
GNU General Public License v3.0
1 stars 3 forks source link

DB Organization level #5

Closed Jskobos closed 7 years ago

Jskobos commented 7 years ago

Should there be a top-level 'Organization' relation in the database?

ortonomy commented 7 years ago

YES!

I had this thought exactly too. I see two scenarios for the software use which would impact this choice:

1) running this software as a service on a site: (i've already registered fling.work) where admins can register their company and book of freelancers. In this case, they'd definitely need to tell the system their organization and all future projects and freelancers would be attached to that.

(Of course there's a future case where a freelancer has one account on the site, but many organisations, but we'll skip that for now)

2) someone downloads the code and runs their own fling app locally. If this is the case, unless they're trying to run different teams of freelancers across different departments, we won't necessarily need to do this... as each instance of fling will necessarily be a different organisation!?

I lean toward 1) as it's the most scalable. And in that case, I think we'd need it. It also allows admins in scenario 2) to use the organisational structure maybe for different teams.

ortonomy commented 7 years ago

So...

let org = {
  name: 'Company 1',
  admin: userID,
  members: [userID1, userID2, userID3, ...], // potentially combined based on discussions in issue #6
  projects: [projectID1, projectID2]
}
Jskobos commented 7 years ago

This sounds good. Better to build something flexible and scalable. I've added the organization relation to the database.