mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
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>
54 lines
1.3 KiB
PHP
54 lines
1.3 KiB
PHP
<?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);
|
|
}
|
|
}
|