BmobRoleTable constructor
BmobRoleTable({
- String? name,
- List<
BmobUserTable> users = const [], - List<
BmobRoleTable> roles = const [],
Implementation
BmobRoleTable(
{this.name,
List<BmobUserTable> users = const [],
List<BmobRoleTable> roles = const []}) {
assert(users.isEmpty || !users.any((element) => element.objectId.isEmpty));
assert(roles.isEmpty || !roles.any((element) => element.objectId.isEmpty));
if (users.isNotEmpty) {
_users = BmobRelation(
this,
BmobUserTable(),
'users',
(json) => BmobUserTable().fromJson(json),
users,
);
}
if (roles.isNotEmpty) {
_roles = BmobRelation(
this,
BmobRoleTable(),
'roles',
(json) => BmobRoleTable().fromJson(json),
roles,
);
}
}