Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com>
Co-authored-by: Aditya Tripathi <aditya@climactic.co>
This commit is contained in:
Andras Bacsai
2026-11-06 14:25:02 +01:00
committed by GitHub
co-authored by Claude Opus 5.5 peaklabs-dev Aditya Tripathi
parent b7dc2e435b
commit 033f0c84da
581 changed files with 58626 additions and 2456 deletions
+53
View File
@@ -0,0 +1,53 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphTo;
/**
* What the image security notifications told the team about one resource (a scan owner), see `ScanNotifications`.
* A baseline row records findings and fixes without notifying until it ends.
*/
class ImageScanNotificationState extends Model
{
use HasFactory;
protected $fillable = [
'resource_type',
'resource_id',
'team_id',
'notified_ids',
'notified_candidates',
'digest_ids',
'check_reported',
'held_digests',
'is_baseline',
'baseline_deployment_queue_id',
];
protected function casts(): array
{
return [
'notified_ids' => 'array',
'notified_candidates' => 'array',
'digest_ids' => 'array',
'check_reported' => 'boolean',
'held_digests' => 'integer',
'is_baseline' => 'boolean',
'baseline_deployment_queue_id' => 'integer',
];
}
public function resource(): MorphTo
{
return $this->morphTo('resource');
}
public function team(): BelongsTo
{
return $this->belongsTo(Team::class);
}
}