generate post model