<?php
/**
 * Spatie Permission Configuration
 *
 * @version     1.0.$Revision:$
 * @package     bplan-base/globals
 * @subpackage  Config
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 * @copyright   Copyright (C) 2025, 2026 bplan-solutions GmbH & Co. KG <https://www.bplan-solutions.de/>
 * /Δ\
 */


use BplanBase\Globals\Models\Permission;
use BplanBase\Globals\Models\Role;


return [
    'cache' => [
        'expiration_time' => DateInterval::createFromDateString('24 hours'),
        'key'             => 'spatie.permission.cache',
        'store'           => 'default',
    ],
    'column_names' => [
        'model_morph_key'      => 'model_id',
        'permission_pivot_key' => null,
        'role_pivot_key'       => null,
        'team_foreign_key'     => 'tenant_id',
    ],
    'display_permission_in_exception' => false,
    'display_role_in_exception' => false,
    'enable_wildcard_permission' => false,
    'events_enabled' => false,
    'models' => [
        'permission' => Permission::class,
        'role'       => Role::class,
    ],
    'table_names' => [
        'permissions'           => 'permissions',
        'model_has_permissions' => 'model_has_permissions',
        'model_has_roles'       => 'model_has_roles',
        'role_has_permissions'  => 'role_has_permissions',
        'roles'                 => 'roles',
    ],
    'register_octane_reset_listener' => false,
    'register_permission_check_method' => true,
    'team_resolver' => Spatie\Permission\DefaultTeamResolver::class,
    'teams' => true,
    'use_passport_client_credentials' => false,

];
