generated post model and added user_id to posts