<?php

namespace App\Models;

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

class GroupPermission extends Model
{
    use HasFactory;

    protected $table = 'group_permissions';
    protected $primaryKey = 'group_permission_id';

    protected $fillable = [
        'group_id',
        'feature_id',
        'can_view',
        'can_add',
        'can_edit',
        'can_delete',
        'can_export',
        'can_print',
        'can_approve',
        'created_by',
        'updated_by',
    ];

    protected $casts = [
        'can_view' => 'boolean',
        'can_add' => 'boolean',
        'can_edit' => 'boolean',
        'can_delete' => 'boolean',
        'can_export' => 'boolean',
        'can_print' => 'boolean',
        'can_approve' => 'boolean',
    ];
}

