handle method

Future handle(
  1. dynamic model
)

Implementation

Future<dynamic> handle(model) async {
  dynamic value;

  if (type == RelationType.belongsTo) {
    value = await belongsTo(model);
  } else if (type == RelationType.hasMany) {
    value = await hasMany(model);
  } else if (type == RelationType.hasOne) {
    value = await hasOne(model);
  }

  return value;
}