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,53 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* App\Models\ArtworkMetricSnapshotHourly
*
* Stores hourly totals for artwork metrics. Deltas are computed by
* subtracting the previous hour's snapshot from the current one.
*
* @property int $id
* @property int $artwork_id
* @property \Illuminate\Support\Carbon $bucket_hour
* @property int $views_count
* @property int $downloads_count
* @property int $favourites_count
* @property int $comments_count
* @property int $shares_count
* @property \Illuminate\Support\Carbon $created_at
*/
class ArtworkMetricSnapshotHourly extends Model
{
protected $table = 'artwork_metric_snapshots_hourly';
public $timestamps = false;
protected $fillable = [
'artwork_id',
'bucket_hour',
'views_count',
'downloads_count',
'favourites_count',
'comments_count',
'shares_count',
];
protected $casts = [
'bucket_hour' => 'datetime',
'views_count' => 'integer',
'downloads_count' => 'integer',
'favourites_count' => 'integer',
'comments_count' => 'integer',
'shares_count' => 'integer',
];
public function artwork(): BelongsTo
{
return $this->belongsTo(Artwork::class, 'artwork_id');
}
}