Phase 2: Implement Domain & Mailbox persistence, Analytics, and fix pagination issues
This commit is contained in:
30
app/Models/AnalyticsEvent.php
Normal file
30
app/Models/AnalyticsEvent.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use MongoDB\Laravel\Eloquent\Model;
|
||||
|
||||
class AnalyticsEvent extends Model
|
||||
{
|
||||
protected $connection = 'mongodb';
|
||||
|
||||
protected $collection = 'analytics_events';
|
||||
|
||||
protected $fillable = [
|
||||
'event_type',
|
||||
'mailbox_hash',
|
||||
'domain_hash',
|
||||
'user_type',
|
||||
'user_id',
|
||||
'ip_address',
|
||||
'user_agent',
|
||||
'metadata',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'metadata' => 'array',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user