Role - Permission

The RolePermission table is designed to store the relationship between roles and permissions. Each record represents a role that has been granted a specific permission.

Table Structure
  • [ID] (bigint, auto-incrementing, primary key): Represents the unique identifier for each record.

  • [Role_ID] (bigint, not null): Represents the ID of the role associated with the permission.

  • [Permission_ID] (bigint, not null): Represents the ID of the permission associated with the role.

  • [Modified_By] (bigint, nullable): Represents the ID of the user who last modified the record.

  • [Modified_Date] (datetime, not null): Represents the date and time when the record was last modified.

  • [Created_By] (bigint, nullable): Represents the ID of the user who created the record.

  • [Created_Date] (datetime, not null): Represents the date and time when the record was created.

Constraints
  • [PK_RolePermission]: Primary key constraint on the [ID] column.

  • [DF_RolePermission_ModifiedDate]: Default constraint to set [Modified_Date] to the current UTC date and time.

  • [DF_RolePermission_CreatedDate]: Default constraint to set [Created_Date] to the current UTC date and time.

  • [FK_RolePermission_Permission]: Foreign key constraint on the [Permission_ID] column, referencing the [ID] column of the [JFW].[Permission] table.

  • [FK_RolePermission_Role]: Foreign key constraint on the [Role_ID] column, referencing the [ID] column of the [JFW].[Role] table.

Usage

The RolePermission table is used to:

  • Store the relationship between roles and permissions.

Last updated

Was this helpful?