

-- CHARACTER MANAGEMENT
INSERT INTO [VOLCANO_DBF].dbo.PERMISSION_CONFIG_TBL (action_key, action_name, category, action_type, restricted_signatures, obfuscate_data) VALUES
('character_view', 'View Character', 'Character', 'View', 0, 1),
('character_list', 'List Characters', 'Character', 'View', 0, 1),
('character_search', 'Search Character', 'Character', 'View', 0, 1),
('character_ban', 'Ban Character', 'Character', 'Modify', 1, 0),
('character_unban', 'Unban Character', 'Character', 'Modify', 1, 0),
('character_extend_ban', 'Extend Ban', 'Character', 'Modify', 1, 0),
('character_delete', 'Delete Character', 'Character', 'Modify', 1, 0),
('character_restore', 'Restore Character', 'Character', 'Modify', 1, 0),
('character_switch_slot', 'Switch Slot', 'Character', 'Modify', 1, 0),
('character_force_teleport', 'Force Teleport', 'Character', 'Modify', 1, 0),
('character_force_disconnect', 'Force Disconnect', 'Character', 'Modify', 1, 0),
('character_reset_bank_pin', 'Reset Bank PIN', 'Character', 'Modify', 1, 0),
('character_remove_premium', 'Remove Premium', 'Character', 'Modify', 1, 0),
('character_reset_bot_hunter', 'Reset Bot Hunter', 'Character', 'Modify', 1, 0),
('character_make_cursed', 'Make Cursed', 'Character', 'Modify', -1, 0),
('character_remove_cursed', 'Remove Cursed', 'Character', 'Modify', -1, 0),
('character_change_cursed_stats', 'Change Cursed Stats', 'Character', 'Modify', -1, 0),
('character_reset_cursed_stats', 'Reset Cursed Stats', 'Character', 'Modify', -1, 0),
('character_change_cursed_rank', 'Change Cursed Rank', 'Character', 'Modify', -1, 0),
('character_reset_cursed_rank', 'Reset Cursed Rank', 'Character', 'Modify', -1, 0),
('character_reset_dungeon_entries', 'Reset Dungeon Entries', 'Character', 'Modify', 1, 0);

-- ITEM MANAGEMENT
INSERT INTO [VOLCANO_DBF].dbo.PERMISSION_CONFIG_TBL (action_key, action_name, category, action_type, restricted_signatures, obfuscate_data) VALUES
('item_send', 'Send Item', 'Item', 'Modify', 1, 0),
('item_duplicate', 'Duplicate Item', 'Item', 'Modify', 1, 0),
('item_transfer', 'Transfer Item', 'Item', 'Modify', 1, 0),
('item_delete', 'Delete Item', 'Item', 'Modify', 1, 0),
('item_admin_lock', 'Admin Lock Item', 'Item', 'Modify', 1, 0),
('item_track_logs', 'Track Item Logs', 'Item', 'View', 0, 0),
('item_search', 'Search Items', 'Item', 'View', 0, 0),
('item_view_details', 'View Item Details', 'Item', 'View', 0, 0);

-- CURRENCY MANAGEMENT
INSERT INTO [VOLCANO_DBF].dbo.PERMISSION_CONFIG_TBL (action_key, action_name, category, action_type, restricted_signatures, obfuscate_data) VALUES
('currency_send', 'Send Currency', 'Currency', 'Modify', 1, 0);

-- ITEM SHOP
INSERT INTO [VOLCANO_DBF].dbo.PERMISSION_CONFIG_TBL (action_key, action_name, category, action_type, restricted_signatures, obfuscate_data) VALUES
('shop_view_items', 'View Shop Items', 'Shop', 'View', 0, 0),
('shop_view_statistics', 'View Shop Statistics', 'Shop', 'View', 0, 0),
('shop_create_item', 'Create Shop Item', 'Shop', 'Modify', -1, 0),
('shop_edit_item', 'Edit Shop Item', 'Shop', 'Modify', -1, 0),
('shop_toggle_item', 'Toggle Item Active', 'Shop', 'Modify', -1, 0),
('shop_delete_item', 'Delete Shop Item', 'Shop', 'Modify', -1, 0),
('shop_schedule_sale', 'Schedule Sale', 'Shop', 'Modify', -1, 0),
('shop_view_sales_chart', 'View Sales Chart', 'Shop', 'View', 0, 0),
('shop_view_purchase_history', 'View Item Purchase History', 'Shop', 'View', -1, 0),
('shop_view_analytics', 'View Item Analytics', 'Shop', 'View', 0, 0);

-- SLIDER MANAGEMENT
INSERT INTO [VOLCANO_DBF].dbo.PERMISSION_CONFIG_TBL (action_key, action_name, category, action_type, restricted_signatures, obfuscate_data) VALUES
('slider_view', 'View Sliders', 'Slider', 'View', 0, 0),
('slider_create', 'Create Slider', 'Slider', 'Modify', -1, 0),
('slider_edit', 'Edit Slider', 'Slider', 'Modify', -1, 0),
('slider_delete', 'Delete Slider', 'Slider', 'Modify', -1, 0);

