phases one of time logged now with log display

This commit is contained in:
Mark Gregory
2026-06-22 14:03:35 +01:00
parent fcd60471be
commit bc213e0c6e
9 changed files with 307 additions and 290 deletions
+16 -27
View File
@@ -9,44 +9,33 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
class TicketTimeLog extends Model
{
use HasFactory;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'helpdesk_ticket_time_logs';
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'ticket_id',
'user_id',
'minutes',
'seconds',
'description',
'logged_at',
'started_at',
'ended_at',
'duration_seconds',
'logged_at',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'ticket_id' => 'integer',
'user_id' => 'integer',
'minutes' => 'integer',
'duration_seconds' => 'integer',
'logged_at' => 'datetime',
'started_at' => 'datetime',
'ended_at' => 'datetime',
];
protected function casts(): array
{
return [
'ticket_id' => 'integer',
'user_id' => 'integer',
'minutes' => 'integer',
'seconds' => 'integer',
'started_at' => 'datetime',
'ended_at' => 'datetime',
'logged_at' => 'datetime',
];
}
/**
* Get the ticket this time log belongs to.
@@ -57,7 +46,7 @@ class TicketTimeLog extends Model
}
/**
* Get the user this time log belongs to.
* Get the user who logged the time.
*/
public function user(): BelongsTo
{