Files
alrahma_sunday_school_api/app/Models/Preferences.php
T
root e13df69885
API CI/CD / Validate (composer + pint) (push) Successful in 3m6s
API CI/CD / Test (PHPUnit) (push) Failing after 4m53s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Security audit (push) Failing after 59s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
fix unittests issues
2026-07-07 20:56:32 -04:00

32 lines
945 B
PHP

<?php
namespace App\Models;
class Preferences extends BaseModel
{
protected $table = 'user_preferences';
// ✅ legacy: useTimestamps = true (created_at/updated_at)
public $timestamps = true;
protected $fillable = ['user_id', 'notification_email', 'notification_sms', 'theme', 'language', 'style_color', 'menu_color', 'menu_custom_bg', 'menu_custom_text', 'menu_custom_mode', 'created_at', 'updated_at'];
protected $casts = [
'user_id' => 'integer',
'receive_email_notifications' => 'boolean',
'receive_sms_notifications' => 'boolean',
'receive_push_notifications' => 'boolean',
'daily_summary_email' => 'boolean',
'privacy_mode' => 'boolean',
'marketing_emails' => 'boolean',
'account_activity_alerts' => 'boolean',
];
/* Optional relationship */
public function user()
{
return $this->belongsTo(User::class, 'user_id');
}
}