Users

System User Accounts

This table stores the primary records for all system users, including their login credentials and basic profile information.

Column Definitions

Column Data Type Description Constraints
idBIGINTPrimary key for the user.PK, Auto-Increment
nameVARCHAR(255)The full name of the user.NOT NULL
emailVARCHAR(255)The user's unique email address for login.NOT NULL, UNIQUE
passwordVARCHAR(255)The user's hashed password.NOT NULL

Relationships

  • Each user can have many personal_access_tokens for API access.
  • Users are assigned roles through the model_has_roles pivot table, linking to roles.
  • Users can be granted permissions directly via the model_has_permissions pivot table, linking to permissions.
  • Each user belongs to one branch.