User

User Type

Represents a user in the system. Users are authenticated entities that can perform operations within their assigned tenant and roles.

Fields

Field
Type
Description

id

ID!

Unique identifier of the user

createdAt

Time!

Creation timestamp

createdBy

UUID!

User identifier who created this user

updatedAt

Time

Last update timestamp

updatedBy

UUID

User identifier who last updated this user

deletedAt

Time

Deletion timestamp

deletedBy

UUID

User identifier who deleted this user

tenantID

UUID!

Tenant identifier

idpID

String!

Identity provider user identifier

username

String!

Username for the user

email

String!

Email address of the user

firstName

String!

First name of the user

lastName

String!

Last name of the user

isAdmin

Boolean!

Whether the user has administrative privileges

companyID

ID

Associated company identifier

legacyRoles

[String!]!

DEPRECATED: Legacy JSONB column for backward compatibility

company

Company

Associated company

roles

[Role!]

Roles assigned to the user

groups

[Group!]

Groups the user belongs to

Interfaces

  • Node

Usage Example

Relations

  • User N:1 Company: A user belongs to one company

  • User M:N Role: A user can have multiple roles

  • User M:N Group: A user can belong to multiple groups

Authentication

Users are authenticated through external identity providers (IDP) using the idpID field. The system supports role-based access control (RBAC) through the relationships with roles and groups.

Last updated

Was this helpful?