toMetaJson method

  1. @override
Map<String, dynamic> toMetaJson()
override

Serializes the role into a metadata-oriented JSON map.

Includes the database id and model uuid.

Example:

final meta = role.toMetaJson();
print(meta['id']);
print(meta['uuid']);

Implementation

@override
Map<String, dynamic> toMetaJson() {
  return {'id': id, 'uuid': uuid, 'name': name, 'description': description};
}