refactor: 修复知识库和操作指引
This commit is contained in:
@@ -21,8 +21,11 @@ class Terminal extends Model
|
||||
'name',
|
||||
'code',
|
||||
'ip_address',
|
||||
'mac_address',
|
||||
'station_id',
|
||||
'diagram_url',
|
||||
'scada_data_url',
|
||||
'scada_tags_url',
|
||||
'display_config',
|
||||
'is_online',
|
||||
'last_online_at',
|
||||
@@ -55,6 +58,19 @@ class Terminal extends Model
|
||||
->orderBy('priority');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取终端关联的指引
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*/
|
||||
public function guides()
|
||||
{
|
||||
return $this->belongsToMany(Guide::class, 'terminal_guides')
|
||||
->withPivot('priority')
|
||||
->withTimestamps()
|
||||
->orderBy('priority');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取终端的提示词配置
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user