Files
alrahma_sunday_school/app/Models/PreferencesModel.php
T
2026-07-12 01:02:04 -04:00

34 lines
1.4 KiB
PHP

<?php
namespace App\Models;
use CodeIgniter\Model;
class PreferencesModel extends Model
{
protected $table = 'user_preferences'; // Adjusted to match the table name
protected $primaryKey = 'id'; // Primary key of the table
// Allowed fields to enable mass assignment
protected $allowedFields = [
'user_id', // Foreign key linking preferences to a user
'notification_email', // Email notifications preference
'notification_sms', // SMS notifications preference
'theme', // Theme preference (e.g., light or dark)
'language', // Language preference
'timezone', // Timezone preference
'style_color', // UI accent color key
'menu_color', // Menu palette key or 'custom'
'menu_custom_bg', // Custom menu background color
'menu_custom_text', // Custom menu text color
'menu_custom_mode', // Custom menu mode: light|dark
'created_at', // Timestamp of when the record was created
'updated_at' // Timestamp of when the record was last updated
];
// Enable automatic timestamp management if needed
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}