Studio: make grid checkbox rectangular and commit table changes

This commit is contained in:
2026-03-01 08:43:48 +01:00
parent 211dc58884
commit e3ca845a6d
89 changed files with 7323 additions and 475 deletions

View File

@@ -0,0 +1,48 @@
<?php
declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* Precomputed recommendation list for an artwork.
*
* @property int $id
* @property int $artwork_id
* @property string $rec_type similar_hybrid|similar_visual|similar_tags|similar_behavior
* @property array $recs Ordered array of artwork IDs
* @property string $model_version e.g. "sim_v1"
* @property \Carbon\Carbon $computed_at
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
*
* @property-read Artwork $artwork
*/
final class RecArtworkRec extends Model
{
protected $table = 'rec_artwork_recs';
protected $fillable = [
'artwork_id',
'rec_type',
'recs',
'model_version',
'computed_at',
];
protected $casts = [
'artwork_id' => 'integer',
'recs' => 'array',
'computed_at' => 'datetime',
];
// ── Relations ──────────────────────────────────────────────────────────
public function artwork(): BelongsTo
{
return $this->belongsTo(Artwork::class, 'artwork_id');
}
}