[ 'type' => 'bigint', ], 'user_id' => [ 'type' => 'bigint', 'nullable' => true, ], 'log_action' => [ 'type' => 'string', 'length' => 100, 'required' => true, ], 'entity_type' => [ 'type' => 'string', 'length' => 100, 'required' => true, ], 'entity_id' => [ 'type' => 'bigint', 'required' => true, ], 'change_details' => [ 'type' => 'json', 'nullable' => true, ], 'ip_address' => [ 'type' => 'string', 'length' => 45, ], 'user_agent' => [ 'type' => 'string', 'length' => 500, 'nullable' => true, ], 'log_level' => [ 'type' => 'enum', 'enum' => ['info', 'warning', 'error', 'critical'], 'default' => 'info', ], 'created_at' => [ 'type' => 'datetime', 'nullable' => true, ], ]; } public static function table() { return static::TABLE; } }