40 lines
1.0 KiB
PHP
40 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Concerns\BelongsToTenant;
|
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* A stored report of the process tester: scenario, configuration (also unsaved), inputs, the report of the isolated
|
|
* run. Contains only synthetic case data; deleted after the retention period (decision O3).
|
|
*/
|
|
#[Fillable(['tenant_id', 'channel_id', 'user_id', 'intake', 'scenario', 'configuration', 'inputs', 'steps', 'report', 'outcome', 'release'])]
|
|
class ProcessTestRun extends Model
|
|
{
|
|
use BelongsToTenant;
|
|
|
|
public const COMPLETED = 'completed';
|
|
|
|
public const ABORTED = 'aborted';
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'configuration' => 'array',
|
|
'inputs' => 'array',
|
|
'report' => 'array',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo<Channel, $this>
|
|
*/
|
|
public function channel(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Channel::class);
|
|
}
|
|
}
|