Changes in the Entities to specify unique index and creating new classes: Post and Category