refactor: kb & station & terminal
This commit is contained in:
@@ -47,16 +47,13 @@ class Terminal extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取终端关联的指引
|
||||
* 获取终端所属的线站
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function guides()
|
||||
public function station()
|
||||
{
|
||||
return $this->belongsToMany(Guide::class, 'terminal_guides')
|
||||
->withPivot('priority')
|
||||
->withTimestamps()
|
||||
->orderBy('priority');
|
||||
return $this->belongsTo(Station::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user