mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-25 02:22:31 +08:00
29 lines
620 B
PHP
29 lines
620 B
PHP
<?php namespace BookStack\Auth\Permissions;
|
|
|
|
use BookStack\Auth\Role;
|
|
use BookStack\Entities\Entity;
|
|
use BookStack\Model;
|
|
|
|
class JointPermission extends Model
|
|
{
|
|
public $timestamps = false;
|
|
|
|
/**
|
|
* Get the role that this points to.
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
*/
|
|
public function role()
|
|
{
|
|
return $this->belongsTo(Role::class);
|
|
}
|
|
|
|
/**
|
|
* Get the entity this points to.
|
|
* @return \Illuminate\Database\Eloquent\Relations\MorphOne
|
|
*/
|
|
public function entity()
|
|
{
|
|
return $this->morphOne(Entity::class, 'entity');
|
|
}
|
|
}
|