'integer', 'score_trending' => 'float', 'score_new_hot' => 'float', 'score_best' => 'float', 'computed_at' => 'datetime', ]; // ── Relations ────────────────────────────────────────────────────────── public function artwork(): BelongsTo { return $this->belongsTo(Artwork::class, 'artwork_id'); } // ── Helpers ──────────────────────────────────────────────────────────── /** * Map list_type string to the corresponding score column. */ public static function scoreColumn(string $listType): string { return match ($listType) { 'new_hot' => 'score_new_hot', 'best' => 'score_best', default => 'score_trending', }; } }