feat(preferences): added preferences model and helper to get and set them

This commit is contained in:
Marco Cavalli 2025-02-18 16:06:56 +01:00
parent d5abe92eb2
commit 25a1fc0c37
2 changed files with 122 additions and 0 deletions

23
app/Models/Preference.php Normal file
View file

@ -0,0 +1,23 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Preference extends Model
{
protected $table = 'cc_pref';
public $timestamps = false;
protected $fillable = [
'subjid',
'keystr',
'valstr'
];
public function user() {
return $this->belongsTo(User::class, 'subjid');
}
}