Clients database structure
Version | Change |
---|---|
v1.0 | Initial version |
v1.2 | Updated structure |
Here you will find an explanation of how the clients are set up in hub_alpha
. This will be an overview just to grasp the idea of it and every field will be explained and described. This will be deployed to the main (stage or live) machine.
<v1.2>
</v1.2>
This is an example of how the structure between the tables is. This may not reflect on all columns and fields, it is only for clearing the picture of how the connection works.
In terms of our connection to 3C and how we will implement their users. We can map the names of our table to their logic as follows:
<v1.2>
threecolts_app
- this is the name and key for the app. This will be one record with the information provided once an app is added. One for stage and one for prod will be created on their respective machines
threecolts_organization = "3C Organization"
- this the top level. From it we can identify from which organization the requests come from and it is connected to the threecolts_app
with the foreign key threecolts_organization.threecolts_app_id
that points to threecolts_app.id
</v1.2>
client = "3C Account"
- this is the middle level. In one organization we can have multiple account for 3C. And for us every account is a separate database. That is why in this table we are storing the connection to the database. In some cases this will be a separate machine. In this case we are to work with it. This is described how it will happen in the Alpha Integration JWT Token.
user = "3C Users"
- this is the lowest level of access to the system. This is a specific person that has access to Hemi from 3C. The connection between the person and which database is done by client_user
. One user
can have multiple clients
and vise versa.
<v1.2>
The connection between user
and threecolts_organization
is because we need to have an owner of an organization which is a specific person. This is done via the connection between the fields threecolts_organization.organization_owner_id
and user.id
</v1.2>