Bag-type model with fractal structure