2021-06-26 17:23:15 +02:00
|
|
|
<?php
|
|
|
|
|
2022-08-16 12:27:22 +02:00
|
|
|
namespace BookStack\Search;
|
2018-09-25 13:30:50 +02:00
|
|
|
|
|
|
|
use BookStack\Model;
|
2017-03-19 13:48:44 +01:00
|
|
|
|
|
|
|
class SearchTerm extends Model
|
|
|
|
{
|
|
|
|
protected $fillable = ['term', 'entity_id', 'entity_type', 'score'];
|
|
|
|
public $timestamps = false;
|
|
|
|
|
|
|
|
/**
|
2021-06-26 17:23:15 +02:00
|
|
|
* Get the entity that this term belongs to.
|
|
|
|
*
|
2017-03-19 13:48:44 +01:00
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
|
|
|
|
*/
|
|
|
|
public function entity()
|
|
|
|
{
|
|
|
|
return $this->morphTo('entity');
|
|
|
|
}
|
|
|
|
}
|