Files
L-Ami-Fiduciaire/app/Models/WorkspaceUser.php
Saad Ibn-Ezzoubayr fd43a6f429 feat: complete Epic 0 — foundation migration & infrastructure setup
Stories 0.2-0.5: rename folders→declarations (backend+frontend), configure
Redis for cache/queue/sessions, add foundation database migrations
(permissions, archived_at), replace DeclarationStatus enum with architecture
lifecycle values, create DeclarationObserver for status transition validation
and auto-archive, fix controller status transitions to respect observer rules.

93 tests pass (240 assertions).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 18:25:32 +00:00

40 lines
722 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',
'permissions',
];
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'role' => WorkspaceUserRole::class,
'permissions' => 'array',
];
}
}