## Summary - add persisted customer review acknowledgement truth with capability gating and audit emission - extend the customer review workspace with acknowledgement state, evidence basis details, and accepted-risk lifecycle visibility - add focused feature and browser coverage plus Spec 343 screenshot artifacts and UI audit updates ## Scope - Livewire v4 / Filament v5 surface only; no panel provider changes - no new global assets; no `filament:assets` deployment change for this slice - includes a PostgreSQL migration for `environment_review_acknowledgements` ## Guardrail / Exception / Smoke Coverage - reachable UI surface changed: existing `/admin/reviews/workspace` customer-safe page - UI audit updated in `docs/ui-ux-enterprise-audit/page-reports/ui-006-customer-review-workspace.md` - screenshot artifacts included under `specs/343-customer-review-attestation-accepted-risk-lifecycle/artifacts/screenshots/` - spec package includes plan, tasks, repo-truth map, and state contract for the implemented slice ## Notes - target branch requested: `platform-dev` - branch pushed from commit `aaaad441fd13dbac54e971ab48765c502ced6b3f` Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #415
77 lines
1.7 KiB
PHP
77 lines
1.7 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Support\Concerns\DerivesWorkspaceIdFromTenant;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class EnvironmentReviewAcknowledgement extends Model
|
|
{
|
|
use DerivesWorkspaceIdFromTenant;
|
|
use HasFactory;
|
|
|
|
protected $guarded = [];
|
|
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'acknowledged_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo<Workspace, $this>
|
|
*/
|
|
public function workspace(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Workspace::class);
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo<ManagedEnvironment, $this>
|
|
*/
|
|
public function tenant(): BelongsTo
|
|
{
|
|
return $this->belongsTo(ManagedEnvironment::class, 'managed_environment_id');
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo<EnvironmentReview, $this>
|
|
*/
|
|
public function review(): BelongsTo
|
|
{
|
|
return $this->belongsTo(EnvironmentReview::class, 'environment_review_id');
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo<EvidenceSnapshot, $this>
|
|
*/
|
|
public function evidenceSnapshot(): BelongsTo
|
|
{
|
|
return $this->belongsTo(EvidenceSnapshot::class);
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo<ReviewPack, $this>
|
|
*/
|
|
public function reviewPack(): BelongsTo
|
|
{
|
|
return $this->belongsTo(ReviewPack::class);
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo<User, $this>
|
|
*/
|
|
public function acknowledgedByUser(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'acknowledged_by_user_id');
|
|
}
|
|
}
|