Files
SkinbaseNova/app/Models/UserDiscoveryEvent.php
2026-02-14 15:14:12 +01:00

40 lines
779 B
PHP

<?php
declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class UserDiscoveryEvent extends Model
{
use HasFactory;
protected $table = 'user_discovery_events';
protected $guarded = [];
protected $casts = [
'occurred_at' => 'datetime',
'meta' => 'array',
'weight' => 'float',
];
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function artwork(): BelongsTo
{
return $this->belongsTo(Artwork::class);
}
public function category(): BelongsTo
{
return $this->belongsTo(Category::class);
}
}