| @@ 21-42 (lines=22) @@ | ||
| 18 | * |
|
| 19 | * @property static $this |
|
| 20 | */ |
|
| 21 | trait QueueRelations |
|
| 22 | { |
|
| 23 | /** |
|
| 24 | * @return mixed |
|
| 25 | */ |
|
| 26 | public function changeBy() |
|
| 27 | { |
|
| 28 | return $this->belongsTo('\Tinyissue\Model\User', 'change_by_id'); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return mixed |
|
| 33 | */ |
|
| 34 | public function model() |
|
| 35 | { |
|
| 36 | return $this->morphTo(); |
|
| 37 | } |
|
| 38 | ||
| 39 | abstract public function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null); |
|
| 40 | ||
| 41 | abstract public function morphTo($name = null, $type = null, $id = null); |
|
| 42 | } |
|
| 43 | ||
| @@ 21-41 (lines=21) @@ | ||
| 18 | * |
|
| 19 | * @property static $this |
|
| 20 | */ |
|
| 21 | trait RelationTrait |
|
| 22 | { |
|
| 23 | /** |
|
| 24 | * @return mixed |
|
| 25 | */ |
|
| 26 | public function changeBy() |
|
| 27 | { |
|
| 28 | return $this->belongsTo('\Tinyissue\Model\User', 'change_by_id'); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return mixed |
|
| 33 | */ |
|
| 34 | public function model() |
|
| 35 | { |
|
| 36 | return $this->morphTo(); |
|
| 37 | } |
|
| 38 | ||
| 39 | abstract public function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null); |
|
| 40 | abstract public function morphTo($name = null, $type = null, $id = null); |
|
| 41 | } |
|
| 42 | ||
| @@ 21-42 (lines=22) @@ | ||
| 18 | * |
|
| 19 | * @property static $this |
|
| 20 | */ |
|
| 21 | trait Relations |
|
| 22 | { |
|
| 23 | /** |
|
| 24 | * @return mixed |
|
| 25 | */ |
|
| 26 | public function changeBy() |
|
| 27 | { |
|
| 28 | return $this->belongsTo('\Tinyissue\Model\User', 'change_by_id'); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return mixed |
|
| 33 | */ |
|
| 34 | public function model() |
|
| 35 | { |
|
| 36 | return $this->morphTo(); |
|
| 37 | } |
|
| 38 | ||
| 39 | abstract public function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null); |
|
| 40 | ||
| 41 | abstract public function morphTo($name = null, $type = null, $id = null); |
|
| 42 | } |
|
| 43 | ||