Task #41
openUser & Role Management
0%
Description
This module manages system users and their roles. It supports different access levels such as Public users, Admin staff, and Super Admin. Public users can log in using OTP, while Admin users use password-based authentication.
***Table: table_roles
Field Type Description
id BIGINT (PK) Unique role identifier
name VARCHAR(50) Role name (SUPER_ADMIN, ADMIN, STAFF, PUBLIC)
description TEXT Description of the role
created_at TIMESTAMP Role creation date
***Table: table_users
Field Type Description
id BIGINT (PK) Unique user ID
role_id BIGINT (FK → roles.id) Role assigned to the user
name VARCHAR(150) User full name
mobile VARCHAR(15) Mobile number
email VARCHAR(150) Email address
password TEXT Encrypted password (nullable for public users)
is_active BOOLEAN User active status
last_login TIMESTAMP Last login time
created_at TIMESTAMP Account creation date
***Validations
*Role must exist before assigning to user
*Mobile number must be unique
*Email format validation
*Password must be encrypted (hashed)
*Public users can have password = NULL
*Only active users can log in
Updated by Gokul G about 2 months ago
- Status changed from In Progress to Resolved