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 |
|---|---|---|---|
| id | BIGINT | Primary key for the user. | PK, Auto-Increment |
| name | VARCHAR(255) | The full name of the user. | NOT NULL |
| VARCHAR(255) | The user's unique email address for login. | NOT NULL, UNIQUE | |
| password | VARCHAR(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_rolespivot table, linking to roles. - Users can be granted permissions directly via the
model_has_permissionspivot table, linking to permissions. - Each user belongs to one branch.