public static function random(array $conditions = [])
    {
        $count = static::entity()->getDatabase()->count(static::$collection, $conditions);
        if ($count === 0) {
            return null;
        }

        $data = static::find($conditions, [], 1, rand(0, $count));

        return $data[0];
    }