toEntity method
Implementation
@override
MenuDefEntity toEntity({String? appId}) {
return MenuDefEntity(
appId: appId,
name: (name != null) ? name : null,
menuItems: (menuItems != null)
? menuItems!.map((item) => item.toEntity(appId: appId)).toList()
: null,
admin: (admin != null) ? admin : null,
);
}