UserRolePivotTable class
Pivot table linking User and Role models.
UserRolePivotTable defines the intermediate SQLite pivot schema used for
many-to-many user/role relationships.
This type stores the related user_id and role_id values and inherits
common pivot metadata such as id, createdAt, and updatedAt.
Example:
final pivot = UserRolePivotTable()
..userID = 1
..roleID = 2;
print(pivot.name); // user_role
- Inheritance
-
- Object
- PivotTable<
User, Role> - UserRolePivotTable
Constructors
Properties
-
columnDefinitions
↔ Map<
String, String> -
Column definitions for the user/role pivot table.
getter/setter pairinherited-setteroverride-getter
- createdAt ↔ DateTime?
-
Timestamp indicating when the pivot record was created.
getter/setter pairinherited
- disk ↔ DatabaseDisk
-
Storage backend used by this pivot table.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ int?
-
Primary key value for the pivot record, when applicable.
getter/setter pairinherited
- name → String
-
Returns the inferred pivot table name for
TandU.no setterinherited - roleID ↔ dynamic
-
Foreign key pointing to the related Role.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- updatedAt ↔ DateTime?
-
Timestamp indicating when the pivot record was last updated.
getter/setter pairinherited
- userID ↔ dynamic
-
Foreign key pointing to the related User.
latefinal
Methods
-
migrate(
{DatabaseDisk disk = Model.defaultDisk}) → Future< void> -
Migrates the pivot table schema for the selected
disk.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes the pivot record into a JSON-compatible map.
override
-
toMetaJson(
) → Map< String, dynamic> -
Serializes the pivot record into a metadata-oriented JSON map.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited