<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class UserPermissions extends Model
{
    use HasFactory;
    protected $fillable=[
        'id_permission',
        'fk_id_user',
        'menu_documents',
        'menu_users',
        'menu_stadistics',
        'menu_notary',
        'can_view',
        'can_edit',
        'can_delete',
        'can_upload',
        'can_sign',
        'can_download',
        'change_area',
        'send_email'
    ];
    protected $primaryKey = 'id_permission';
    public $timestamps = false;
     protected $casts = [
        'menu_documents' => 'boolean',
        'menu_users' => 'boolean',
        'menu_stadistics'=>'boolean',
        'menu_notary'=>'boolean',
        'can_view' => 'boolean',
        'can_edit' => 'boolean',
        'can_delete' => 'boolean',
        'can_upload' => 'boolean',
        'can_sign' => 'boolean',
        'can_download'=> 'boolean',
        'change_area'=>'boolean',
        'send_email' =>'boolean'
    ];
    //  protected $casts = [
    //     'deleted' => 'boolean',
    // ];
 
}
