creates post model in database