'datetime', 'sent_at' => 'datetime', ]; public function appointment(): BelongsTo { return $this->belongsTo(Appointment::class); } public function template(): BelongsTo { return $this->belongsTo(ReminderTemplate::class, 'template_id'); } public function markAsSent(string $response = null): void { $this->status = 'sent'; $this->sent_at = now(); $this->response = $response; $this->save(); } public function markAsFailed(string $errorMessage): void { $this->status = 'failed'; $this->error_message = $errorMessage; $this->save(); } }