tbl_rolemaster

7 rows


Description

Module: HRMS Role Module
Purpose: Defines and manages all user roles and their permissions within the HRMS system.
Data: Each row represents a distinct role with specific access rights and privileges that can be assigned to users.
Process Usage:
- Used by the security framework to determine user permissions and access levels across all system modules.
- Serves as the foundation for role-based access control (RBAC) throughout the application.
Key Points:
- Integrates with the Many-to-Many relationship with users through the user_roles junction table.
- Supports hierarchical role differentiation and company-specific role configurations.
Business Impact: Central to security management, ensures proper segregation of duties, and enables scalable permission management across the organization.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
roleid serial 10 nextval('tbl_rolemaster_roleid_seq'::regclass)
tbl_rolemasterhistory.roleid Implied Constraint R
tbl_userlogin.roleid fk__tbl_userl__rolei__50a4998c R
tbl_userlogin_bkp2023121.roleid Implied Constraint R
tbl_userrole.roleid Implied Constraint R
tbl_userrolemaster.roleid fk__tbl_userr__rolei__53810637 R

Primary key
Format: Integer (auto-increment)
Used as: Unique identifier for each role definition.

rolename varchar 50 null

Type: Varchar
Meaning: The unique name identifier for the role (e.g., “ROLE_ADMIN”, “ROLE_MANAGER”).
Usage: Used in code and configuration to reference specific roles.

rolediscription varchar 500 null

Type: Varchar
Meaning: Detailed description of the role’s purpose, responsibilities, and scope.
Usage: Provides contextual information for administrators assigning roles.

roledate timestamp 29,6 null

Type: Date
Meaning: The date when the role was originally created or effective from.
Usage: Tracks role lifecycle and versioning for audit purposes.

rolestatus bool 1 null

Type: Boolean
Meaning: Indicates whether the role is currently active and available for assignment.
Usage: Allows for temporary deactivation of roles without deleting them.

roletype int4 10 null

Type: Integer
Meaning: Categorizes the role by type or level within the organizational hierarchy.
Usage: Enables role grouping and hierarchical permission structures.

companyid int4 10 null
tbl_companymaster.companyid Implied Constraint R

FK: public.tbl_company.companyid
Meaning: Associates the role with a specific company in multi-tenant environments.
Usage: Enables company-specific role customization and isolation.

rolediff bool 1 false

Type: Boolean
Meaning: Flags whether this role has differentiated permissions or special characteristics.
Usage: Identifies roles that require special handling in permission checks.

createdby varchar 50 null
createddate timestamp 29,6 null
modifiedby varchar 50 null
modifieddate timestamp 29,6 null

Indexes

Constraint Name Type Sort Column(s)
tbl_rolemaster_pk_tbl_role Primary key Asc roleid

Relationships