Save workspace changes

This commit is contained in:
2026-04-18 17:02:56 +02:00
parent f02ea9a711
commit 87d60af5a9
4220 changed files with 1388603 additions and 1554 deletions

View File

@@ -0,0 +1,54 @@
<?php
declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* Recommendation event log entry.
*
* @property int $id
* @property int|null $user_id
* @property string|null $session_id
* @property string $event_type view|favourite|download
* @property int $artwork_id
* @property \Carbon\Carbon $created_at
*
* @property-read User|null $user
* @property-read Artwork $artwork
*/
final class RecEvent extends Model
{
protected $table = 'rec_events';
public $timestamps = false;
protected $fillable = [
'user_id',
'session_id',
'event_type',
'artwork_id',
'created_at',
];
protected $casts = [
'user_id' => 'integer',
'artwork_id' => 'integer',
'created_at' => 'datetime',
];
// ── Relations ──────────────────────────────────────────────────────────
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function artwork(): BelongsTo
{
return $this->belongsTo(Artwork::class);
}
}