UserCompanies


Description

Join Table between Users and Companies.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 public.gen_random_uuid()
Orders.userCompanyId Orders_userCompanyId_fkey N
PointsTopUpOrders.userCompanyId PointsTopUpOrders_userCompanyId_fkey N
JobNotificationReceiverDrafts.ReceiverId JobNotificationReceiverDrafts_ReceiverId C
JobNotificationReceivers.ReceiverId JobNotificationReceivers_ReceiverId C
UserCompanyRoleLogs.userCompanyId UserCompanyRoleLogs_userCompanyId_fkey C

Primary Key.

createdAt timestamptz 35,6 null

Entry creation date

updatedAt timestamptz 35,6 null

Datetime of last modification to any attribute

UserId uuid 2147483647 null
Users.id UserCompanies_UserId_fkey C

Foreign Key to User Table.

CompanyId uuid 2147483647 null
Companies.id UserCompanies_CompanyId_fkey R

Foreign Key to Company Table.

role enum_UserCompanies_role 2147483647 'ADMIN'::"enum_UserCompanies_role"

Role of user in company which determines their permissions (eg. ADMIN, RECRUITER).

Indexes

Constraint Name Type Sort Column(s)
UserCompanies_pkey Primary key Asc id
UserCompanies_UserId_CompanyId_key Must be unique Asc/Asc UserId + CompanyId

Relationships