Laravel 13 + Livewire/Volt app for managing client organizations, documents, passwords, flexible assets, virtual machines, contacts, domains, todos, shortcuts, and role-based user administration.
35 lines
717 B
PHP
35 lines
717 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class OrganizationLogEntry extends Model
|
|
{
|
|
const UPDATED_AT = null;
|
|
|
|
const CATEGORIES = [
|
|
'project' => 'Projet en cours',
|
|
'attention' => "Point d'attention",
|
|
'intervention' => 'Intervention prévue',
|
|
'info' => 'Information générale',
|
|
];
|
|
|
|
protected $guarded = [];
|
|
|
|
public function organization()
|
|
{
|
|
return $this->belongsTo(Organization::class);
|
|
}
|
|
|
|
public function creator()
|
|
{
|
|
return $this->belongsTo(User::class, 'created_by');
|
|
}
|
|
|
|
public function categoryLabel(): string
|
|
{
|
|
return self::CATEGORIES[$this->category] ?? $this->category;
|
|
}
|
|
}
|