28 lines
747 B
PHP
28 lines
747 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* One entry in an incident's timeline.
|
|
*
|
|
* Append-only by intent: an update is a statement made at a time, and editing
|
|
* what was said afterwards is exactly what a record like this exists to make
|
|
* impossible. Corrections are a further update.
|
|
*/
|
|
class IncidentUpdate extends Model
|
|
{
|
|
/** @use HasFactory<\Database\Factories\IncidentUpdateFactory> */
|
|
use HasFactory;
|
|
|
|
protected $fillable = ['incident_id', 'status', 'body', 'created_by'];
|
|
|
|
public function incident(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Incident::class);
|
|
}
|
|
}
|