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