Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

userhierarchy table schema #9

Open
anonymoussprocket opened this issue Apr 16, 2019 · 6 comments
Open

userhierarchy table schema #9

anonymoussprocket opened this issue Apr 16, 2019 · 6 comments
Assignees
Milestone

Comments

@anonymoussprocket
Copy link

Retail users will be sub-accounts of some house userid. PK on this table would be userid+managerid.

Column Data Type Description
userid numeric FK into users table
managerid numeric FK into users table (userid)
effectivedate timestamp record date
@vishakh
Copy link
Contributor

vishakh commented Apr 16, 2019

What is a retail user? What is a 'house userid'?

@anonymoussprocket
Copy link
Author

A retail user is one who signed up straight from the website w/o referral or hand-holding. A non-corp user with just one account.

A house user id is a catch-all to allow enforcement of the not null condition on the manager id field. It would be an account Cryptonomic controls.

@vishakh
Copy link
Contributor

vishakh commented Apr 16, 2019

How is the record for the house user ID inserted?

@ivanopagano
Copy link

Wish list:
manager is an abused term, I'd love if we could better frame the role with a meaningful name, taken from the real-life counterpart domain language.

I find manager simply doesn't convey much about the actual meaning of this relationship

@anonymoussprocket
Copy link
Author

house user id will be baked into the DB init script.

managerid can be called parentid

@ivanopagano
Copy link

Do you imagine the hierarchy tree to be 2-level deep or more complex?

Up to now I can imagine

  • Cryptonomic house user catch-all at the same level with other organizations;
  • one level deeper, actual individual user accounts

but I might be framing it all wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants