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