created model and database for photos