2020-11-22 01:17:45 +01:00
|
|
|
<?php namespace BookStack\Entities\Models;
|
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;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the entity that this term belongs to
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
|
|
|
|
*/
|
|
|
|
public function entity()
|
|
|
|
{
|
|
|
|
return $this->morphTo('entity');
|
|
|
|
}
|
|
|
|
}
|