31 lines
517 B
PHP
31 lines
517 B
PHP
<?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',
|
|
];
|
|
}
|
|
}
|