<?php

namespace App\Models;

use App\Enums\ProjectRol;
use Illuminate\Database\Eloquent\Relations\Pivot;

class ProjectUser extends Pivot
{
    protected $table = 'project_user';

    public $incrementing = false;

    protected $fillable = [
        'project_id',
        'user_id',
        'rol',
    ];

    protected function casts(): array
    {
        return [
            'rol' => ProjectRol::class,
        ];
    }
}
