| 1 | <?php |
||
| 14 | trait TablesTrait |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Get table linked with source relation model. |
||
| 18 | * |
||
| 19 | * @param SchemaBuilder $builder |
||
| 20 | * |
||
| 21 | * @return AbstractTable |
||
| 22 | * |
||
| 23 | * @throws RelationSchemaException |
||
| 24 | */ |
||
| 25 | protected function sourceTable(SchemaBuilder $builder): AbstractTable |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Get table linked with target relation model. |
||
| 34 | * |
||
| 35 | * @param SchemaBuilder $builder |
||
| 36 | * |
||
| 37 | * @return AbstractTable |
||
| 38 | * |
||
| 39 | * @throws RelationSchemaException |
||
| 40 | */ |
||
| 41 | protected function targetTable(SchemaBuilder $builder): AbstractTable |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return RelationDefinition |
||
| 53 | */ |
||
| 54 | abstract protected function getDefinition(): RelationDefinition; |
||
| 55 | } |