columnDefinitions property

  1. @override
Map<String, String> get columnDefinitions
override

Column definitions for the user/role pivot table.

The pivot stores two required integer foreign keys:

  • user_id
  • role_id

Example:

final columns = pivot.columnDefinitions;
print(columns['user_id']); // INTEGER NOT NULL
print(columns['role_id']); // INTEGER NOT NULL

Implementation

@override
 Map<String, String> get columnDefinitions => {
  'user_id': 'INTEGER NOT NULL',
  'role_id': 'INTEGER NOT NULL',
};
set columnDefinitions (Map<String, String> value)
inherited

Column definitions specific to the pivot relationship.

Implementations typically define the two foreign key columns required by the relationship.

Example:

@override
late final Map<String, String> columnDefinitions = {
  'user_id': 'INTEGER NOT NULL',
  'role_id': 'INTEGER NOT NULL',
};

Implementation

late final Map<String, String> columnDefinitions;