creating  models for images and types of ads, initializing database