Jenkins file
Laverie/backend/pipeline/head There was a failure building this commit

This commit is contained in:
bastien
2026-07-04 22:42:58 +02:00
parent 10ee859602
commit d95bfa6c58
244 changed files with 16 additions and 15 deletions
+43
View File
@@ -0,0 +1,43 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphTo;
#[Fillable(['actor_type', 'actor_id', 'organization_id', 'establishment_id', 'action', 'target_type', 'target_id', 'before_data', 'after_data', 'ip_address'])]
class AuditLog extends Model
{
public const UPDATED_AT = null;
protected function casts(): array
{
return [
'before_data' => 'array',
'after_data' => 'array',
'created_at' => 'datetime',
];
}
public function actor(): MorphTo
{
return $this->morphTo();
}
public function organization(): BelongsTo
{
return $this->belongsTo(Organization::class);
}
public function establishment(): BelongsTo
{
return $this->belongsTo(Establishment::class);
}
public function target(): MorphTo
{
return $this->morphTo();
}
}