- Fix EventType deletion error handling (constraint violations) - Fix Event update error (package_id column missing) - Fix Event Type dropdown options (JSON display issue) - Fix EventPackagesRelationManager query error - Add missing translations for deletion errors - Apply Pint formatting
50 lines
1.0 KiB
PHP
50 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class EventJoinTokenEvent extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'event_join_token_id',
|
|
'event_id',
|
|
'tenant_id',
|
|
'token_hash',
|
|
'token_preview',
|
|
'event_type',
|
|
'route',
|
|
'http_method',
|
|
'http_status',
|
|
'device_id',
|
|
'ip_address',
|
|
'user_agent',
|
|
'context',
|
|
'occurred_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'context' => 'array',
|
|
'occurred_at' => 'datetime',
|
|
];
|
|
|
|
public function joinToken(): BelongsTo
|
|
{
|
|
return $this->belongsTo(EventJoinToken::class, 'event_join_token_id');
|
|
}
|
|
|
|
public function event(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Event::class);
|
|
}
|
|
|
|
public function tenant(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Tenant::class);
|
|
}
|
|
}
|