add validations and associations to post model

Added associations for post model and validations for fields