14-04-2026
This commit is contained in:
parent
f58c709945
commit
0f82fea88a
72 changed files with 7414 additions and 148 deletions
40
dev/payment-dashboard/app/Models/IncidentActivity.php
Normal file
40
dev/payment-dashboard/app/Models/IncidentActivity.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class IncidentActivity extends Model
|
||||
{
|
||||
protected $fillable = ['incident_id', 'type', 'title', 'content', 'author'];
|
||||
|
||||
public function incident(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(PaymentIncident::class, 'incident_id');
|
||||
}
|
||||
|
||||
public function getTypeIconAttribute(): string
|
||||
{
|
||||
return match ($this->type) {
|
||||
'email' => '✉️',
|
||||
'call' => '📞',
|
||||
'ticket' => '🎫',
|
||||
'status_change' => '🔄',
|
||||
'provider_response' => '💬',
|
||||
default => '📝',
|
||||
};
|
||||
}
|
||||
|
||||
public function getTypeLabelAttribute(): string
|
||||
{
|
||||
return match ($this->type) {
|
||||
'email' => 'E-Mail',
|
||||
'call' => 'Telefonat',
|
||||
'ticket' => 'Support-Ticket',
|
||||
'status_change' => 'Statusänderung',
|
||||
'provider_response' => 'Anbieter-Antwort',
|
||||
default => 'Notiz',
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue