25 lines
532 B
PHP
25 lines
532 B
PHP
<?php
|
|
|
|
namespace Modules\Enterprise\Models;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
final class HealthRun extends Model
|
|
{
|
|
protected $table = 'enterprise_health_runs';
|
|
|
|
protected $fillable = ['user_id', 'status', 'results', 'ran_at'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['results' => 'array', 'ran_at' => 'datetime'];
|
|
}
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|