38 lines
661 B
PHP
38 lines
661 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use App\Enums\WorkspaceUserRole;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\Pivot;
|
||
|
|
|
||
|
|
class WorkspaceUser extends Pivot
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* The table associated with the model.
|
||
|
|
*
|
||
|
|
* @var string
|
||
|
|
*/
|
||
|
|
protected $table = 'workspace_user';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* The attributes that are mass assignable.
|
||
|
|
*
|
||
|
|
* @var list<string>
|
||
|
|
*/
|
||
|
|
protected $fillable = [
|
||
|
|
'role',
|
||
|
|
];
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get the attributes that should be cast.
|
||
|
|
*
|
||
|
|
* @return array<string, string>
|
||
|
|
*/
|
||
|
|
protected function casts(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'role' => WorkspaceUserRole::class,
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|