-- COUPON MANAGEMENT
INSERT INTO [VOLCANO_DBF].dbo.PERMISSION_CONFIG_TBL (action_key, action_name, category, action_type, restricted_signatures, obfuscate_data) VALUES
('coupon_view', 'View Coupons', 'Coupon', 'View', 0, 0),
('coupon_generate', 'Generate Coupon', 'Coupon', 'Modify', -1, 0),
('coupon_disable', 'Disable Coupon', 'Coupon', 'Modify', -1, 0);

-- PAYMENT MANAGEMENT (all blocked for restricted)
INSERT INTO [VOLCANO_DBF].dbo.PERMISSION_CONFIG_TBL (action_key, action_name, category, action_type, restricted_signatures, obfuscate_data) VALUES
('payment_view_all', 'View All Payments', 'Payment', 'View', -1, 0),
('payment_view_details', 'View Payment Details', 'Payment', 'View', -1, 0),
('payment_refund', 'Process Refund', 'Payment', 'Modify', -1, 0),
('payment_mark_paid', 'Mark as Paid', 'Payment', 'Modify', -1, 0),
('payment_mark_failed', 'Mark as Failed', 'Payment', 'Modify', -1, 0),
('payment_dispute_chargeback', 'Dispute Chargeback', 'Payment', 'Modify', -1, 0),
('payment_view_statistics', 'View Payment Statistics', 'Payment', 'View', -1, 0),
('payment_view_recent', 'View Recent Payments', 'Payment', 'View', -1, 0),
('payment_view_revenue', 'View Revenue Data', 'Payment', 'View', -1, 0);

-- GUILD MANAGEMENT
INSERT INTO [VOLCANO_DBF].dbo.PERMISSION_CONFIG_TBL (action_key, action_name, category, action_type, restricted_signatures, obfuscate_data) VALUES
('guild_view', 'View Guilds', 'Guild', 'View', 0, 0),
('guild_view_details', 'View Guild Details', 'Guild', 'View', 0, 0);

-- STAFF MANAGEMENT
INSERT INTO [VOLCANO_DBF].dbo.PERMISSION_CONFIG_TBL (action_key, action_name, category, action_type, restricted_signatures, obfuscate_data) VALUES
('staff_view_roster', 'View Staff Roster', 'Staff', 'View', 0, 0),
('staff_get_info', 'Get Staff Info', 'Staff', 'View', 0, 0),
('staff_assign_role', 'Assign Staff Role', 'Staff', 'Modify', -1, 0),
('staff_revoke_role', 'Revoke Staff Role', 'Staff', 'Modify', -1, 0),
('staff_modify_role', 'Modify Staff Role', 'Staff', 'Modify', -1, 0),
('staff_update_salary', 'Update Salary', 'Staff', 'Modify', -1, 0);

-- SYSTEM OPERATIONS (all blocked for restricted)
INSERT INTO [VOLCANO_DBF].dbo.PERMISSION_CONFIG_TBL (action_key, action_name, category, action_type, restricted_signatures, obfuscate_data) VALUES
('system_toggle_maintenance', 'Toggle Maintenance Mode', 'System', 'Modify', -1, 0),
('system_clear_cache', 'Clear Cache', 'System', 'Modify', -1, 0),
('system_optimize_database', 'Optimize Database', 'System', 'Modify', -1, 0),
('system_view_logs', 'View Logs', 'System', 'View', -1, 0),
('system_security_scan', 'Security Scan', 'System', 'View', -1, 0),
('system_backup_database', 'Backup Database', 'System', 'Modify', -1, 0),
('system_add_crm_user', 'Add CRM User', 'System', 'Modify', -1, 0),
('system_edit_crm_user', 'Edit CRM User', 'System', 'Modify', -1, 0),
('system_delete_crm_user', 'Delete CRM User', 'System', 'Modify', -1, 0);

-- DUAL AUTHORIZATION
INSERT INTO [VOLCANO_DBF].dbo.PERMISSION_CONFIG_TBL (action_key, action_name, category, action_type, restricted_signatures, obfuscate_data) VALUES
('dualauth_view_pending', 'View Pending Actions', 'DualAuth', 'View', 0, 0),
('dualauth_submit', 'Submit Action for Approval', 'DualAuth', 'Modify', 0, 0),
('dualauth_approve', 'Approve Action', 'DualAuth', 'Modify', -1, 0),
('dualauth_reject', 'Reject Action', 'DualAuth', 'Modify', -1, 0);

-- REPORTING/ANALYTICS
INSERT INTO [VOLCANO_DBF].dbo.PERMISSION_CONFIG_TBL (action_key, action_name, category, action_type, restricted_signatures, obfuscate_data) VALUES
('analytics_view_dashboard', 'View Dashboard Statistics', 'Analytics', 'View', 0, 0),
('analytics_view_economy_chart', 'View Server Economy Chart', 'Analytics', 'View', 0, 0),
('analytics_view_recent_accounts', 'View Recent Accounts', 'Analytics', 'View', 0, 1),
('analytics_view_economy_data', 'View Economy Data', 'Analytics', 'View', 0, 0),
('analytics_view_system_stats', 'View System Stats', 'Analytics', 'View', -1, 0);

GO
