function relationships(table, cb) {
  const relationships2 = cb({ many, one });
  return {
    name: table.schema.name,
    relationships: relationships2
  };
}
function many(...args) {
  return args.map((arg) => ({
    sourceField: arg.sourceField,
    destField: arg.destField,
    destSchema: arg.destSchema.schema.name,
    cardinality: "many"
  }));
}
function one(...args) {
  return args.map((arg) => ({
    sourceField: arg.sourceField,
    destField: arg.destField,
    destSchema: arg.destSchema.schema.name,
    cardinality: "one"
  }));
}
export {
  relationships
};
//# sourceMappingURL=relationship-builder.js.map
