RelationDefinition<T extends KhademModel<T>> constructor

RelationDefinition<T extends KhademModel<T>>({
  1. required RelationType type,
  2. required String relatedTable,
  3. required String localKey,
  4. required String foreignKey,
  5. required T factory(),
  6. String? ownerKey,
  7. String? relatedKey,
  8. String? pivotTable,
  9. String? foreignPivotKey,
  10. String? relatedPivotKey,
  11. String? morphTypeField,
  12. String? morphIdField,
  13. String? throughTable,
  14. String? firstKey,
  15. String? secondKey,
  16. String? secondLocalKey,
  17. dynamic query(
    1. QueryBuilderInterface
    )?,
})

Implementation

RelationDefinition({
  required this.type,
  required this.relatedTable,
  required this.localKey,
  required this.foreignKey,
  required this.factory,
  this.ownerKey,
  this.relatedKey,
  this.pivotTable,
  this.foreignPivotKey,
  this.relatedPivotKey,
  this.morphTypeField,
  this.morphIdField,
  this.throughTable,
  this.firstKey,
  this.secondKey,
  this.secondLocalKey,
  this.query,
});