47 lines
1.1 KiB
PHP
47 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class OnboardingEvidence extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'onboarding_evidence';
|
|
|
|
protected $guarded = [];
|
|
|
|
protected $casts = [
|
|
'payload' => 'array',
|
|
'recorded_at' => 'datetime',
|
|
];
|
|
|
|
public function tenant(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Tenant::class);
|
|
}
|
|
|
|
public function onboardingSession(): BelongsTo
|
|
{
|
|
return $this->belongsTo(OnboardingSession::class, 'onboarding_session_id');
|
|
}
|
|
|
|
public function providerConnection(): BelongsTo
|
|
{
|
|
return $this->belongsTo(ProviderConnection::class, 'provider_connection_id');
|
|
}
|
|
|
|
public function operationRun(): BelongsTo
|
|
{
|
|
return $this->belongsTo(OperationRun::class, 'operation_run_id');
|
|
}
|
|
|
|
public function recordedBy(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'recorded_by_user_id');
|
|
}
|
|
}
|